Hi there. I was wondering if its possible to draw a rectangle, whose coordinates is obtained from regoingprops. I however, am not interested to show the image first. What I intend to do is to get the bounding box coordinates form regionprops, and then just superimpose it onto an image without displaying it. I would then like to save the image (saving is ok… just drawing the rectangle got me a bit tangled up 😛 ). Would appreciate any advice!
The code I'm currently using is as shown above. (It's in a for loop) where 'l' is the counter.
THANKS in advance!!!
f = figure,imshow(frame, 'Border', 'tight');hold on; rectangle('Position',s(l).BoundingBox,'EdgeColor','y','LineWidth',2)print(f, '-r80', '-djpeg', [dirName 'results' '\' jpegFiles(i).name]);close all;
Best Answer