今日学习
Linux 3h
ML算法 3h
项目 3h
ML代码地址
基本图像处理整理
概述
直方图(Histograms)
- The intensity histogram shows how individual brightness levels are occupied in an image;
- the image contrast(图像对比度) is measured by the range of brightness levels.
- we can stretch the image(拉伸图像) to use them all, and the image would become clearer.
- operator(算子) histogram: the operator works by counting up the number of image points that have an intensity at a particular value. These counts for the different values form the overall histogram. The counts are then returned as the 2D histogram (a vector of the count values) which can be plot-ted as a graph.
点算子(Point operators)
基本点运算:OpenCV中的数学运算(线性点运算)
直方图正规化(Histogram normalization)
直方图均衡化(Histogram equalization)
【OpenCV-Python】 直方图均衡化
OpenCV---直方图的应用(均衡化和图像比较)
阈值处理(hresholding)
图像阈值处理—OpenCV-Python
openCV:图像的阈值处理
This operator selects pixels that have a particular value or are within a specified range. It can be used to find objects within a picture if their brightness level (or range) is known. This implies that the object’s brightness must be known as well.
- (均一阈值处理)uniform thresholding
In uniform thresholding, pixels above a specified level are set to white, those below the specified level are set to black. - (自适应阈值处理)adaptive thresholding
Ostu方法
群运算(Group operations)
图像平滑/2D卷积/图像平滑/平均值法/高斯模糊/中值模糊/双边滤波
卷积模板
Group operations calculate new pixel values from a pixel’s neighborhood by using a “grouping” process. The group operation is usually expressed in terms of template convolution(模板卷积) where the template is a set of weighting coefficients(权重系数). The template is usually square, and its size is usually odd to ensure that it can be posi-tioned appropriately.
New pixel values are calculated by placing the template at the point of interest. Pixel values are multiplied by the corresponding weighting coefficient and added to an overall sum. The sum (usually) evaluates a new value for the center pixel (where the template is centered) and this becomes the pixel in a, new, output image.
平均算子( Averaging operator)
The effect of averaging is to reduce noise, which is its advantage. An associated disadvantage is that averaging causes blurring that reduces detail in an image.
the Fourier transform actually gives an alternative method to implement template convolution and to speed it up, for larger templates。.
高斯平滑算子(Gaussian averaging operator)
The Gaussian function essentially removes the influence of points greater than 3 σ in (radial) distance from the center of the template.
统计算子( statistical operators)
中值滤波( Median filter)
The median is another frequently used statistic; the median is the center of a rank-ordered distribution. The median is usually taken from a template centered on the point of interest. Given the arrangement of pixels in Figure 3.19(a), the pixel values are arranged into a vector format (Figure 3.19(b)). The vector is then sorted into ascending order (Figure 3.19(c)). The median is the central component of the sorted vector; this is the fifth component since we have nine values.
The median has a well-known ability to remove salt and pepper noise.
众数滤波( Mode filter)
The action of the 9 3 9 truncated median operator(截断中值算子) (Figure 3.23(b)) is to remove noise while retaining feature boundaries, while a larger operator shows better effect (Figure 3.23(c)).
各向异性扩散
力场变换
统计算子对比
the mean operator removes much noise but blurs feature bound-aries;
Gaussian averaging retains more features but shows little advantage overdirect averaging (it is not Gaussian-distributed noise anyway);
the median operator retains some noise but with clear feature boundaries, whereas the truncated median removes more noise but along with picture detail.