#include<iostream>
#include"highgui.h"
#include"cv.h"
using namespace std;
using namespace cv;
CvRect rect;
IplImage* test = cvLoadImage("test.jpg");
IplImage* test1 = cvCreateImage(cvSize(test->width, test->height), test->depth, test->nChannels);
IplImage* test2 = cvCreateImage(cvSize(test->width, test->height), test->depth, test->nChannels);
long g_sum[8] = {
0}, r_sum[8] = { 0 }, b_sum[8] = { 0 };
CvPoint point;
int flag= 0;
//确定像素所在范围
int cmp(int x) {
if (x < 32) return 0;
else if (x < 64) return 1;
else if (x < 96) return 2;
else if (x < 128) return 3;
else if (x < 160) return 4;
《学习OpenCV》第四章练习题4
最新推荐文章于 2024-08-22 22:46:32 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)