[Python image processing] 30. Detailed summary of image quantization and sampling processing (recommended)

Eastmount 2020-11-12 23:57:40
python image processing detailed summary


The series is about Python OpenCV Image processing knowledge , In the early stage, I mainly introduced the introduction of image 、OpenCV Basic usage , In the middle, I will explain various algorithms of image processing , Including image sharpening operators 、 Image enhancement technology 、 Image segmentation, etc , In the later stage, image recognition is studied with deep learning 、 Image classification applications . I hope the article can help you , If there are shortcomings , Please ask Hai Han. ~

The previous article introduced MoviePy Video editing Library , Realize the custom cut and merge operation of video ; This article will explain image quantization and sampling processing in detail , Ten thousand words long text emesis finishing . meanwhile , This part of knowledge is for xiuzhang to consult data, write and sort out , And it's a paid column , Make some milk powder money for Xiaobao . Of course, if you are a student or financially strapped , I'll give you a white list for each article , Or forward the original to you , What's more, I hope you are willing to reward and improve . Come on ~

The series is in github All source code :

Previous reference :
[Python The image processing ] One . Basic knowledge of image processing and OpenCV Entry function
[Python The image processing ] Two .OpenCV+Numpy Library reading and modifying pixels
[Python The image processing ] 3、 ... and . Get image properties 、 Interest in ROI Area and access handling
[Python The image processing ] Four . Mean filtering of image smoothing 、 Box filtering 、 Gauss filter and median filter
[Python The image processing ] 5、 ... and . Image fusion 、 Addition operation and image type conversion
[Python The image processing ] 6、 ... and . Image zoom 、 Image rotation 、 Image flip and image translation
[Python The image processing ] 7、 ... and . Image thresholding and algorithm comparison
[Python The image processing ] 8、 ... and . Image corrosion and image expansion
[Python The image processing ] Nine . Morphological image opening operation 、 Closed operation 、 Gradient operation
[Python The image processing ] Ten . Morphological image top hat operation and black hat operation
[Python The image processing ] 11、 ... and . Concept of gray histogram and OpenCV Draw histogram
[Python The image processing ] Twelve . Image affine transformation of image geometric transformation 、 Image perspective transformation and image correction
[Python The image processing ] 13、 ... and . Based on gray-scale three-dimensional image top hat operation and black hat operation
[Python The image processing ] fourteen . be based on OpenCV And pixel processing of image grayscale processing
[Python The image processing ] 15、 ... and . The gray scale linear transformation of the image
[Python The image processing ] sixteen . The logarithmic transformation of the gray-scale nonlinear transformation of an image 、 Gamma transform
[Python The image processing ] seventeen . Image sharpening and edge detection Roberts operator 、Prewitt operator 、Sobel Operator and Laplacian operator
[Python The image processing ] eighteen . Image sharpening and edge detection Scharr operator 、Canny Operator and LOG operator
[Python The image processing ] nineteen . Image segmentation based on K-Means Regional segmentation of clustering
[Python The image processing ] twenty . Image quantization processing and sampling processing and local mosaic effect
[Python The image processing ] The 21st . The image of the image pyramid is sampled down and up
[Python The image processing ] Twenty-two .Python The principle and Realization of image Fourier transform
[Python The image processing ] 23 . High pass filter and low pass filter of Fourier transform
[Python The image processing ] Twenty-four . Ground glass for image processing 、 Relief and paint effects
[Python The image processing ] twenty-five . Sketch of image special effect processing 、 nostalgia 、 light 、 Fleeting years and filter effects
[Python The image processing ] hexacosa- . Image classification principle and based on KNN、 The image classification case of naive Bayesian algorithm
[Python The image processing ] twenty-seven .OpenGL Introduction and basic drawing ( One )
[Python The image processing ] Twenty-eight .OpenCV Fast implementation of face detection and video face
[Python The image processing ] Twenty-nine .MoviePy Video editing library implements tiktok short video cut merge operation


