rcv
Rand's OpenCV Utilities
Functions
Image Concatenation

Functions

cv::Mat rcv::hcat (cv::Mat left, cv::Mat right, cv::Scalar fill=cv::Scalar(0))
 Concatenate the left and the right images horizontally.
cv::Mat rcv::hcat (std::vector< cv::Mat > const &images, cv::Scalar fill=cv::Scalar(0))
 Concatenate a set of images horizontally.
cv::Mat rcv::vcat (cv::Mat top, cv::Mat bottom, cv::Scalar fill=cv::Scalar(0))
 Concatenate the top and the bottom images vertically.
cv::Mat rcv::vcat (std::vector< cv::Mat > const &images, cv::Scalar fill=cv::Scalar(0))
 Concatenate a set of images vertically.

Detailed Description

Paste two or more images together, generally for display purposes

Warning:
These methods are totally unoptimized. A real implementation would use lazy evaluation to make one copy of the pixels at the last moment. This is not implemented yet, so do not use in performance sensitive code.

Function Documentation

cv::Mat rcv::hcat ( cv::Mat  left,
cv::Mat  right,
cv::Scalar  fill = cv::Scalar(0) 
)

Concatenate the left and the right images horizontally.

Use this version to concatenate two images

Parameters:
leftThe left image
rightThe right image
fillA color to fill in the background of an image if it is smaller than the other
cv::Mat rcv::hcat ( std::vector< cv::Mat > const &  images,
cv::Scalar  fill = cv::Scalar(0) 
)

Concatenate a set of images horizontally.

Use this version to concatenate more than two images, e.g.

Example:

 cv::Mat display = rcv::hcat({first_image, second_image, third_image, fourth_image});
Parameters:
imagesA list of images to be concatenated in left-to-right order
fillA color to fill in the background of an image if it is smaller than the other
cv::Mat rcv::vcat ( cv::Mat  top,
cv::Mat  bottom,
cv::Scalar  fill = cv::Scalar(0) 
)

Concatenate the top and the bottom images vertically.

Use this version to concatenate two images

Parameters:
topThe top image
bottomThe bottom image
fillA color to fill in the background of an image if it is smaller than the other
cv::Mat rcv::vcat ( std::vector< cv::Mat > const &  images,
cv::Scalar  fill = cv::Scalar(0) 
)

Concatenate a set of images vertically.

Use this version to concatenate more than two images, e.g.

Example:

 cv::Mat display = rcv::vcat({first_image, second_image, third_image, fourth_image});
Parameters:
imagesA list of images to be concatenated in bottom-to-top order
fillA color to fill in the background of an image if it is smaller than the other
 All Classes Functions