Re: [OpenCV4Android] Re: mask image

614 views
Skip to first unread message

Alexander Smorkalov

unread,
Oct 11, 2012, 12:37:32 AM10/11/12
to android...@googlegroups.com
Hello leo,

You can use several different ways to create mask for image.
If you create images your self you can use alpha-channel as a mask. You need to save image in *.png format, and then load it with flags =-1 in imread. Then split it with cv::split function and path alpha channel as a mask.

If you cannot use alpha channel you can create mask using threshold (http://docs.opencv.org/trunk/modules/imgproc/doc/miscellaneous_transformations.html?highlight=threshold#cv.Threshold)

Regards, ALexander
Reply all
Reply to author
Forward
0 new messages