Measuring the distance to specific pixels
1 view (last 30 days)
Show older comments
In `matlab`, I know that I can calculate the distance between points (i.e; pixels) between two images using `pdist`.
But, the case I'm having is follows:
- I have created a matrix of `zeros` that has the same dimension of the original image I want to calculate the distance to. The reason I used the same dimension is since that `pdist` requires that the two objects you want to compare be of the same size. - At each iteration, based on some criteria, I add assign `1` to that pixel in the `zeros` matrix matrix that matches the criteria. - Before I end the iteration, I calculate the distance between the original image and the new image (zeros matrix with the added pixel(s)).
As you can see, I'm comparing two whole images at the time where I don't need to compare the whole second image (zeros image), where I'm interested only in measuring the distance to the pixels only having the value of `1` and not to the other part of the image where pixels are of value `0`.
How can I calculate the distance from the original image to the second image but only to the pixels having the value of `1`?
Thanks.
0 Comments
Answers (0)
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!