Author: Not specified Language: python
Description: Not specified Timestamp: 2017-09-19 00:29:06 +0000
View raw paste Reply
  1. def powerrating_transformation(image,gama, 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 * ((image[h,w]/255) ** gama) * 255
  7.         return new_image
View raw paste Reply