diff options
author | N.N. <sevyves@users.sourceforge.net> | 2009-07-04 17:19:27 +0000 |
---|---|---|
committer | N.N. <sevyves@users.sourceforge.net> | 2009-07-04 17:19:27 +0000 |
commit | fc773dd890ab246d63927ea1a2ceb0c04994040e (patch) | |
tree | e99716f7df61eee3194f3cc4af36c6857f39d2b5 | |
parent | 19ba359f3bac851ce20b952bf14ca23c6db1495f (diff) |
fixed uninitialized histo
svn path=/trunk/externals/pix_opencv/; revision=11849
-rwxr-xr-x | pix_opencv_histo.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pix_opencv_histo.cc b/pix_opencv_histo.cc index 5bd5758..214f2be 100755 --- a/pix_opencv_histo.cc +++ b/pix_opencv_histo.cc @@ -38,6 +38,8 @@ pix_opencv_histo :: pix_opencv_histo() inlet_new(this->x_obj, &this->x_obj->ob_pd, gensym("float"), gensym("save")); m_dataout = outlet_new(this->x_obj, &s_anything); + save_now = 0; + rgba = cvCreateImage(cvSize(comp_xsize,comp_ysize), IPL_DEPTH_8U, 4); rgb = cvCreateImage(cvSize(comp_xsize,comp_ysize), IPL_DEPTH_8U, 3); grey = cvCreateImage(cvSize(comp_xsize,comp_ysize), IPL_DEPTH_8U, 1); @@ -48,7 +50,6 @@ pix_opencv_histo :: pix_opencv_histo() v_plane = cvCreateImage(cvSize(comp_xsize,comp_ysize), IPL_DEPTH_8U, 1); planes[0] = h_plane; planes[1] = s_plane; - cvCvtPixToPlane( hsv, h_plane, s_plane, v_plane, 0 ); h_saved_plane = cvCreateImage(cvSize(comp_xsize,comp_ysize), IPL_DEPTH_8U, 1); s_saved_plane = cvCreateImage(cvSize(comp_xsize,comp_ysize), IPL_DEPTH_8U, 1); v_saved_plane = cvCreateImage(cvSize(comp_xsize,comp_ysize), IPL_DEPTH_8U, 1); @@ -114,6 +115,8 @@ void pix_opencv_histo :: processRGBAImage(imageStruct &image) this->comp_xsize=image.xsize; this->comp_ysize=image.ysize; + post( "pix_opencv_histo : reallocating buffers" ); + //Destroy cv_images to clean memory cvReleaseImage(&rgba); cvReleaseImage(&rgb); |