Images are usually the objective reflection of natural scenery , And in the form of photos or video recording media for continuous storage , The goal of image acquisition is to generate digital images from perceptual data , So we need to discretize the continuous image data , Convert to digital images , Its work mainly includes two aspects —— Quantization and sampling . Digitizing amplitude values is called quantization , Digitizing coordinate values is called sampling . This paper mainly explains the concept of image quantization and sampling processing , And pass Python and OpenCV Implement these functions .

One . Image quantization processing

1. summary

Quantification (Quantization), It is the process of converting the continuous range of brightness corresponding to image pixels into a single specific value , That is, the spatial coordinate amplitude value of the original gray image is discretized . The more quantization levels , The richer the image level , The higher the gray resolution , The better the quality of the image ; The lower the level of quantification , The image level is not rich , The lower the gray resolution , There will be a layered image contour , Reduced image quality . chart 1 Is to convert the continuous gray value of an image to 0 to 255 The grayscale process of .

If the quantization level is 2, Two grayscale levels will be used to represent the pixels of the original image (0-255), The gray value is less than 128 Of 0, Greater than or equal to 128 Of 128; If the quantization level is 4, Then four grayscale levels are used to represent the pixels of the original image , The new image will be layered into four colors ,0-64 The interval is taken as 0,64-128 The interval is taken as 64,128-192 The interval is taken as 128,192-255 The interval is taken as 192, By analogy .

chart 2 It's about comparing different levels of quantification “Lena” chart . among (a) The quantification level of is 256,(b) The quantification level of is 64,(c) The quantification level of is 16,(d) The quantification level of is 8,(e) The quantification level of is 4,(f) The quantification level of is 2.

 Insert picture description here


2. operation

Let's talk about Python Image quantization processing related code operations . The core process is to create a temporary picture , Then loop through all the pixels in the original image , Determine the quantization level each pixel should belong to , Finally, the temporary image will be displayed . The following code converts a grayscale image to two quantization levels .

# -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('lena.png')
# Get the image height and width 
height = img.shape[0]
width = img.shape[1]
# Create an image 
new_img = np.zeros((height, width, 3), np.uint8)
# Image quantization operation The quantification level is 2
for i in range(height):
for j in range(width):
for k in range(3): # Corresponding BGR Three components 
if img[i, j][k] < 128:
gray = 0
else:
gray = 128
new_img[i, j][k] = np.uint8(gray)
# Display images 
cv2.imshow("src", img)
cv2.imshow("Quantization", new_img)
# Wait for the display 
cv2.waitKey(0)
cv2.destroyAllWindows()

The output result is shown in the figure 3 Shown , It divides the gray image into two quantization levels .

 Insert picture description here

The following code compares the quantization levels to 2、4、8 The quantitative processing effect of .

# -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('lena.png')
# Get the image height and width 
height = img.shape[0]
width = img.shape[1]
# Create an image 
new_img1 = np.zeros((height, width, 3), np.uint8)
new_img2 = np.zeros((height, width, 3), np.uint8)
new_img3 = np.zeros((height, width, 3), np.uint8)
# The image quantization level is 2 Quantitative processing of 
for i in range(height):
for j in range(width):
for k in range(3): # Corresponding BGR Three components 
if img[i, j][k] < 128:
gray = 0
else:
gray = 128
new_img1[i, j][k] = np.uint8(gray)
# The image quantization level is 4 Quantitative processing of 
for i in range(height):
for j in range(width):
for k in range(3): # Corresponding BGR Three components 
if img[i, j][k] < 64:
gray = 0
elif img[i, j][k] < 128:
gray = 64
elif img[i, j][k] < 192:
gray = 128
else:
gray = 192
new_img2[i, j][k] = np.uint8(gray)
# The image quantization level is 8 Quantitative processing of 
for i in range(height):
for j in range(width):
for k in range(3): # Corresponding BGR Three components 
if img[i, j][k] < 32:
gray = 0
elif img[i, j][k] < 64:
gray = 32
elif img[i, j][k] < 96:
gray = 64
elif img[i, j][k] < 128:
gray = 96
elif img[i, j][k] < 160:
gray = 128
elif img[i, j][k] < 192:
gray = 160
elif img[i, j][k] < 224:
gray = 192
else:
gray = 224
new_img3[i, j][k] = np.uint8(gray)
# Used to display Chinese labels normally 
plt.rcParams['font.sans-serif']=['SimHei']
# Display images 
titles = ['(a) original image ', '(b) quantitative -L2', '(c) quantitative -L4', '(d) quantitative -L8']
images = [img, new_img1, new_img2, new_img3]
for i in range(4):
plt.subplot(2,2,i+1), plt.imshow(images[i], 'gray'),
plt.title(titles[i])
plt.xticks([]),plt.yticks([])
plt.show()

