当前位置:网站首页>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 .
边栏推荐
- Cost accounting [17]
- Research Report on market supply and demand and strategy of China's land incineration plant industry
- STM32學習記錄:輸入捕獲應用
- 12306: mom, don't worry about me getting the ticket any more (1)
- E. Breaking the Wall
- cs零基础入门学习记录
- Market trend report, technical innovation and market forecast of Chinese hospital respiratory humidification equipment
- LeetCode#36. Effective Sudoku
- ucore lab7
- Research Report on market supply and demand and strategy of Chinese graphic screen printing equipment industry
猜你喜欢
学习记录:STM32F103 时钟系统概述工作原理
C语言数组的概念
Stm32 dossiers d'apprentissage: saisie des applications
mysql导入数据库报错 [Err] 1273 – Unknown collation: ‘utf8mb4_0900_ai_ci’
Learning record: how to perform PWM output
MATLAB实例:阶跃函数的两种表达方式
Unpleasant error typeerror: cannot perform 'ROR_‘ with a dtyped [float64] array and scalar of type [bool]
UCORE Lab 1 system software startup process
MATLAB综合练习:信号与系统中的应用
csapp shell lab
随机推荐
0-1背包問題(一)
Cost accounting [16]
cs零基础入门学习记录
ucorelab3
B - 代码派对(女生赛)
学习记录:使用STM32F1看门狗
STM32学习记录:玩转按键控制蜂鸣器和LED
HDU-6025-Coprime Sequence(女生赛)
LeetCode#118. Yanghui triangle
STM32学习记录:LED灯闪烁(寄存器版)
0 - 1 problème de sac à dos (1)
Learning record: STM32F103 clock system overview working principle
Printing quality inspection and verification system Industry Research Report - market status analysis and development prospect forecast
LeetCode#412. Fizz Buzz
用C语言写网页游戏
csapp shell lab
LeetCode#62. Different paths
力扣刷题记录--完全背包问题(一)
学习记录:USART—串口通讯
7-1 懂的都懂 (20 分)