File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ Mat Bright (Mat src, int cb_) {
2
+ int row = src.rows ;
3
+ int col = src.cols ;
4
+ if (cb_ < -255 )
5
+ cb_ = -255 ;
6
+ if (cb_ > 255 )
7
+ cb_ = 255 ;
8
+ Mat dst (row, col, CV_8UC3);
9
+ for (int i = 0 ; i < row; i++) {
10
+ for (int j = 0 ; j < col; j++) {
11
+ for (int k = 0 ; k < 3 ; k++) {
12
+ int val = src.at <Vec3b>(i, j)[k] + cb_;
13
+ if (val < 0 ) val = 0 ;
14
+ else if (val > 255 ) val = 255 ;
15
+ dst.at <Vec3b>(i, j)[k] = val;
16
+ }
17
+ }
18
+ }
19
+ return dst;
20
+ }
Original file line number Diff line number Diff line change 28
28
- PS算术加法和减法.cpp 实现了对输入的两张图像进行加法或减法的运算合成新图像。
29
29
- PS色彩均衡化算法.cpp 实现了PS色彩均衡化算法,原理请看:https://blog.csdn.net/just_sort/article/details/94430129
30
30
- PS负像算法.cpp 实现了PS负像算法。
31
+ - PS亮度调节(曝光不足或过量).cpp 实现了PS中的亮度调整,调整曝光不足和过量。
31
32
You can’t perform that action at this time.
0 commit comments