The output result is shown in the figure 4 Shown , This code calls matplotlib.pyplot The library draws four images , among (a) Represents the original image ,(b) It means that the level is 2 Quantitative processing of ,(c) It means that the level is 4 Quantitative processing of ,(d) It means that the level is 8 Quantitative processing of .

 Insert picture description here


3.K-Means Clustering quantitative processing

The quantization in the previous section is done by traversing all the pixels in the image , The amplitude value of gray image is discretized . This section is supplemented by a K-Means The quantization process of clustering algorithm , It can transform color images RGB Pixel color segmentation and color quantization . Be careful , In the 19th article, it introduces in detail K-Means Clustering knowledge , This section only takes the reader back to the method .

# coding: utf-8
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('nv.png')
# The two-dimensional pixel of the image is converted into one dimension 
data = img.reshape((-1,3))
data = np.float32(data)
# Defining the center (type,max_iter,epsilon)
criteria = (cv2.TERM_CRITERIA_EPS +
cv2.TERM_CRITERIA_MAX_ITER, 10, 1.0)
# Set the label 
flags = cv2.KMEANS_RANDOM_CENTERS
#K-Means clustering Gather together 4 class 
compactness, labels, centers = cv2.kmeans(data, 4, None, criteria, 10, flags)
# Image conversion back to uint8 Two dimensional type 
centers = np.uint8(centers)
res = centers[labels.flatten()]
dst = res.reshape((img.shape))
# Image to RGB Show 
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
dst = cv2.cvtColor(dst, cv2.COLOR_BGR2RGB)
# Used to display Chinese labels normally 
plt.rcParams['font.sans-serif']=['SimHei']
# Display images 
titles = [' original image ', ' Clustering quantization K=4']
images = [img, dst]
for i in range(2):
plt.subplot(1,2,i+1), plt.imshow(images[i], 'gray'),
plt.title(titles[i])
plt.xticks([]),plt.yticks([])
plt.show()

The output result is shown in the figure 5 Shown , It passes through K-Means The clustering algorithm integrates the gray levels of color character images into four colors .

 Insert picture description here


Two . Image sampling processing

1. summary

Image sampling (Image Sampling) Processing is to divide a continuous image into M×N Grid (s) , Each grid is represented by a luminance or grayscale value , Its schematic diagram is shown in the figure 6 Shown .

 Insert picture description here

The larger the interval between image sampling , The smaller the number of pixels in the resulting image , The lower the spatial resolution , The worse the image quality , There's even a mosaic effect ; contrary , The smaller the interval between image sampling , The more pixels you get , Higher spatial resolution , The better the image quality , But the amount of data will increase accordingly . chart 7 Show different sampling intervals of “Lena” chart , Among them (a) For the original image , chart (b) by 128×128 Image sampling effect of , The graph is 64×64 Image sampling effect of , chart (d) by 32×32 Image sampling effect of , chart (e) by 16×16 Image sampling effect of , chart (f) by 8×8 Image sampling effect of .

 Insert picture description here

The quality of digital image largely depends on the number of samples and gray level used in quantization and sampling . Images in real life , All of them need to be converted into digital images after discretization , So as to carry out the following computer processing and image recognition and other operations . chart 8 It shows the process of transforming life images into digital images .

 Insert picture description here


2. operation

Let's talk about Python Image sampling processing related code operations . The core process is to create a temporary picture , Set the size of the area to be sampled ( Such as 16×16), Then loop through all the pixels in the original image , The values of pixels in the sampling area are the same ( For example, the gray value of the pixel in the upper left corner ), Finally, image sampling processing is realized . The following code is for 16×16 The sampling process .

