Ask Your Question

dhendrakusuma's profile - activity

2012-10-24 04:26:51 -0600 received badge  Student (source)
2012-10-24 03:16:59 -0600 asked a question Smoothing image

Hey, I'am "newbie" about OpenCV. Can you tell me what's wrong in the code?

// SmoothingImage.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "highgui.h"
#include "cv.h"

void example(IplImage* img);

int main( int argc, char** argv)
{
    cvNamedWindow ("example4-in", CV_WINDOW_AUTOSIZE);
    cvNamedWindow ("example4-gaussian", CV_WINDOW_AUTOSIZE);
    IplImage* img = cvLoadImage("Desert.jpg");
    cvShowImage ("example4-in", img);
    IplImage* out = cvCreateImage(
        cvGetSize(img),
        IPL_DEPTH_8U, 
        3
        );
    cvSmooth(img, out, CV_GAUSSIAN, (75, 75),0);
    cvShowImage("example4-gaussian", out);
    cvReleaseImage(&out);
    cvWaitKey(0);
    cvReleaseImage(&img);
    cvDestroyWindow("example4-in");
    cvDestroyWindow("example4-gaussian");
}