How to save bounded rectangle boxes as a separate image/entity in MATLAB?

조회 수: 5 (최근 30일)
ROHIT AILA
ROHIT AILA 2016년 9월 25일
답변: Image Analyst 2016년 9월 25일
>>
I am trying to identify playing cards in a poker game. I have identified the regions that contain the playing cards and have surrounded them with bounding boxes. Now what i want to do is to save those regions as separate images/entities so that i can use SIFT/Template matching on them to identify the cards. Can anyone help me with this?

답변 (2개)

Walter Roberson
Walter Roberson 2016년 9월 25일
'SubarrayIdx' Returns a cell array that contains indices such that L(idx{:}) extracts the elements of L inside the object bounding box.
You can use then idx{:} to index your original image to extract the relevant portions.

Image Analyst
Image Analyst 2016년 9월 25일
Try using indexing or imcrop() to extract the bounding boxes. then use imwrite() or save() to save them to disk.

카테고리

Help CenterFile Exchange에서 Card games에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by