how can assign numbers to detected bounding boxes?

조회 수: 6(최근 30일)
Shaik Ahmad
Shaik Ahmad 2018년 9월 30일
댓글: Walter Roberson 2018년 10월 1일
I have a final bounding box attributes and an Image. I need to assign a number to each bounding box from the top left side in a sequential order. I have an object detected image like this.
Now I need a numbered object detected image some this like this. (Number position and size is not an issue)
How can I do that?
  댓글 수: 1
ANKUR KUMAR
ANKUR KUMAR 2018년 9월 30일
Please attach you image and required things so that we can help you in a bit more effective manner.

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

채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 30일
Put the coordinates into a 2D array. sortrows() with either [1 2] or [2 1] depending upon whether the numbering priority is down ([1 2]) or across ([2 1]) . Afterwards, the row number will be the number to use for the bounding box.
  댓글 수: 8
Walter Roberson
Walter Roberson 2018년 10월 1일
RGB = insertText(I, newpositions(:,1:2), 1:size(newpositions,1), 'FontSize', 22, 'AnchorPoint' ,'LeftBottom');

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by