フィルターのクリア

extract forground of image thermal

3 ビュー (過去 30 日間)
fatemeh
fatemeh 2013 年 6 月 23 日
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 件のコメント
Walter Roberson
Walter Roberson 2013 年 6 月 23 日
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?
fatemeh
fatemeh 2013 年 6 月 23 日
All parts of the body including the neck, arms ,shoulder and breasts are foreground and side black part is background.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 6 月 23 日
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 件のコメント
fatemeh
fatemeh 2013 年 6 月 23 日
I want have a method to create binary output so that pixels of foreground be 1 and pixels related to background be 0.
Walter Roberson
Walter Roberson 2013 年 6 月 23 日
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.

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

Community Treasure Hunt

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

Start Hunting!

Translated by