This question is closed. Reopen it to edit or answer.
How to apply a rectangular on images?
1 view (last 30 days)
I want to apply a rectangular on an image. First I want to click on the image and give the program a point and then apply the rectangular on the image, the point will be the center of the rectangular. after that I want to have the pixel value of the selected area. what should I do?
I found this in other questions: h=imrect(gca,[10 10 100 100]) it will apply rectangular h on the image, how can I give the point by just clicking on the image by myself since I do not know the start point for rectangular, this rectangular will start from point (10 10), I want the point which I select be the center of the rectangular not the starting point. and after that I want to work on the pixel value of pixels inside the rectangular. what should I do?