# -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('lena.png')
# Get the image height and width 
height = img.shape[0]
width = img.shape[1]
# The sample is converted to 16*16 Area 
numHeight = int(height/16)
numWidth = int(width/16)
# Create an image 
new_img = np.zeros((height, width, 3), np.uint8)
# Image cyclic sampling 16*16 Area 
for i in range(16):
# obtain Y coordinate 
y = i*numHeight
for j in range(16):
# obtain X coordinate 
x = j*numWidth
# Get fill color Top left pixel 
b = img[y, x][0]
g = img[y, x][1]
r = img[y, x][2]
# Loop setting small area sampling 
for n in range(numHeight):
for m in range(numWidth):
new_img[y+n, x+m][0] = np.uint8(b)
new_img[y+n, x+m][1] = np.uint8(g)
new_img[y+n, x+m][2] = np.uint8(r)
# Display images 
cv2.imshow("src", img)
cv2.imshow("Sampling", new_img)
# Wait for the display 
cv2.waitKey(0)
cv2.destroyAllWindows()

The output result is shown in the figure 8 Shown , It samples grayscale images into 16×16 Region .

 Insert picture description here

Again , Color images can be sampled , The following code samples the color landscape image into 8×8 The mosaic area of .

# -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('scenery.png')
# Get the image height and width 
height = img.shape[0]
width = img.shape[1]
# The sample is converted to 8*8 Area 
numHeight = int(height/8)
numwidth = int(width/8)
# Create an image 
new_img = np.zeros((height, width, 3), np.uint8)
# Image cyclic sampling 8*8 Area 
for i in range(8):
# obtain Y coordinate 
y = i*numHeight
for j in range(8):
# obtain X coordinate 
x = j*numwidth
# Get fill color Top left pixel 
b = img[y, x][0]
g = img[y, x][1]
r = img[y, x][2]
# Loop setting small area sampling 
for n in range(numHeight):
for m in range(numwidth):
new_img[y+n, x+m][0] = np.uint8(b)
new_img[y+n, x+m][1] = np.uint8(g)
new_img[y+n, x+m][2] = np.uint8(r)
# Display images 
cv2.imshow("src", img)
cv2.imshow("Sampling", new_img)
# Wait for the display 
cv2.waitKey(0)
cv2.destroyAllWindows()

The output result is shown in the figure 9 Shown , It samples color landscape images into 8×8 Region .

 Insert picture description here

But there is a problem with the above code , The width of the sample area cannot be divided by the length of the image , The right and bottom areas of the output image are not sampled . Here, readers are recommended to do a remainder operation , The area that can not be divided is also sampled accordingly .


3. Local mosaic processing

The previous code is to sample the entire image , So how to mosaic the local area of the image ? The following code implements this function . When the mouse is pressed , It's able to mosaic the area the mouse is dragging , And press “s” Key to save the image to local .

# -- coding:utf-8 --
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
im = cv2.imread('people.png', 1)
# Set the left mouse button to turn on 
en = False
# Mouse events 
def draw(event, x, y, flags, param):
global en
# Press the left mouse button to open en value 
if event==cv2.EVENT_LBUTTONDOWN:
en = True
# Press the left mouse button and move 
elif event==cv2.EVENT_MOUSEMOVE and flags==cv2.EVENT_LBUTTONDOWN:
# Call function to play mosaic 
if en:
drawMask(y,x)
# Click the left mouse button to end the operation 
elif event==cv2.EVENT_LBUTTONUP:
en = False
# Image local sampling operation 
def drawMask(x, y, size=10):
#size*size Sampling processing 
m = int(x / size * size)
n = int(y / size * size)
print(m, n)
#10*10 The region is set to the same pixel value 
for i in range(size):
for j in range(size):
im[m+i][n+j] = im[m][n]
# Open the dialog box 
cv2.namedWindow('image')
# call draw Function to set the mouse operation 
cv2.setMouseCallback('image', draw)
# Loop processing 
while(1):
cv2.imshow('image', im)
# Press ESC Key to exit 
if cv2.waitKey(10)&0xFF==27:
break
# Press s Key to save the picture 
elif cv2.waitKey(10)&0xFF==115:
cv2.imwrite('sava.png', im)
# Exit window 
cv2.destroyAllWindows()

