how can assign numbers to detected bounding boxes?

7 ビュー (過去 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 件のコメント
Image Analyst
Image Analyst 2018 年 10 月 1 日
It looks like the output image you got is correct. Is there still a problem?
Be careful with sorting things, otherwise it's possible things could get mismatched. If you sort some things, like bounding box locations and labels, then you need to sort everything else the same way, otherwise, you might have the area of box 4 (say) with the area of box 2 (as shown by test on the image).
Walter Roberson
Walter Roberson 2018 年 10 月 1 日
RGB = insertText(I, newpositions(:,1:2), 1:size(newpositions,1), 'FontSize', 22, 'AnchorPoint' ,'LeftBottom');

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by