# which feature is better for comparing images like these?

1 view (last 30 days)
jack nn on 21 Jun 2015
Commented: Image Analyst on 22 Jun 2015
hi everybody I used a prefabricate fuzzy code for threshold of a number of images. my main goal of using this code was obtaining a general Schematic of images,but when I used this code I reached to the conclusion that the result images are suitable for main purpose. you can see the following image bellow:
but in some cases the result is not fit to my purpose like to following image:
so I decided to put this code in a while loop to run repetitive , till I reach my desirable result like first image that I attached. by seeing the images that I attached I supposed that variance can be a good criteria for a desirable image. but after comparing the variance of the results of the 2 images that I attached, I found that variances are some how similar. I don't have enough information about image features. my question is that ,whether there is any feature that can help me to measure desirability of resulted images with that, and I can use that feature in while loop. I appreciated you if you can suggest me any idea.

Image Analyst on 21 Jun 2015
I don't know what you're doing in your loop to change the image. You need to mask your image so that the variance is not being dominated by the circle. You need to extract just the values inside the circle mask:
where circleMask is a binary image that is true inside the circle and false outside.

Image Analyst on 22 Jun 2015
Instead of using "prefabricate fuzzy code" to quantize your image into four levels, why not simply use multithresh() to automatically determine the best thresholds:
subplot(1,2,1);
imshow(grayImage, []);
numberOfOutputGrayLevels = 4;
[thresholds, map] = multithresh(grayImage, numberOfOutputGrayLevels);
out = imquantize(grayImage, thresholds);
subplot(1,2,2);
imshow(out, []);

Show 1 older comment
Image Analyst on 22 Jun 2015
What is image1 and image2? Are those the left image and right image in the pictures you inserted in your original question?
jack nn on 22 Jun 2015
image1 is right image in first image that I linked here. and Image2 is right image in second image that I linked.
Image Analyst on 22 Jun 2015
I have no idea how you want to decide on the 4 thresholds to use. I guess that would split the image up into 5 gray level classes. I also don't know fuzzy so that's why I suggested multithresh() to pick the thresholds for you. Sorry I can't help more than that, but I just don't know what you want to achieve, like what criteria you'd like to use for a "desirability" metric.