The output result is shown in the figure 10 Shown , It mosaics the faces of the characters , Press down S Key to save the picture , Press down ESC Key to exit .

 Insert picture description here



3、 ... and . Image pyramid

The image sampling process described above can reduce the size of the image , This section will supplement the knowledge of image pyramid , Learn about the up and down sampling of images pyrUp() and pyrDown() function .

Image pyramid is a set of subgraphs with different resolution rates from a group of images , It is a kind of multi-scale expression of image , To interpret the structure of an image in terms of multiresolution , It is mainly used for image segmentation or compression . The pyramid of an image is a series of pyramid shaped pyramids with gradually decreasing resolution , And from the same original image set . Pictured 11 Shown , It includes four layers of images , Compare this layer by layer image to a pyramid . The image pyramid can be obtained by step down sampling , Stop sampling until a certain termination condition is reached , In down sampling , The higher the level , The smaller the image , Lower resolution .

 Insert picture description here

There are two ways to generate image pyramid —— Down sampling 、 Take an upward sample . In the figure 11 in , The image G0 Convert to G1、G2、G3, The process of decreasing image resolution is called down sampling ; take G3 Convert to G2、G1、G0, The process of increasing image resolution is called up sampling .

1. Image down sampling

In image down sampling , The most used is the Gauss pyramid . It will be on the image Gi Gaussian kernel convolution , And delete all even rows and columns in the original image , And finally shrink the image . among , Gaussian kernel convolution is the weighted average process of the whole image , Value of each pixel , By itself and other pixel values in the neighborhood ( Different weights ) After weighted average, we get . common 3×3 and 5×5 The Gaussian kernel is as follows :

 Insert picture description here

Gaussian kernel convolution makes pixels near the center more important , Calculate the weighted average of the surrounding pixels , Pictured 12 Shown , Its center position weight is the highest 0.4.

 Insert picture description here

Obvious , original image Gi have M×N Pixel , After sampling down , The resulting image Gi+1 have M/2×N/2 Pixel , Only a quarter of the original . By iterating over and over the original input image, the whole pyramid will be obtained . Be careful , Because even rows and columns are deleted every time the sample is down , So it keeps losing information about the image .

stay OpenCV in , The function used for down sampling is pyrDown(), The prototype is shown below :

  • dst = pyrDown(src[, dst[, dstsize[, borderType]]])
    – src Represents the input image ,
    – dst Output image , Same size and type as input image
    – dstsize Represents the size of the output image , The default value is Size()
    – borderType Represents the pixel extrapolation method , See cv::bordertypes

The code for sampling down is as follows :

# -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('nv.png')
# Image down sampling 
r = cv2.pyrDown(img)
# Display images 
cv2.imshow('original', img)
cv2.imshow('PyrDown', r)
cv2.waitKey()
cv2.destroyAllWindows()

The output result is shown in the figure 13 Shown , It compresses the original image into a quarter of the original image .

 Insert picture description here

Refer to the following documents for the code of multiple down sampling .

# -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('nv.png')
# Image down sampling 
r1 = cv2.pyrDown(img)
r2 = cv2.pyrDown(r1)
r3 = cv2.pyrDown(r2)
# Display images 
cv2.imshow('original', img)
cv2.imshow('PyrDown1', r1)
cv2.imshow('PyrDown2', r2)
cv2.imshow('PyrDown3', r3)
cv2.waitKey()
cv2.destroyAllWindows()

The output result is shown in the figure 14 Shown , Each down sampling is a quarter of the last time , And the sharpness of the image will be reduced .

 Insert picture description here


2. Image up sampling

Sampling up the image is the process of continuously putting images from small images . It expands the image in each direction to the original image 2 times , Add rows and columns with 0 Fill in , And use the “ Down sampling ” The same convolution kernel times 4, And then convolution with the enlarged image , In order to obtain “ New pixels ” The new value of . Pictured 15 Shown , It's in the original pixel 45、123、89、149 A new row and a column are added between 0 The pixel .

 Insert picture description here

