Problems with cvSmooth

asked 2013-10-15 04:47:03 -0600

Martín gravatar image

updated 2013-10-15 05:08:27 -0600

berak gravatar image

Hello,

I am using the VLC application and I have implemented some methods to create a virtual image using a format called 2D plus depth map in a C program.

I have used OpenCV library and i achieve some bad pixels in the image when i use the function called cvSmooth: cvSmooth(image_depth, depth_procesado, CV_GAUSSIAN, 11, 0, 0, 0);

I don't know if that thread that shows those frames on the screen of the device has a frame rate faster than the frames are smoothed or the implementation of the function is wrong.

// Mapa de profundidad del vídeo:
IplImage* image_depth = cvCreateImage( cvSize(w_i/2, h_i), IPL_DEPTH_8U, 3);
uchar *data_depth = (uchar *)image_depth->imageData;

  ...

 IplImage* depth_procesado = cvCreateImage(cvGetSize(image_depth), IPL_DEPTH_8U, image_depth->nChannels);
 uchar *data_depth_process = (uchar *)depth_procesado->imageData;

 // Imagen del mapa de profundidad procesado simétricamente.
cvSmooth(image_depth, depth_procesado, CV_GAUSSIAN, 11, 0, 0, 0);

The version is OpenCV-2.4.5-android-sdk. Thanks so much!

edit retag flag offensive close merge delete

Comments

Hai Martin,Did you try with aperture height/width smaller than 11. Was it then giving the same problem too.. Might be a smaller aperture should work well without giving any bad pixels..

Robionic gravatar imageRobionic ( 2013-10-15 07:16:23 -0600 )edit

Thank you for the answer! But the application does not work well with a smaller size of the filter window. I don't know if the parameters of the function are correct. I have read that if the param2 is equal to 0, the param2 equal to the param1 and param3 and param4 are calculated with the expression param3= 0.3 * (param1/2 -1) + 0.8 .

Martín gravatar imageMartín ( 2013-10-15 12:41:14 -0600 )edit