Revision: 31677
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 10, 2010 13:39 by browny
Initial Code
void showMaskPart(const IplImage* src, const IplImage* mask, IplImage* result)
{
/* src is the source image which you want to mask
* mask is a single channel binary image as a mask
* result is the image with the same size, depth, channel with src
*/
cvZero(result);
CvSize sz = cvSize(src->width, src->height);
IplImage* refImg = cvCreateImage(sz, src->depth, src->nChannels);
cvZero(refImg);
cvOr(src, refImg, result, mask);
cvReleaseImage(&refImg);
}
Initial URL
Initial Description
利用一張影åƒç•¶åšé®ç½©ï¼Œåªé¡¯ç¤ºä¾†æºå½±åƒçš„一部分ï¼
Initial Title
[OpenCV] Use a image to mask another image
Initial Tags
Initial Language
C++