what is marker inserter? in matlab

Marker Inserter is an object in MATLAB Computer Vision System Toolbox. The MarkerInserter object adds shaped markers to an image or video stream.

Here is an example code that demonstrates the usage of the MarkerInserter object:

main.m
% create a detector object
faceDetector = vision.CascadeObjectDetector();

% read input image
img = imread('testImage.jpg');

% detect face location
bbox = step(faceDetector, img);

% create a marker inserter object
markerInserter = vision.MarkerInserter('Shape','Plus','BorderColor','Custom','CustomBorderColor',[255 0 0]);

% insert marker on detected face location
img = step(markerInserter, img, bbox);

% display output image
imshow(img);
444 chars
18 lines

In the code above, we first create a face detector object, detect the location of the faces in the input image, and then create a marker inserter object with the desired shape, border color, and custom border color. Finally, we apply the marker inserter object on the input image and display the output image with the markers.

related categories

gistlibby LogSnag