vidutils.hpp File Reference

video utility functions More...

This graph shows which files directly or indirectly include this file:

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.

Detailed Description

video utility functions

Definition in file vidutils.hpp.


Function Documentation

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)

Parameters:
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
See also:
mask2Border

Definition at line 51 of file vidutils.cpp.

Here is the call graph for this function:

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.

Parameters:
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
Returns:
the montage image
See also:
MatVid::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.

Parameters:
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.
Returns:
the border image

Definition at line 202 of file vidutils.cpp.


Generated on 18 Dec 2014 for libdt-OpenCV by  doxygen 1.6.1