이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
Chan Vese Segmentation mask is not working Properly
조회 수: 4 (최근 30일)
이전 댓글 표시
I cropped my DICOM image so the active contour be faster and segment between the black area and soft tissue.
Instead, I got a contour that overlaps the edge of the image and goes beyond this. How can this happen? See attached image.
Let me know if you need the m files.
채택된 답변
Anton Semechko
2018년 6월 26일
Your image appears to be "padded" on the top and bottom with gray values. The transition between the black background (containing the region of interest; ROI) and these gray regions, has large gradient that will attract the contour during segmentation; because evolution of the contour is guided by the strength of the image intensity gradient. My suggestions to you, (1) remove the padding, (2) initialize contour close to the ROI you want to segment.
댓글 수: 28
Stelios Fanourakis
2018년 6월 26일
You are right. But how do I do that? I cropped the image without padding still the padding shows up and I am trying to find a way to initialize the contour close to the dark area. If you have any experience on chan vese methods please help
Image Analyst
2018년 6월 26일
편집: Image Analyst
2018년 6월 26일
"I cropped the image without padding still the padding shows up" Huh? How could that be? Attach your m-file and dicom image, zipped up if you have to. And you've Accepted this answer, so can we assume that it's solved, or not? Please clarify.
Stelios Fanourakis
2018년 6월 26일
I accepted the answer because he's right to his comment, I guess. No it hasn't been solved. I attach the two m files I use for the contour and the jpg (cropped) image. You'll see that the contour goes outside the image where I want it to go inside of it and match the black area. It must be a tune in the init_mask of the chvese.m but I cannot find it yet.
Stelios Fanourakis
2018년 6월 26일
The image is already cropped. The original one is much bigger. I only left a thin strip of the dicom image and saved it as jpg
Stelios Fanourakis
2018년 6월 26일
This white padding thing do not exist in the cropped image when opened using imtool
Stelios Fanourakis
2018년 6월 26일
I saved it as png and now no white padding is showing and the contour goes inside the image. But it seems it cannot segment between the soft tissue (gray) and the background. It outlines the whole image
Anton Semechko
2018년 6월 26일
1) Can you post on here the grayscale image you want to process (without the padding) and a separate image showing (approximately) the ROI you want to segment.
2) Is there a reason you chose this particular segmentation algorithm?
Stelios Fanourakis
2018년 6월 26일
@Anton. I just saved it as png (same image). I need an active contour to separate black area (bckgnd) with the soft tissue (foreground). It seems fast enough this algorithm. Do you have any alternative to propose me?
Anton Semechko
2018년 6월 26일
The image background appears relatively uniform and free of noise, so yes, there are simpler and more efficient algorithms that can be used in place of level-set segmentation.
Before we get to that, it seems that you are not getting an important point about the input image you want to process. The image you provided is definitely not an original DICOM image because it contains extraneous padding around the borders:
You should not be using this image as input to a segmentation algorithm, level-set or otherwise, because it contains information that will "confuse" segmentation algorithm and preclude it from finding the ROI you actually want to segment. Do you understand this?
Stelios Fanourakis
2018년 6월 26일
Yes Anton. I understand it. If you see my latest attachment it is the .png format with no padding at all. Still cannot differentiate between black and gray.
Stelios Fanourakis
2018년 6월 26일
Can you please give me using a more efficient segmentation algorithm?
Anton Semechko
2018년 6월 26일
'untitled.png' WAS the image I used to generate the above thumbnail showing the extraneous padding!!!
Stelios Fanourakis
2018년 6월 26일
But I use that image to my pc/Matlab and the contour goes inside the image area. Correctly. Previously with the 'pictoedit.jpg', there was a problem with padding. Are you sure you used the png version? I don't have problem with padding. I have problem that it won't segment correctly
Anton Semechko
2018년 6월 26일
I can't figure out if I am being trolled. Anyone else reading this care to comment?
Stelios Fanourakis
2018년 6월 26일
See my previous attachment. Contour get inside the image. How else to explain it?
Anton Semechko
2018년 6월 26일
Ok, do this:
im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/122991/untitled.png');
figure('color','w')
imshow(im)
What do you see?
Stelios Fanourakis
2018년 6월 26일
At my first attachment in this post (fig.jpg) contour goes out of image area. That was my problem now I have a different problem. Am I clear or not?
Anton Semechko
2018년 6월 27일
Stelios, does the file 'untitled.png' contain the image you are using as input to the segmentation algorithm?
Stelios Fanourakis
2018년 6월 27일
@Anton. Please, give me an efficient segmentation algorithm. The one I use doesn't seem to be able to differentiate between black and gray values
Anton Semechko
2018년 6월 27일
Since you are completely impervious to everything I said up 'till now, I will just give you a demo.
% Get the image
im=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/122991/untitled.png');
% Remove extraneous padding and border drawn on the image
im=im(161:280,11:880,:);
im=max(im,[],3);
% Segment into 4 classes using only intensity information
[C,U,LUT,H]=FastFCMeans(im,4);
L=LUT2label(im,LUT);
% Visualize
figure
subtightplot(3,1,1), imshow(im)
subtightplot(3,1,2), imshow(L,[])
subtightplot(3,1,3), imshow(L>1,[])
Stelios Fanourakis
2018년 6월 27일
@Anton. Although I got all the functions you suggested me, here are the results. I didn't manage to get your results. I did only copy paste.
Stelios Fanourakis
2018년 6월 27일
Thanks a lot Anton, I do really appreciate your effort and help. One last thing I might need to ask is how can I have the contour visible on the image. I need to control the active contour so will be slightly modified when applied to several images since the images differ between them
Anton Semechko
2018년 6월 27일
'FastFCMeans' performs image segmentation by clustering of image intensities and is thus fundamentally different from the level-set segmentation algorithm you were using before. There is no initialization involved and the resulting segmentation depends only on the input parameters 'c' and 'q'; 'c' controls the number of intensity clusters and 'q' is a fuzzification parameter. See 'FastFCMeans' documentation for additional info.
Stelios Fanourakis
2018년 8월 31일
Hi Anton.
Thanks for your valuable help so far. What I have not understand yet is how to get what I need. FastFCMeans algorithm indeed segmented the gray soft tissue from the background. What I want now is to get the black area above the soft tissue. Only this region above the tissue. I need to somehow segment it and measure its length, pixel area size, dimensions. Do I have to implement a snake contour like chan vese. How else can I obtain the values of this area? (pixel size, pixels in number, dimensions, length from top of the image to the beginning of the tissue).
Stelios Fanourakis
2018년 8월 31일
편집: Stelios Fanourakis
2018년 8월 31일
Moreover, if you notice the soft tissue at the last pic available (untitled.png) you'll notice some black gaps between the soft tissue especially at the lower left side of the image. I need some kind of interpolation method to fill those gaps so the contour will not get messed. So the soft tissue will be a unit of seamless gray or white matter with no black gaps.
I attach an image to see the results so far. See that the contour gets troubled to the points where the soft tissue is not seamless and black gaps occur. Any idea of how to fix it?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)