how to connect disjoint pixels on image borders?
조회 수: 1 (최근 30일)
이전 댓글 표시
i have an image,i used open close by reconstruction,and then sobel edge detector,it detect edge ,but it has some disjoint parts,pixels are not connected in some parts,i want to use connected component labeling and watershed segmentation,so first i should make a connected border,then use imfill,to fill the area between borders,and watershed to segment them,is there any function i call to connect pixels which are close to each other?when i use sobel on original image,it detects border,but by too many dots,which are not connected,like some one draw borders by dots,when i use open close on image,the border is much better,but still has some disjoint parts,thank you so much
댓글 수: 0
채택된 답변
Image Analyst
2014년 11월 28일
What is "open close"? There is imopen() and imclose() but usually you do one or the other. I don't know exactly what operations you did (functions that you called) when you say you did "open close". That's not standard terminology.
You can use imclose() to connect nearby pixels.
How did you do Sobel? Did you use edge() or imgradient()? You should use imgradient() and then you can choose your own threshold. Choose a lower threshold to make the edges more connected.
댓글 수: 4
Weng Keong Wong
2015년 4월 21일
Hi Image Analyst, i have used edge detector sobel to detect the edges of the image but the some of the edge are not really connected. and you have mentioned to use imgradient() and set the threshold lower... can you show some sample codes of how to do it. because I have tried and I could not get it right.
추가 답변 (1개)
sara
2015년 1월 27일
댓글 수: 4
Image Analyst
2015년 1월 28일
Yes - you can use imcrop(). Just specify the starting row and column and the width and height.
참고 항목
카테고리
Help Center 및 File Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!