Matlab: Image Skeleton to adjacency matrix
up vote
0
down vote
favorite
I have a color image which I binarized and applied morphological operations to get the skeleton of the image. How can I convert this skeleton to an adjacency matrix representation ?
image matlab adjacency-matrix
add a comment |
up vote
0
down vote
favorite
I have a color image which I binarized and applied morphological operations to get the skeleton of the image. How can I convert this skeleton to an adjacency matrix representation ?
image matlab adjacency-matrix
Personally, for most uses, I wouldn't explicitly generate an adjacency matrix. Instead, I'd write a function that returns the (nonzero) neighbors of a given pixel in the image. If you really need to create an adjacency matrix (or list), you'd probably want to label the pixels of the skeleton and then do a breadth-first traversal, filling in the matrix as you visit each pixel. It would be helpful if you could include a sample image and tell us what you're planning on doing with the adjacency matrix once you have it, as well as any code you might have so far.
– beaker
Nov 12 at 17:45
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a color image which I binarized and applied morphological operations to get the skeleton of the image. How can I convert this skeleton to an adjacency matrix representation ?
image matlab adjacency-matrix
I have a color image which I binarized and applied morphological operations to get the skeleton of the image. How can I convert this skeleton to an adjacency matrix representation ?
image matlab adjacency-matrix
image matlab adjacency-matrix
asked Nov 11 at 7:38
Shew
4971516
4971516
Personally, for most uses, I wouldn't explicitly generate an adjacency matrix. Instead, I'd write a function that returns the (nonzero) neighbors of a given pixel in the image. If you really need to create an adjacency matrix (or list), you'd probably want to label the pixels of the skeleton and then do a breadth-first traversal, filling in the matrix as you visit each pixel. It would be helpful if you could include a sample image and tell us what you're planning on doing with the adjacency matrix once you have it, as well as any code you might have so far.
– beaker
Nov 12 at 17:45
add a comment |
Personally, for most uses, I wouldn't explicitly generate an adjacency matrix. Instead, I'd write a function that returns the (nonzero) neighbors of a given pixel in the image. If you really need to create an adjacency matrix (or list), you'd probably want to label the pixels of the skeleton and then do a breadth-first traversal, filling in the matrix as you visit each pixel. It would be helpful if you could include a sample image and tell us what you're planning on doing with the adjacency matrix once you have it, as well as any code you might have so far.
– beaker
Nov 12 at 17:45
Personally, for most uses, I wouldn't explicitly generate an adjacency matrix. Instead, I'd write a function that returns the (nonzero) neighbors of a given pixel in the image. If you really need to create an adjacency matrix (or list), you'd probably want to label the pixels of the skeleton and then do a breadth-first traversal, filling in the matrix as you visit each pixel. It would be helpful if you could include a sample image and tell us what you're planning on doing with the adjacency matrix once you have it, as well as any code you might have so far.
– beaker
Nov 12 at 17:45
Personally, for most uses, I wouldn't explicitly generate an adjacency matrix. Instead, I'd write a function that returns the (nonzero) neighbors of a given pixel in the image. If you really need to create an adjacency matrix (or list), you'd probably want to label the pixels of the skeleton and then do a breadth-first traversal, filling in the matrix as you visit each pixel. It would be helpful if you could include a sample image and tell us what you're planning on doing with the adjacency matrix once you have it, as well as any code you might have so far.
– beaker
Nov 12 at 17:45
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246747%2fmatlab-image-skeleton-to-adjacency-matrix%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Personally, for most uses, I wouldn't explicitly generate an adjacency matrix. Instead, I'd write a function that returns the (nonzero) neighbors of a given pixel in the image. If you really need to create an adjacency matrix (or list), you'd probably want to label the pixels of the skeleton and then do a breadth-first traversal, filling in the matrix as you visit each pixel. It would be helpful if you could include a sample image and tell us what you're planning on doing with the adjacency matrix once you have it, as well as any code you might have so far.
– beaker
Nov 12 at 17:45