How to display the Rectangles from different frames in one frame?

I am working on a vacant spot detection solution. I am getting the rectangle boxes for different frames in multiples figures, all I want is to display all the detected rectangles boxes in single figure.
Here I am attaching the figures Please find the attachment
<<
<<

댓글 수: 3

Excuse me, could you pleas tell me how to get the rectangle boxes for different frames in multiples figures ? I'm solving the same issue now.
Thank you.
Use rectangle() or plot() or line() to display the boxes in the axes that you want. You can use axes() to switch axes, or just pass the axes into the plotting function that you use.

댓글을 달려면 로그인하십시오.

 채택된 답변

If you know the coordinates of your rectangles, you can simply extract each box from your image by using standard indexing:
rec_x = [10 20 20 10 10];
rec_y = [10 10 50 50 10];
box = your_image(rec_y(1):rec_y(3),rec_x(1):rec_x(2));
figure,image(box)

댓글 수: 2

Can you Please explain it in detail!
I'm sorry but I don't see any other detail than the code that I showed you. It all depends on your code, the way you're storing information of rectangles and the way you want to show them.
What, exactly, did you not understand of the code?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

질문:

2016년 5월 23일

댓글:

2017년 12월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by