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.09*255,0.14*255,CV_THRESH_BINARY);
cvThreshold( s_plane, s_plane,0.1*255,1.0*255,CV_THRESH_BINARY);
cvThreshold( v_plane, 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
As far as i know greenObjectsMask = hueMask & saturationMask & valueMask; is more bitwise_and than add in matlab
i tried to use bitwise function but it doesn't work