ImageUtils.cpp
IplImage* smoothImageBilateral(const IplImage *src, float smoothness)
{
	IplImage *imageSmooth = cvCreateImage(cvGetSize(src), src->depth, src->nChannels);
	IplImage *imageOut = cvCreateImage(cvGetSize(src), src->depth, src->nChannels);
	// Do bilateral fitering on the input image
	cvSmooth( src, imageSmooth, CV_BILATERAL, 5, 5, smoothness, smoothness );

	// Mix the smoothed image with the original image
	cvAddWeighted( src, 0.70, imageSmooth, 0.70, 0.0, imageOut );

	//cvSaveImage("bilatA.png", src);
	//cvSaveImage("bilatB.png", imageSmooth);
	//cvSaveImage("bilatC.png", imageOut);
	cvReleaseImage(&imageSmooth);
	return imageOut;
}
// Do Bilateral Filtering to smooth the image noise but preserve the edges.
// A smoothness of 5 is very little filtering, and 100 is very high filtering.
// Remember to free the returned image.

Do Bilateral Filtering to smooth the image noise but preserve the edges.
A smoothness of 5 is very little filtering, and 100 is very high filtering.
Remember to free the returned image.
Do Bilateral Filtering to smooth the image noise but preserve the edges . A smoothness of 5 is very little filtering and 100 is very high filtering . Remember to free the returned image .
IplImage* smoothImageBilateral(const IplImage *src, float smoothness)
{
	IplImage *imageSmooth = cvCreateImage(cvGetSize(src), src->depth, src->nChannels);
	IplImage *imageOut = cvCreateImage(cvGetSize(src), src->depth, src->nChannels);
	cvSmooth( src, imageSmooth, CV_BILATERAL, 5, 5, smoothness, smoothness );
	cvAddWeighted( src, 0.70, imageSmooth, 0.70, 0.0, imageOut );
	cvReleaseImage(&imageSmooth);
	return imageOut;
}
IplImage * smoothImageBilateral ( const IplImage * src , float smoothness ) { IplImage * imageSmooth = cvCreateImage ( cvGetSize ( src ) , src -> depth , src -> nChannels ) ; IplImage * imageOut = cvCreateImage ( cvGetSize ( src ) , src -> depth , src -> nChannels ) ; cvSmooth ( src , imageSmooth , CV_BILATERAL , 5 , 5 , smoothness , smoothness ) ; cvAddWeighted ( src , 0.70 , imageSmooth , 0.70 , 0.0 , imageOut ) ; cvReleaseImage ( & imageSmooth ) ; return imageOut ; }
Do Bilateral Filtering to smooth the image noise but preserve the edges.
Do Bilateral Filtering to smooth the image noise but preserve the edges .
// Do bilateral fitering on the input image
 // Mix the smoothed image with the original image
 //cvSaveImage("bilatA.png", src);
 //cvSaveImage("bilatB.png", imageSmooth);
 //cvSaveImage("bilatC.png", imageOut);
