Original link:tecdat.cn/?p=9015
Original source:Tuo End number according to the tribe public number
In this article, I’ll walk you through some of the basic features of image processing. Feature extraction. But here we need more in-depth data cleansing. But data cleansing is done on data sets, tables, text, etc. How do you do it graphically?
Import the image
Importing images in Python is easy. The following code will help you import images on Python:
image = imread(r"C:\Users\Tavish\Desktop\7.jpg")
show_img(image)
Copy the code
Understand the basic data
The image has many colors and many pixels. To visualize how the image is stored, consider each pixel as a unit in the matrix. The cell now contains three different intensity messages, corresponding to red, green, and blue. Therefore, the RGB image becomes a 3-D matrix.
Red, yellow = image. The copy (), image. The copy () red / :, :, (1, 2) = 0 yellow [:, :, 2) = 0 show_images (images = / red, yellow, titles=['Red Intensity','Yellow Intensity'])Copy the code
Convert the image to a two-dimensional matrix
In feature extraction, it becomes simpler if the image is compressed into a two-dimensional matrix. This is done by grayscale or binarization.
This is how to convert an RGB image to grayscale:
Now, let’s try to binarize the gray image. This is done by finding thresholds and marking grayscale pixels. In this article, I use Otsu’s approach to find thresholds.
Fuzzy image
The final section we will cover in this article is more relevant to feature extraction: image blurring. Grayscale or binary images sometimes capture more images than they need, in which case blurring is very convenient.
In the image above, after blurring, we can clearly see that the shoe has now reached the same strength level as the railway track. Therefore, this technique is very convenient in many image processing scenarios.
Most welcome insight
1. An introduction to image processing in Python using OpencV
2. Partial least squares regression (PLSR) and principal component regression (PCR) in MATLAB
3. VMD variational modal decomposition is used in MATLAB
4. Hampel filtering was used to remove outliers by MATLAB
5. Matlab uses empirical mode decomposition EMD – to denoise the signal
6. Partial least Squares regression (PLSR) and Principal component Regression (PCR) in MATLAB
7. Matlab uses Copula simulation to optimize market risk
8. R language advanced image processing
9. Matlab realizes the estimation of MCMC’s Markov switched ArMA-GarCH model