0

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.

kenfire
  • 1,305
  • 12
  • 23
neha
  • 11
  • 3

1 Answers1

0

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]))
kenfire
  • 1,305
  • 12
  • 23