extract forground of image thermal
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone,
I working on breast thermal images. I want extract body of background and used of many approch for example chan-vese, gradient and morphology and wavelet but because of the amorphous nature and the lack of clear limits in these images, extracting not successful. I want have a robust approch for this work. regrads
2 comentarios
Walter Roberson
el 23 de Jun. de 2013
What is foreground and what is background for your purpose? Is the background the black part and the foreground is everything else? Is the background the black part together with the arms, with the torso being the foreground? Is the foreground only the breast?
Respuestas (1)
Walter Roberson
el 23 de Jun. de 2013
You can find three of the sides with a simple horizontal and vertical histogram.
maybe_foreground = YourImage > YourImage(1,1);
vert_profile = any(maybe_foreground, 1);
horz_profile = any(maybe_foreground, 2);
vert_start = find(vert_profile,1,'first');
vert_end = find(vert_profile,1,'last');
horz_start = find(horz_profile,1,'first');
horz_end = find(horz_profile,1,'last');
the ROI is now contained within
YourImage(horz_start : horz_end, vert_start : vert_end)
I say "contained within" because of that text at the bottom, which you probably want to crop out. I am not sure at the moment what the best way to do that would be.
2 comentarios
Walter Roberson
el 23 de Jun. de 2013
The first step after the above computation of horz_end and so on, would be:
roimask = false(size(YourImage));
roimask(horz_start : horz_end, vert_start : vert_end) = true;
This mask would not be accurate with respect to the text.
Beyond that gets tricky as it appears that a fraction of the elbow that touches the edge might have some all-0 pixels.
After that... if you ran a max() operation on a window around the inside edge of the window I constructed, that should mostly be able to pick out inside the limbs vs pure background. Use the result as a mask to bw close boundaries, then throw away that mask; with the limbs now closed, you can run a solid fill operation to get the "inside" of the body, and the result of that would be the ROI you are looking for. Except for the bit about getting rid of the pesky text.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!