MATLAB Answers

Info

This question is closed. Reopen it to edit or answer.

How can i know what object created with imroi did i move

1 view (last 30 days)
Raldi
Raldi on 15 Jul 2012
Closed: MATLAB Answer Bot on 20 Aug 2021
Lets say i create a bunch of rectangles usind the following way
for i = 1:2
h(i) = imrect(gca, compdata(i,:));
end
how can i know which one did i move so i can store its location into a 2x4 matrix where the first row will be saved for the first rectangle and so on.

Answers (1)

Image Analyst
Image Analyst on 15 Jul 2012
If this is related to your other question, then you moved all of them. You never answered my question from there about why you wanted to save all the intermediate boxes in the first place. Of what use is that?
  5 Comments
Raldi
Raldi on 15 Jul 2012
If you put it like that, i can't disagree. But still that makes it no easier for me as i can't seem to be able to store those positions at the right place and the update it. It would be easier if i didnt used a for and i draw each rectangle by myslef. But i like it more with the for loop so i can add 3 or 10 rectangles etc.

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!