登录
首页 » c++ » 数字图像处理增加亮点和对比度

数字图像处理增加亮点和对比度

于 2022-05-14 发布 文件大小:3.68 MB
0 80
下载积分: 2 下载次数: 1

代码说明:

#include#includeusing namespace cv;int main() {Mat src,dst;src = imread("D:/ps/circle.png");int rows = src.rows;int cols = src.cols;float alpht = 1.8;float bea = 50;dst = Mat::zeros(src.size(), src.type());for (int row = 0; row < rows; row++) {for (int col = 0; col < cols; col++) {int b = src.at(row, col)[0];int g = src.at(row, col)[1];int r = src.at(row, col)[2];dst.at(row, col)[0] = saturate_cast(alpht*b + bea);dst.at(row, col)[1] = saturate_cast(alpht*g + bea);dst.at(row, col)[2] = saturate_cast(alpht*r + bea);}}namedWindow("s", CV_WINDOW_AUTOSIZE);namedWindow("d", CV_WINDOW_AUTOSIZE);imshow("s", src);imshow("d", dst);waitKey(0);r

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C# 数据排序 示例代码
    C# 数据排序 示例代码
    2015-04-22下载
    积分:1
  • myvcamp-foryou
    虚拟摄像头 directshow技术 采用gdi+截取位图(this is a Virtual Camera,mey be help you)
    2012-07-23 18:03:26下载
    积分:1
  • pwm-at91sam7a
    at91sam7a3的pwm学习例程,运行于iar开发环境,调试通过(at91sam7a3 pwm learning routines, running in the the iar development environment, debugging through)
    2012-10-24 15:33:48下载
    积分:1
  • Graphic
    一个具备线,矩形,椭圆的画图程序,可以设置颜色,宽度,字体(One with lines, rectangles, ellipses drawing program, you can set the color, width, font)
    2010-05-21 09:01:03下载
    积分:1
  • MmDemo
    vc和matlab混合编程,在vc中调用matlab的函数进行计算和处理,本程序中调用了matlab图像处理函数打开图像并进行灰度处理(vc and matlab mixed programming, matlab function calls are calculated and processed in the vc, the program calls the matlab image processing function to open and grayscale image processing)
    2014-02-05 20:05:21下载
    积分:1
  • 项目代码风格要求
    类型、属性、事件、方法、方法参数,根据需要添加注释。 如果类型、属性、事件、方法、方法参数的名称已经是自解释了,不需要加注释;否(Types, attributes, events, methods, method parameters, add comments as needed. If the name of the type, attribute, event, method, and method parameter is self-explanatory, no comment is required; no)
    2020-06-20 09:40:01下载
    积分:1
  • matlab串口传输数据
    阵列信号处理的高分辨率估计,数学方法是部分子空间法,本科毕设要求参见标准测试模型,验证可用,各种kalman滤波器的设计,最终的权值矩阵就是滤波器的系数。
    2022-10-13 19:20:03下载
    积分:1
  • Refactoring
    Introduce the concept of Refactoring, “Bad Smells” in Code and cover a few examples
    2013-05-07 22:35:26下载
    积分:1
  • RecommendedExercise2
    ssd5 Recommend exercise 2(ssd5rex2)
    2010-11-11 09:43:19下载
    积分:1
  • 机游走产生图像效果实现
    说明:  随机游走产生图像效果实现,随机游走类似布朗运动,就是随机的向各个方向走random walker算法不是要真的执行“走”的这个过程,而是要直接算“(The random walk produces an image effect. The random walk is similar to the Brownian motion, which means that the random walker algorithm does not really perform the process of "walk", but directly calculates "walk".)
    2020-05-02 15:42:02下载
    积分:1
  • 696518资源总数
  • 105559会员总数
  • 1今日下载