Makes a copy of the input frame. Note that this copy may be not real (no actual data copied). Use this function to maintain graph contracts, e.g when graph's input needs to be passed directly to output, like in Streaming mode.
Makes a copy of the input image. Note that this copy may be not real (no actual data copied). Use this function to maintain graph contracts, e.g when graph's input needs to be passed directly to output, like in Streaming mode.
Output matrix must the same number of rows and depth as the src1 and src2, and the sum of cols of the src1 and src2. Supported matrix data types are , , , , .
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The function horizontally concatenates given number of GMat matrices (with the same number of columns). Output matrix must the same number of columns and depth as the input matrices, and the sum of rows of input matrices.
Parameters
v
vector of input matrices to be concatenated horizontally.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The function vertically concatenates given number of GMat matrices (with the same number of columns). Output matrix must the same number of columns and depth as the input matrices, and the sum of rows of input matrices.
Parameters
v
vector of input matrices to be concatenated vertically.
Makes a copy of the input frame. Note that this copy may be not real (no actual data copied). Use this function to maintain graph contracts, e.g when graph's input needs to be passed directly to output, like in Streaming mode.
Makes a copy of the input image. Note that this copy may be not real (no actual data copied). Use this function to maintain graph contracts, e.g when graph's input needs to be passed directly to output, like in Streaming mode.
The function LUT fills the output matrix with values from the look-up table. Indices of the entries are taken from the input matrix. That is, the function processes each element of src as follows:
dst(I)←lut(src(I))
Supported matrix data types are CV_8UC1. Output is a matrix of the same size and number of channels as src, and the same depth as lut.
Creates one 3-channel matrix out of 3 single-channel ones.
The function merges several matrices to make a single multi-channel matrix. That is, each element of the output matrix will be a concatenation of the elements of the input matrices, where elements of i-th input matrix are treated as mv[i].channels()-element vectors. Output matrix must be of CV_8UC3 type.
Creates one 4-channel matrix out of 4 single-channel ones.
The function merges several matrices to make a single multi-channel matrix. That is, each element of the output matrix will be a concatenation of the elements of the input matrices, where elements of i-th input matrix are treated as mv[i].channels()-element vectors. Output matrix must be of CV_8UC4 type.
The function resizes the image src down to or up to the specified size.
Output image size will have the size dsize (when dsize is non-zero) or the size computed from src.size(), fx, and fy; the depth of output is the same as of src.
If you want to resize src so that it fits the pre-created dst, you may call the function as follows:
// explicitly specify dsize=dst.size(); fx and fy will be computed from that.resize(src, dst, dst.size(), 0, 0, interpolation);
If you want to decimate the image by factor of 2 in each direction, you can call the function this way:
// specify fx and fy and let the function compute the destination image size.resize(src, dst, Size(), 0.5, 0.5, interpolation);
The function resizes the image src down to or up to the specified size. Planar image memory layout is three planes laying in the memory contiguously, so the image height should be plane_height*plane_number, image type is CV_8UC1.
Output image size will have the size dsize, the depth of output is the same as of src.
first input matrix to be considered for horizontal concatenation.
src2
second input matrix to be considered for horizontal concatenation.
Output matrix must the same number of cols and depth as the src1 and src2, and the sum of rows of the src1 and src2. Supported matrix data types are CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1.
Parameters
src1
first input matrix to be considered for vertical concatenation.
src2
second input matrix to be considered for vertical concatenation.
Output matrix must be of the same size as input one.
Parameters
src
input matrix to be converted from.
rdepth
desired output matrix depth or, rather, the depth since the number of channels are the same as the input has; if rdepth is negative, the output matrix will have the same depth as the input.
The example scenarios of using the function are the following: Vertical flipping of the image (flipCode == 0) to switch between top-left and bottom-left image origin. This is a typical operation in video processing on Microsoft Windows* OS. Horizontal flipping of the image with the subsequent horizontal shift and absolute difference calculation to check for a vertical-axis symmetry (flipCode > 0). Simultaneous horizontal and vertical flipping of the image with the subsequent shift and absolute difference calculation to check for a central symmetry (flipCode < 0). Reversing the order of point arrays (flipCode > 0 or flipCode == 0). Output image must be of the same depth as input one, size should be correct for given flipCode.
Parameters
src
input matrix.
flipCode
a flag to specify how to flip the array; 0 means flipping around the x-axis and positive value (for example, 1) means flipping around y-axis. Negative value (for example, -1) means flipping around both axes.
Parameters
src
input matrix of 8-bit elements.
lut
look-up table of 256 elements; in case of multi-channel input array, the table should either have a single channel (in this case the same table is used for all channels) or the same number of channels as in the input matrix.
when negative, the output array has the same type as src; otherwise, it has the same number of channels as src and the depth =ddepth.
where values of pixels with non-integer coordinates are computed using one of available interpolation methods. \(map_x\) and \(map_y\) can be encoded as separate floating-point maps in \(map_1\) and \(map_2\) respectively, or interleaved floating-point maps of \((x,y)\) in \(map_1\), or fixed-point maps created by using convertMaps. The reason you might want to convert from floating to fixed-point representations of a map is that they can yield much faster (2x) remapping operations. In the converted case, \(map_1\) contains pairs (cvFloor(x), cvFloor(y)) and \(map_2\) contains indices in a table of interpolation coefficients. Output image must be of the same size and depth as input one.
Parameters
src
Source image.
map1
The first map of either (x,y) points or just x values having the type CV_16SC2, CV_32FC1, or CV_32FC2.
map2
The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if map1 is (x,y) points), respectively.
Pixel extrapolation method (see cv::BorderTypes). When borderMode=BORDER_TRANSPARENT, it means that the pixels in the destination image that corresponds to the "outliers" in the source image are not modified by the function.
borderValue
Value used in case of a constant border. By default, it is 0.
To shrink an image, it will generally look best with cv::INTER_AREA interpolation, whereas to enlarge an image, it will generally look best with cv::INTER_CUBIC (slow) or cv::INTER_LINEAR (faster but still looks OK).
Parameters
src
input image.
dsize
output image size; if it equals zero, it is computed as:
when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.
Parameters
src
input image.
M
\(2\times 3\) transformation matrix.
dsize
size of the output image.
flags
combination of interpolation methods (see InterpolationFlags) and the optional flag WARP_INVERSE_MAP that means that M is the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).
value used in case of a constant border; by default, it is 0.
when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with invert and then put in the formula above instead of M. The function cannot operate in-place.
Parameters
src
input image.
M
\(3\times 3\) transformation matrix.
dsize
size of the output image.
flags
combination of interpolation methods (INTER_LINEAR or INTER_NEAREST) and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation ( \(\texttt{dst}\rightarrow\texttt{src}\) ).