RGB <->Gray , Thresholding , Smooth , Morphology ...

 

 
cvCvtColor( iplSrc , iplDst , CV_BGR2GRAY );					// RGB -> Gray
cvCvtColor( iplSrc , iplDst , CV_GRAY2RGB );					// Gray -> RGB

cvThreshold( iplSrc , iplDst , T , Max , CV_THRESH_BINARY );

cvSmooth( iplDst , iplDst , CV_MEDIAN , 5 , 5 );				// Median Filter
cvSmooth( iplDst , iplDst , CV_GAUSSIAN , 5 , 5 );				// Gaussian Smooth

cvErode( iplDst , iplDst , NULL , 1 );
cvDilate( iplDst , iplDst , NULL , 1 );

cvMorphologyEx( iplSrc , iplDst , 0 , 0 , CV_MOP_CLOSE , 5 ); 	// Closing
cvMorphologyEx( iplSrc , iplDst , 0 , 0 , CV_MOP_OPEN , 5 );	        // Opening

cvAnd( iplSrc1 , iplSrc2 , iplDst );						        // And
cvAbsDiff( iplSrc1 , iplSrc2 , iplDst );						        // Sub Image
 

 

arrow
arrow
    創作者介紹
    創作者 Cuby 56 的頭像
    Cuby 56

    Cuby56

    Cuby 56 發表在 痞客邦 留言(0) 人氣()