Ask Your Question

args's profile - activity

2015-12-22 01:26:25 -0600 asked a question OpenCV Error: Assertion failed (std::abs(dsize.width*2 - ssize.width) <= 2 && std::abs(dsize.height*2 - ssize.height) <= 2)

I'm using Xcode on macPro, I got this error but every things looks good. any one can help?

include <opencv highgui.h="">

include <opencv cv.h="">

include <iostream>

IplImage* doPyrDown(IplImage* in, int filter = IPL_GAUSSIAN_5x5){ assert(in->width%2 == 0 && in->height%2 == 0); IplImage* out = cvCreateImage(cvSize(in->width, in->height), in->depth, in->nChannels); cvPyrDown(in, out); return out; } int main(int argc, char* argv) { IplImage img = cvLoadImage("/Users/Downloads/opencv.png"); IplImage* img1 = doPyrDown(img, IPL_GAUSSIAN_5x5); imageDisplay(img1); }