0
$\begingroup$

i am trying to calculate linear index of fuzziness of an image using this formula:formula i have to see a positive value according to the paper. But i see a negative value, so i think i am doing something wrong. here is my try.

q=(pi/2)*(1-output_image/255); %I is output image and 255 is maximum gray level
y= sum(sum(min(q,1-q)))/(width*height); %M*N is width*height 
$\endgroup$
  • $\begingroup$ can you provide your full script? the snippet seems to work OK for me $\endgroup$ – MimSaad Dec 23 '19 at 21:36
  • $\begingroup$ sure (0bin.net/paste/… $\endgroup$ – beyblade41 Dec 23 '19 at 23:33
  • $\begingroup$ do you think the 'output_image' should be cast into uint8 before being used in the formula? $\endgroup$ – MimSaad Dec 24 '19 at 6:05
  • $\begingroup$ output_image is double in this formula. when i cast it to uint8 , y equals to 0. $\endgroup$ – beyblade41 Dec 24 '19 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.