Unhandled exception at 0x757dd36f in smoothing.exe: Microsoft C++ exception: cv::Exception at memory location 0x0036f6d4..
#include "stdafx.h" #include <cv.h> #include <highgui.h> #include "iostream" using namespace std; void smoothing(IplImage *image) { //create some window to show the input and output image cvNamedWindow("smoothing-in"); cvNamedWindow("smoothing-out"); //window that show our input image cvShowImage("smoothing-in",image); //create an image to hold smoothed output IplImage *output = cvCreateImage( cvGetSize(image), IPL_DEPTH_8U, 3 ); //do the smoothing cvSmooth(image,output,CV_GAUSSIAN,3,3); //show the smoothed image cvShowImage("smoothing:",output); cvReleaseImage(&output); cvWaitKey(0); cvDestroyWindow("smoothing-in"); cvDestroyWindow("smoothing-out"); } int _tmain(int argc, _TCHAR* argv[]) { IplImage *img = NULL;//cvLoadImage("image.jpg"); if((img = cvLoadImage("image.jpg")) == 0){ cout<<"image load failed"; } smoothing(img); cvReleaseImage(&img); return 0; } thank !
if((img = cvLoadImage("image.jpg")) == 0){ cout<<"image load failed"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)