How to label imrect while tracking?

5 ビュー (過去 30 日間)
Meshooo
Meshooo 2015 年 6 月 9 日
コメント済み: Image Analyst 2015 年 6 月 11 日
Dear all,
I am trying to make a tracking software using image processing toolbox only. I am using imrect for tracking a ROI. So I want to be able to add a label to that imrect blue box, let's say in the top of the box such that the label will be also moving with the rectangle generated from imrect.
Any idea how to do that?
Best, Meshooo
  2 件のコメント
B.k Sumedha
B.k Sumedha 2015 年 6 月 9 日
Meshooo
Meshooo 2015 年 6 月 9 日
Thank you very much. But what you sent me runs with the computer vision toolbox which I don't have. I want to make a similar thing using the image processing toolbox only.

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

採用された回答

Image Analyst
Image Analyst 2015 年 6 月 9 日
You can use plot(), line(), or rectangle() to draw/erase/move the rectangle. You can use text() to place a label near it.
  2 件のコメント
Meshooo
Meshooo 2015 年 6 月 11 日
Thank you very much. Do you know any example that crop the image at the rectangle coordinates?
Image Analyst
Image Analyst 2015 年 6 月 11 日
croppedImage = imcrop(originalImage, [x, y, width, height]);
which works with color or gray scale images, or
croppedImage = grayImage(row1:row2, col1:col2); % Gray scale image
croppedImage = rgbImage(row1:row2, col1:col2, :); % Color image

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by