您好,欢迎来到外链网!
当前位置:外链网 » 站长资讯 » 专业问答 » 文章详细 订阅RssFeed

qt c 中取像每个像素点的rgb的数值的方法

来源:互联网 浏览:99次 时间:2023-04-08

qt c++中取图像每个像素点的rgb的数值的方法

for(int i=0;i<curFrame.cols/5;i++) { for(int k=0;k<curFrame.cols/5;k++) 美国高防vps { int temp_x=(int)(5*i+5); int temp_y=(int)(5*k+5); Scalar temp_color = curFrame.at<Vec3b>(temp_x, temp_y); double blue=temp_color.val[0]; double green=temp_color.val[1]; double red=temp_color.val[2]; redsum+=red; bluesum+=blue; greensum+=green; totalsum++; } }

秋风写于淄博 业务联系与技术交流:375172665

15133834