0

I am not really new to python programming, but I am just confused about implementing fundamental retinex (Single Scale Retinex).
I know the Retinex formula : retinex = logI(x,y) - (log(F(x,y)) * I(x,y)) and here is my code:

def singleScaleRetinex(img, sigma):
    retinex = np.log10(img) - np.log10(cv2.GaussianBlur(img, (0,0), sigma))
return retinex

After running my code for single scale output image was almost going to dark just like edge detection. I did on a higher scale and lower scale, but the same output.

Can you help my problem ?
is the code wrong ?

add some question:
we now that

logR(x,y) = LogI(x,y) - Log[G(x,y)*I(x,y)]

but why R(x,y) = LogR(x,y) ? (explain me)

here is my output

SecretAgentMan
  • 2,856
  • 7
  • 21
  • 41

0 Answers0