How do I get the values of the surrounding pixels when I choose a particular pixel in an image?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
The Imagician
am 2 Nov. 2016
Kommentiert: The Imagician
am 3 Nov. 2016
I'm trying to estimate the possible points of intersection between two lines (arrays) in an image. Is there any function to return the values of the surrounding pixels for a particular value of the array?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 2 Nov. 2016
Assuming it's a gray scale image, and that the row and column is not on the edge of the image:
surroundingWindow = grayImage(row-1:row+1, col-1:col+1);
If it's color:
surroundingWindow = rgbImage(row-1:row+1, col-1:col+1, :);
6 Kommentare
Image Analyst
am 3 Nov. 2016
You'd need to do this:
[rows, columns] = find(abs(Pdist) > 50);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Segmentation and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!