当前位置:网站首页>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 .
边栏推荐
- Market trend report, technical innovation and market forecast of Chinese hospital respiratory humidification equipment
- JS --- all basic knowledge of JS (I)
- Find 3-friendly Integers
- Medical colposcope Industry Research Report - market status analysis and development prospect forecast
- FSM and I2C experiment report
- LeetCode#36. Effective Sudoku
- Cost accounting [21]
- LeetCode#412. Fizz Buzz
- 学习记录:STM32F103 时钟系统概述工作原理
- 编程到底难在哪里?
猜你喜欢
FSM and I2C experiment report
STM32学习记录:LED灯闪烁(寄存器版)
Determine the Photo Position
LeetCode#237. Delete nodes in the linked list
JS --- detailed explanation of JS facing objects (VI)
LeetCode#19. Delete the penultimate node of the linked list
ucorelab3
ucore lab 6
Take you to use wxpy to create your own chat robot (plus wechat interface basic data visualization)
ucorelab3
随机推荐
Cost accounting [13]
学习记录:TIM—电容按键检测
C 基本语法
差分(一维,二维,三维) 蓝桥杯三体攻击
Research Report on market supply and demand and strategy of China's land incineration plant industry
Accounting regulations and professional ethics [3]
Research Report of pharmaceutical solvent industry - market status analysis and development prospect prediction
编程到底难在哪里?
Path problem before dynamic planning
学习记录:如何进行PWM 输出
Cost accounting [23]
STM32 learning record: LED light flashes (register version)
HDU - 6024 Building Shops(女生赛)
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
学习记录:USART—串口通讯
Learning record: use stm32f1 watchdog
Cost accounting [21]
动态规划前路径问题优化方式
Record of brushing questions with force deduction -- complete knapsack problem (I)
JS --- detailed explanation of JS facing objects (VI)