Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Adding three images in opencv

hi everybody i wanna ask if there is a way to add three images to gather (i wanna convert matlab code into opencv this is the statement in matlab greenObjectsMask = hueMask & saturationMask & valueMask;) the following is the code in opencv : IplImage* hueMask = cvCreateImage( cvGetSize(h_plane), 8, 3 ); IplImage* saturationMask = cvCreateImage( cvGetSize(s_plane), 8, 3 ); IplImage* valueMask = cvCreateImage( cvGetSize(v_plane), 8, 3 ); IplImage* yellow = cvCreateImage( cvGetSize(v_plane), 8, 3 ); cvThreshold( h_plane, h_plane,0.09255,0.14255,CV_THRESH_BINARY); cvThreshold( s_plane, s_plane,0.1255,1.0255,CV_THRESH_BINARY); cvThreshold( v_plane, v_plane,0.1255,1.0255,CV_THRESH_BINARY); cvShowImage("h mask ",h_plane ); cvShowImage("s mask ",s_plane ); cvShowImage("v mask ",v_plane );

i wanna to add the huemask, saturationmask and valuemask in one image called greenObjectsMask waiting for help thank u all

Adding three images in opencv

hi everybody i wanna ask if there is a way to add three images to gather (i wanna convert matlab code into opencv this is the statement in matlab matlab:( greenObjectsMask = hueMask & saturationMask & valueMask;) )

the following is the code in opencv :
  IplImage* hueMask = cvCreateImage( cvGetSize(h_plane), 8, 3 );
 IplImage* saturationMask = cvCreateImage( cvGetSize(s_plane), 8, 3 );
 IplImage* valueMask = cvCreateImage( cvGetSize(v_plane), 8, 3 );
 IplImage* yellow = cvCreateImage( cvGetSize(v_plane), 8, 3 );
  cvThreshold( h_plane, h_plane,0.09255,0.14255,CV_THRESH_BINARY);
    h_plane,0.09*255,0.14*255,CV_THRESH_BINARY);
 cvThreshold( s_plane, s_plane,0.1255,1.0255,CV_THRESH_BINARY);
    s_plane,0.1*255,1.0*255,CV_THRESH_BINARY);
 cvThreshold( v_plane, v_plane,0.1255,1.0255,CV_THRESH_BINARY);
    v_plane,0.1*255,1.0*255,CV_THRESH_BINARY);
 cvShowImage("h mask ",h_plane );
  cvShowImage("s mask ",s_plane );
  cvShowImage("v mask ",v_plane );    

);

i wanna to add the huemask, saturationmask and valuemask in one image called greenObjectsMask waiting for help thank u all