Draw a rectangle on image
imr = rectangle(im, rect, rgb)
An image, which can be one channel or three channel image.
rect=[x, y, width, height] is a vector. (x, y) is the top-left corner of the rectangle.
imr is the the output image with the rectangle.
im = imread(fullpath(getIPCVpath() + "/images/baboon.png")); imr = rectangle(im, [20, 30, 50, 100], [12 155 0]); imshow(imr); | ![]() | ![]() |