필터 지우기
필터 지우기

Can I extract the ROIs into separate images for classification?

조회 수: 4 (최근 30일)
If I use the ROI tool to generate a bunch of ROIs, is it possible to extract those ROIs into separate images? It seems to me that some classification schemes, like the example that use HOG features, require separate images. I have one image of a bunch of resistor symbols. Rather than taking a bunch of images, it'd be nice to be able to just extract them from the ROIs themselves.
  댓글 수: 2
Cong Ba
Cong Ba 2017년 7월 31일
Could you clarify which ROI tool you are using? I did something like this before and used a script to save those ROIs into separate images. The logic was just like I_ROI = I_original(...) and imwrite(I_ROI). But it seems you are using more advanced tools :/
Michael Cooper-Stachowsky
Michael Cooper-Stachowsky 2017년 7월 31일
I'm using the "Training image labeller" tool. However, I think you might be on to something. If I can extract the ROIs (I think I can...) then I just imwrite? How did you generate the different file names?

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

채택된 답변

Cong Ba
Cong Ba 2017년 7월 31일
편집: Cong Ba 2017년 7월 31일
Try something like this: (assume you've got your ROIs as seperate matrices, I_ROI_1, I_ROI_2, etc. )
I{1} = I_ROI_1;
I{2} = I_ROI_2;
for i = 1:2
imwrite(I{i}, ['ROI_', num2str(i), '_', datestr(now,'mm-dd HH-MM'),'.jpg']);
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by