Borrar filtros
Borrar filtros

Can I extract the ROIs into separate images for classification?

4 visualizaciones (últimos 30 días)
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 comentarios
Cong Ba
Cong Ba el 31 de Jul. de 2017
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 el 31 de Jul. de 2017
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?

Iniciar sesión para comentar.

Respuesta aceptada

Cong Ba
Cong Ba el 31 de Jul. de 2017
Editada: Cong Ba el 31 de Jul. de 2017
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

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by