video utility functions More...
Go to the source code of this file.
Functions | |
| void | colorMask (const Mat &img, const Mat &mask, Mat &oimg, int border=1) |
| colorize an image based on a segmentation mask. | |
| Mat | mask2Border (const Mat &mask, int border, unsigned char *mask_flag) |
| draw the border around segments in a segmentation mask. | |
| Mat | imgmontage (const vector< Mat > &imgs, int sizex=5, int spacing=2, const Scalar &fill=0, int border=0) |
| make a montage of a set of images. | |
video utility functions
Definition in file vidutils.hpp.
| void colorMask | ( | const Mat & | img, | |
| const Mat & | mask, | |||
| Mat & | oimg, | |||
| int | border = 1 | |||
| ) |
colorize an image based on a segmentation mask.
Several modes are available: 1) img and mask are both images. 2) img and mask are both Mat videos. 3) img is a Mat video and mask is an image. (Implementation of colormask.m)
| img | the image or Mat video, (grayscale only) | |
| mask | the segmentation mask or Mat video, (unsigned char only) | |
| oimg | the output color image | |
| border | width of white border around the segments |
Definition at line 51 of file vidutils.cpp.
| Mat imgmontage | ( | const vector< Mat > & | imgs, | |
| int | sizex = 5, |
|||
| int | spacing = 2, |
|||
| const Scalar & | fill = 0, |
|||
| int | border = 0 | |||
| ) |
make a montage of a set of images.
Use an empty Mat as a placeholder if necessary.
| imgs | the set of images (color or grayscale). | |
| sizex | number of images per row in the montage | |
| spacing | pixel spacing between images | |
| fill | fill color between images | |
| border | border size (in pixels) around the montage |
Definition at line 236 of file vidutils.cpp.
| Mat mask2Border | ( | const Mat & | mask, | |
| int | border, | |||
| unsigned char * | mask_flag | |||
| ) |
draw the border around segments in a segmentation mask.
| mask | the segment mask (unsigned char only) | |
| border | the border width | |
| mask_flag | an array of unsigned char[256], with non-zero when the index value is present in the mask. |
Definition at line 202 of file vidutils.cpp.
1.6.1