I need to select fixed area Rois from a set of images. I have code working fine that uses imrect - the box is drawn, can be dragged around and waits for a mouseclick to record position but I can't suss out how to do it with drawrectangle - for my own satisfation.
The nearest I've got it to draw rectangle with mouse then resize after, which is clunky and I can't figure out how to make that box draggable. Here's the relevant part of the code, obviously there'd be an image open.
Framesize = [1 1 Lanelength Lanewidth];
Im1 = imrect(gca, Framesize);
Position = wait(Im1);
The positions are used later to crop out the regions of interest.