Be careful , The enlarged image is blurry than the original image . meanwhile , Sampling up and sampling down are not reciprocal operations , After two operations , It's impossible to restore the original image .

stay OpenCV in , The function used for up sampling is pyrUp(), The prototype is shown below :

  • dst = pyrUp(src[, dst[, dstsize[, borderType]]])
    – src Represents the input image ,
    – dst Output image , Same size and type as input image
    – dstsize Represents the size of the output image , The default value is Size()
    – borderType Represents the pixel extrapolation method , See cv::bordertypes

The code for sampling up is as follows :

# -*- coding: utf-8 -*-
# BY:Eastmount CSDN 2020-11-10
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('lena.png')
# Image up sampling 
r = cv2.pyrUp(img)
# Display images 
cv2.imshow('original', img)
cv2.imshow('PyrUp', r)
cv2.waitKey()
cv2.destroyAllWindows()

The output result is shown in the figure 16 Shown , It expands the original image to four times the original image , That is to say, take a sample up .

 Insert picture description here

Refer to the following documents for the code of multiple upward sampling .

# -*- coding: utf-8 -*-
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Read the original image 
img = cv2.imread('lena2.png')
# Image up sampling 
r1 = cv2.pyrUp(img)
r2 = cv2.pyrUp(r1)
r3 = cv2.pyrUp(r2)
# Display images 
cv2.imshow('original', img)
cv2.imshow('PyrUp1', r1)
cv2.imshow('PyrUp2', r2)
cv2.imshow('PyrUp3', r3)
cv2.waitKey()
cv2.destroyAllWindows()

The output result is shown in the figure 17 Shown , Each up sampling is four times the size of the last image , But the clarity of the image will be reduced .

 Insert picture description here



Four . Summary of this chapter

In this paper, the sampling and image processing are introduced , From basic probability to operation , And then to expand to give a comprehensive explanation , And added based on K-Means The quantitative processing of clustering algorithm and local mosaic effect processing , Finally, the knowledge of image pyramid is added . The knowledge points in this chapter can transform images in life into digital images , Better for the subsequent image processing to provide help . I hope this basic article will be helpful to readers , I also hope that these knowledge points can be engaged in Python Image processing related project practice or scientific research provides a certain basis .

Time ticking away , This is my in CSDN Write down the eighth year-end summary , Earlier than ever .《 Sensitive and thoughtful , Accomplish sth. lasting by leading a quiet life 》, Only in this article to commemorate this year of wind and rain , This year of Thanksgiving . It's only half written on the train , In these two days , Think far , Miss Jun O(∩_∩)O

 Insert picture description here

2020 year 8 month 18 A new one “ Na Zhang AI Safe house ”, centered Python Big data analysis 、 Cyberspace Security 、 Artificial intelligence 、Web Penetration and attack and defense techniques are explained , Share... At the same time CCF、SCI、 The implementation of the algorithm of South core and North nuclear paper . Nazhang's house will be more systematic , And reconstruct all of the author's articles , Explain from scratch Python And security , I have been writing articles for nearly ten years , I really want to share what I have learned, felt and done , Please give me more advice , We sincerely invite your attention ! thank you .

 Insert picture description here

