Image Processing: Finding areas of high contrast
17 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to find the areas of highest contrast in a grayscale image. For example, when the pixels go from sky to buildings in a landscape image, there will be a big contrast between the pixel value of the sky (which will likely be close to the 255 end of the scale), and the pixel value of the building (which is likely to be nearer 0). The best way I can think of to do this is to scan through all the pixels in the image both horizontally and vertically, compare pixel A with neighbouring pixel B, and record the coordinates if the difference is greater than a pre-determined threshold.
The problem with this is that it is an exhaustive search, meaning it will be time-consuming for large images, and it relies on a good threshold value being chosen. Perhaps the threshold could be removed altogether..?
Does anybody know of a quicker and more efficient way of achieving the same end result; where I end up with a list of the top 50 pixel locations with the highest difference against one of their neighbouring pixels?
Any suggestions would be well appreciated.
Thanks! :)
0 Commenti
Risposte (1)
Ashish Uthama
il 17 Mar 2011
Your description mirrors 'edge detection', here's some detail on one of the ways to do this: Sobel edge detection. An edge is essentially the boundary line between two differing gray scales.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!