MATLAB Answers

How to determine spatial color contrast and error for a resultant image

38 views (last 30 days)
parveen regina
parveen regina on 26 Apr 2013
Hi, The answer will be useful for evaluating the segmentation that i use K means clustering algorithm

Answers (1)

Image Analyst
Image Analyst on 26 Apr 2013
I'm not sure of your definition of spatial color contrast, but you could construct a delta E image. Convert the image from RGB to LAB with makecform. Then convolve each L, A, and B image with a kernel like [1 1 1; 1 0 1; 1 1 1]/8 to get the average L, A, or B in the 8 neighbors surrounding each pixel. Then calculate deltaL image, deltaA image, and the deltaB image by subtracting the convolved image from the original LAB image. Square then add them all together and take the square root. That will give you an image which is the Delta E (color difference) between each pixel and it's neighbors. Would that be what you were thinking of?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!