(By:Eastmount 2020-11-10 Late at night 10 Order the night in Wuhan http://blog.csdn.net/eastmount/ )


reference :
[1] By Gonzalez . digital image processing ( The first 3 edition )[M]. Beijing : Electronic industry press ,2013.
[2] yunfung. Image sampling and quantization of digital image basis (Image Sampling and Quantization)[EB/OL]. (2017-04-23). https://www.cnblogs.com/yunfung/p/6753337.html.
[3] Ruan Qiuqi . Digital image processing ( The first 3 edition )[M]. Beijing : Electronic industry press ,2008.
[4] zqhwando. Sampling and quantization in image processing [EB/OL]. (2017-12-22). https://blog.csdn.net/zqhwando/article/details/78871140.
[5] eastmount. [ digital image processing ] 3、 ... and .MFC Realize image grayscale 、 Detailed explanation of sampling and quantization functions [EB/OL]. (2015-05-28). https://blog.csdn.net/eastmount/article/details/46010637.
[6] Shikou . Python + opencv Realize image mosaic [EB/OL]. (2017-11-08). https://blog.csdn.net/weixin_38283159/article/details/78479791.
[7] Mao Xingyun , Cold snow flies . OpenCV3 Introduction to programming [M]. Beijing : Electronic industry press ,2015.

版权声明
本文为[Eastmount]所创,转载请带上原文链接,感谢

  1. 利用Python爬虫获取招聘网站职位信息
  2. Using Python crawler to obtain job information of recruitment website
  3. Several highly rated Python libraries arrow, jsonpath, psutil and tenacity are recommended
  4. Python装饰器
  5. Python实现LDAP认证
  6. Python decorator
  7. Implementing LDAP authentication with Python
  8. Vscode configures Python development environment!
  9. In Python, how dare you say you can't log module? ️
  10. 我收藏的有关Python的电子书和资料
  11. python 中 lambda的一些tips
  12. python中字典的一些tips
  13. python 用生成器生成斐波那契数列
  14. python脚本转pyc踩了个坑。。。
  15. My collection of e-books and materials about Python
  16. Some tips of lambda in Python
  17. Some tips of dictionary in Python
  18. Using Python generator to generate Fibonacci sequence
  19. The conversion of Python script to PyC stepped on a pit...
  20. Python游戏开发,pygame模块,Python实现扫雷小游戏
  21. Python game development, pyGame module, python implementation of minesweeping games
  22. Python实用工具,email模块,Python实现邮件远程控制自己电脑
  23. Python utility, email module, python realizes mail remote control of its own computer
  24. 毫无头绪的自学Python,你可能连门槛都摸不到!【最佳学习路线】
  25. Python读取二进制文件代码方法解析
  26. Python字典的实现原理
  27. Without a clue, you may not even touch the threshold【 Best learning route]
  28. Parsing method of Python reading binary file code
  29. Implementation principle of Python dictionary
  30. You must know the function of pandas to parse JSON data - JSON_ normalize()
  31. Python实用案例,私人定制,Python自动化生成爱豆专属2021日历
  32. Python practical case, private customization, python automatic generation of Adu exclusive 2021 calendar
  33. 《Python实例》震惊了,用Python这么简单实现了聊天系统的脏话,广告检测
  34. "Python instance" was shocked and realized the dirty words and advertisement detection of the chat system in Python
  35. Convolutional neural network processing sequence for Python deep learning
  36. Python data structure and algorithm (1) -- enum type enum
  37. 超全大厂算法岗百问百答(推荐系统/机器学习/深度学习/C++/Spark/python)
  38. 【Python进阶】你真的明白NumPy中的ndarray吗?
  39. All questions and answers for algorithm posts of super large factories (recommended system / machine learning / deep learning / C + + / spark / Python)
  40. [advanced Python] do you really understand ndarray in numpy?
  41. 【Python进阶】Python进阶专栏栏主自述:不忘初心,砥砺前行
  42. [advanced Python] Python advanced column main readme: never forget the original intention and forge ahead
  43. python垃圾回收和缓存管理
  44. java调用Python程序
  45. java调用Python程序
  46. Python常用函数有哪些?Python基础入门课程
  47. Python garbage collection and cache management
  48. Java calling Python program
  49. Java calling Python program
  50. What functions are commonly used in Python? Introduction to Python Basics
  51. Python basic knowledge
  52. Anaconda5.2 安装 Python 库(MySQLdb)的方法
  53. Python实现对脑电数据情绪分析
  54. Anaconda 5.2 method of installing Python Library (mysqldb)
  55. Python implements emotion analysis of EEG data
  56. Master some advanced usage of Python in 30 seconds, which makes others envy it
  57. python爬取百度图片并对图片做一系列处理
  58. Python crawls Baidu pictures and does a series of processing on them
  59. python链接mysql数据库
  60. Python link MySQL database