当前位置:网站首页>Image processing 7- image enhancement
Image processing 7- image enhancement
2022-06-30 06:12:00 【< Hunter>】
Image processing series :
The image processing 1- Classical spatial domain enhancement —— Grayscale mapping
The image processing 2- Classical spatial domain enhancement —— Histogram equalization
The image processing 3- Classical spatial domain enhancement —— Spatial filtering
The image processing 4- Fourier transform of the image
The image processing 5- Image noise
The image processing 6- Otsu image threshold segmentation
In this paper, the source code See my resources , Free download .
Image enhancement
(1) Download three pictures on the Internet
(2) Preprocess the picture ;
(3) Export the preprocessed picture .
1. Import package
Pictured 1.1, Import the package to use .

chart 1.1 Import the package you need to use
2. Images are downloaded
Pictured 1.2, Use this code to automatically download pictures , Download photos from Bing pictures specific search results .

chart 1.2 Image automatic crawling code
3. Various pretreatment
This section attempts to use a variety of image enhancement methods to process images , And show the effect .
a. Read the picture
Use as shown in the figure 1.3 Code for image reading , And display .

chart 1.3 Picture reading and display
b. Random scaling
Use the figure 1.4 Code for image scaling , And display .

chart 1.4 Picture scaling and display
c. Random position clipping and center position clipping
Use the figure 1.5 Code for random position clipping and display .

chart 1.5 Random position clipping
Use the figure 1.6 Code for the central position of the crop , And display .

chart 1.6 Center position clipping
d. Random horizontal and vertical flips
Use the figure 1.7 Code to flip horizontally , And display .

chart 1.7 Random horizontal flip
Use the figure 1.8 Code to flip vertically , And display .

chart 1.8 Random vertical flip
e. Random angle flip
Use the figure 1.9 Code for random angle flip and display .

chart 1.9 Random angle flip
f. chroma 、 brightness 、 saturation 、 Contrast 、 Gray change
Use the figure 1.10 Code to change chromaticity and display .

chart 1.10 Chromaticity transformation
Use the figure 1.11 Code to change the brightness and display .

chart 1.11 Brightness conversion
Use the figure 1.12 Code for saturation transformation , And display .

chart 1.12 Saturation change
Use the figure 1.13 Code for contrast change , And display .

chart 1.13 Contrast change
Use as shown in the figure 1.14 Code for grayscale changes , And display .

chart 1.14 Gray change
g. expand
Use the figure 1.15 Code to extend , And display .

chart 1.15 expand
h. Use PiPeLine change
Use the figure 1.16 The series of operations you want to perform , Encapsulate into a compose, Combine and change the pictures , And display .

chart 1.16 Use PiPeLine change
4. Automatic processing of batch images
Combined with the above attempts , We can use graphs 1.17 The code first converts a series of random transformations , Package into a PiPeLine

chart 1.17 Batch image enhancement automatic preprocessing code
in , Then read the photos in the picture folder in batches , Batch processing of each photo , And save it to a folder. The effect is shown in Figure 1.18.

chart 1.18 Automated image enhancement
边栏推荐
猜你喜欢
随机推荐
ES6 extended operator (...)
DOM (document object model) document XML file object model
Prototype and prototype chain in JS
【学习强化学习】总目录
requests. The difference between session () sending requests and using requests to send requests directly
文件操作IO-Part1
Win10 /11 开热点无法上网问题
Résoudre le problème de décompiler la compilation normale
MySQL日志管理、数据备份、恢复
There is a group of students' score {99, 85, 82, 63, 60}. To add a student's score, insert it into the score sequence and keep the descending order
关于Glide加载图片模糊不清楚
Data read / write: realize data read / write function based on C # script in unity
PHP knowledge points
MySQL storage system
New project folder based on PIO plug-in in vscode -- Interpretation
Ten years' miscellaneous thoughts
Uniapp wechat applet returns to the previous page and refreshes
Common mistakes daily practice 01
Golang's handwritten Web Framework
Vscode configuration proxy








