Author: Not specified Language: python
Description: Not specified Timestamp: 2017-09-18 19:08:47 +0000
View raw paste Reply
  1. def log_transformation(image,constant = 1):
  2.   height, width = image.shape
  3.   new_image = image.copy()
  4.   for h in range(0,height):
  5.       for w in range(0,width):
  6.           new_image[h,w] = constant * np.log10((image[h,w]/255) + 1)*255
  7.   return new_image
View raw paste Reply