当前位置:网站首页>Opencv learning log 30 -- histogram equalization
Opencv learning log 30 -- histogram equalization
2022-07-06 15:43:00 【@Spring sauce】
Preface
This article is mainly about opencv Histogram equalization in image processing algorithm .
One 、 Histogram equalization
// The second question is Histogram equalization
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
float chance[256];
int main()
{
cv::Mat src_color = imread("C://Users//john//Desktop//1.jpg");
//cv::imshow("src_color",src_color);
std::vector<cv::Mat> channels;
cv::split(src_color, channels);
cv::Mat B = channels.at(0);
cv::Mat G = channels.at(1);
cv::Mat R = channels.at(2);
cv::imshow("redFI", R);
cv::imshow("blueFI", B);
cv::imshow("greenFI", G);
cv::imshow("original MatFI", src_color);
equalizeHist(B, B);
equalizeHist(G, G);
equalizeHist(R, R);
cv::imshow("red", R);
cv::imshow("blue", B);
cv::imshow("green", G);
cv::imshow("original Mat", src_color);
waitKey(0);
}
summary
1. The code can run directly , If you don't understand, you can leave a message .
2. Missing material pictures , Follow up, thank you .
边栏推荐
- STM32如何使用STLINK下载程序:点亮LED跑马灯(库版本)
- LeetCode#36. Effective Sudoku
- csapp shell lab
- mysql导入数据库报错 [Err] 1273 – Unknown collation: ‘utf8mb4_0900_ai_ci’
- Flink 使用之 CEP
- LeetCode#237. Delete nodes in the linked list
- ucore lab5
- C语言数组的概念
- Es6--- two methods of capturing promise status as failed
- Medical colposcope Industry Research Report - market status analysis and development prospect forecast
猜你喜欢
mysql导入数据库报错 [Err] 1273 – Unknown collation: ‘utf8mb4_0900_ai_ci’
B - 代码派对(女生赛)
Visual analysis of data related to crawling cat's eye essays "sadness flows upstream into a river" | the most moving film of Guo Jingming's five years
JS --- detailed explanation of JS facing objects (VI)
JS --- all knowledge of JS objects and built-in objects (III)
Learning record: USART serial communication
ucore lab 6
学习记录:使用STM32F1看门狗
动态规划前路径问题优化方式
Record of force deduction and question brushing
随机推荐
mysql导入数据库报错 [Err] 1273 – Unknown collation: ‘utf8mb4_0900_ai_ci’
China's salt water membrane market trend report, technological innovation and market forecast
ucore lab 6
JS --- all basic knowledge of JS (I)
Accounting regulations and professional ethics [1]
Optimization method of path problem before dynamic planning
Research Report of exterior wall insulation system (ewis) industry - market status analysis and development prospect prediction
Truck History
ucorelab3
Market trend report, technological innovation and market forecast of pneumonia drugs obtained by Chinese hospitals
TCP的三次握手与四次挥手
UCORE Lab 1 system software startup process
LeetCode#53. Maximum subarray sum
Learning record: USART serial communication
C语言必背代码大全
区间和------离散化
STM32 how to use stlink download program: light LED running light (Library version)
学习记录:串口通信和遇到的错误解决方法
0-1背包问题(一)
E. Breaking the Wall