필터 지우기
필터 지우기

how to merge two different blob?

조회 수: 1 (최근 30일)
Tan Wen Kun
Tan Wen Kun 2015년 11월 26일
댓글: Image Analyst 2015년 11월 28일
I got 3 color blob(1,2,3).
Firstly, I want to write a loop to create a table which state which blob is connected with another blob.
Then, I want try to merge them to form a same blob.How to solve this?

채택된 답변

Image Analyst
Image Analyst 2015년 11월 27일
It's a poor description of what's going on. I'm going to assume you have an image that you thresholded to get a binary image and then you called bwlabel() and label2rgb() to colorize the blobs differently. So you should have the binary image already. If you don't for some reason, and you don't have the labeled image either, you can recover it from using any
binaryImage = logical(any(rgbImage, 3));
  댓글 수: 6
Tan Wen Kun
Tan Wen Kun 2015년 11월 28일
편집: Tan Wen Kun 2015년 11월 28일
MyImage = imread('MyPicture.jpg')
PixelValue = MyImage(y,x); Gets the Pixel value at position y,x.
or using impixel to get it?
Image Analyst
Image Analyst 2015년 11월 28일
That will work for gray scale images. If it's color you need to do
PixelValue = MyImage(y, x, :);
or you can use impixel() for either color or gray scale images.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by