I have tried the function math.exp(),but it is giving error
NewImg[j,k]=a*math.exp(img[j,k])
OverflowError:Python int too large to convert to C long
Here img is my input image.
I have tried the function math.exp(),but it is giving error
NewImg[j,k]=a*math.exp(img[j,k])
OverflowError:Python int too large to convert to C long
Here img is my input image.
Your error is :
OverflowError:Python int too large to convert to C long
You should look at those question:
In the last question there is a recommendation to use decimal module because your exp() function is returning a number with many decimals.
from decimal import Decimal
NewImg[j,k]= Decimal(a*math.exp(img[j,k]))