How to calculate "CONTRAST PER PIXEL(CPP)" of an image
Show older comments
To measure the quality of an image i'm using Contrast Per pixel(CPP).
It is defined as the average intensity difference between a pixel and its adjacent pixel.
I'm not used to with this metric. If anybody is well known with this metric, please share it.
Thanks
Accepted Answer
More Answers (1)
shree san
on 10 Oct 2017
Dear sir/Madam, Thank you so much for the above code. It helped me to calculate the contrast per pixel. But my output gives negative values. Is that right and how I can say the best contrast enhanced image from the output?
output I got is -58.3770 original image
-499.6260 contrast enhanced image
Looking for a favourable answer. Thank you
2 Comments
Image Analyst
on 12 Oct 2017
Yes, it is possible to get a negative Laplacian for some pixels. I don't know how you got your numbers. To get a nice contrast adjustment, try imadjust().
shree san
on 20 Oct 2017
Thank you so much
Categories
Find more on Image Filtering and Enhancement 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!