SHARE
TWEET

Untitled

a guest Jul 18th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PIXEL_NORMALIZATION_FACTOR = 12.5
  2. PIXEL_OFFSET_FACTOR = 150
  3.  
  4. for row_index in range(row_count):
  5.     for column_index in range(column_count):
  6.         for color_channel_index in range(color_channel_count):
  7.             normalized_pixel_value = (
  8.                 original_pixel_array[row_index][column_index][color_channel_index]
  9.                 * PIXEL_NORMALIZATION_FACTOR
  10.             )
  11.             transformed_pixel_array[row_index][column_index][color_channel_index] = (
  12.                 normalized_pixel_value + PIXEL_OFFSET_FACTOR
  13.             )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top