copymakebordercv
Copies given image, handle into R with a border around it.
Syntax
R = copymakebordercv(handle, top, bottom, left, right, type)
R = copymakebordercv(handle, top, bottom, left, right, 0, color)
Inputs
- handle
- Handle of the image from a imreadcv command.
- top
- Height of the border on top of the image in pixels.
- bottom
- Height of the border at the bottom of the image in pixels.
- left
- Width of the border to the left of the image in pixels.
- right
- Width of the border to the right of the image in pixels.
- type
- Border type. If a border type of 0 is used, a color
can be specified to set the color of the border.
- 0
- Type cv::BORDER_CONSTANT. A color can be specified to set the border color.
- 1
- Type cv::BORDER_REPLICATE
- 2
- Type cv::BORDER_REFLECT
- 3
- Type cv::BORDER_WRAP
- 4
- Type cv::BORDER_REFLECT_101
- 16
- Type cv::BORDER_ISOLATED
- color
- Optional 3-element vector of integers representing red, green blue (RGB) colors, if type is 0. Black will be the default color if nothing is specified with type.
- thickness
- Optional parameter specifying the thickness of the line drawn on handle. Default value of thickness is 1.
Outputs
- R
- Handle to the ComputerVision data of the new image created. This handle can be used when accessing other functions in the ComputerVision library.
Example
handle = imreadcv('1.jpg');
R = copymakebordercv(handle, 2, 2, 2, 2, 0, [255 0 0]);