How to create a linkage between different blob?
Show older comments
For example I using watershed and get different color piece.
I want to create a matrix to show the linkage.
1 1 1 1 1 1 1 1 1 1 1
1 2 2 1 3 3 1 4 4 0 1
1 2 1 3 3 1 0 4 4 0 1
1 1 1 1 1 1 1 1 1 1 1
so when loop vertical and horizontal I wish to get the result like matrix.jpg
I want check before 1 and after 1,
if check got 2,3 so return 1 to matrix(3,2)=1 matrix(2,3)=1
if check got 3,4 so return 1 to matrix(3,4)=1 matrix(4,3)=1
if 0 then ignore.
How to do this?
6 Comments
Image Analyst
on 1 Dec 2015
I have no idea what you're asking and I've read it multiple times.
Tan Wen Kun
on 2 Dec 2015
Edited: Tan Wen Kun
on 2 Dec 2015
Walter Roberson
on 2 Dec 2015
I would have understood better if your table had showed 1 at entries (1,3) and (3,1)
Walter Roberson
on 2 Dec 2015
With the updated table then I am fairly sure glcm can be used.
Tan Wen Kun
on 2 Dec 2015
Edited: Tan Wen Kun
on 2 Dec 2015
Walter Roberson
on 2 Dec 2015
You need to define when two colors are "nearly the same" or not. It is not an easy question, especially when you are working with the darker colors. For example, is [10,0,0] "nearly the same" as [0,0,0] because the values are within 10, or is [10,0,0] definitely "red" whereas [0,0,0] is "black" ?
You should look for some of what Image Analyst has posted about "Delta E"
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

