Advertisement
dan-masek

Untitled

May 3rd, 2018
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.07 KB | None | 0 0
  1. import numpy as np
  2. import cv2
  3.  
  4. data = [
  5.     49,48,49,57,68,76,62,59,46,54,62,58,68,64,45,60,65,51,56,70
  6.     ,76,72,62,62,66,59,65,62,53,65,62,67,75,58,59,57,67,64,64,63
  7.     ,54,64,55,67,67,61,64,43,66,60,59,73,48,74,88,77,65,54,69,57
  8.     ,80,59,42,56,79,51,53,67,64,40,53,68,74,83,60,81,53,37,42,72
  9.     ,61,71,73,75,79,63,64,66,70,60,64,61,68,64,56,60,60,61,67,61
  10.     ,60,62,69,83,66,64,76,63,62,72,66,70,58,61,77,83,76,71,75,63
  11.     ,58,75,74,61,67,54,58,59,55,46,54,61,52,81,56,59,53,66,45,50
  12.     ,49,60,67,63,64,66,76,63,69,62,71,66,67,63,57,55,61,54,63,63
  13.     ,74,62,64,73,59,64,56,68,67,54,65,70,60,52,53,59,71,66,63,68
  14.     ,34,56,53,57,65,52,65,65,75,73,72,59,40,61,64,72,54,72,66,55
  15.     ,59,63,65,69,63,60,70,68,67,59,60,69,69,74,69,64,64,60,63,66
  16.     ,75,66,73,61,52,65,53,58,58,44,51,56,75,56,61,53,52,62,62,60
  17.     ,54,41,39,38,49,29,48,58,60,72,56,53,52,57,66,68,65,70,54,77
  18.     ,59,69,59,78,70,66,71,63,76,74,67,63,64,63,59,68,68,61,63,55
  19.     ,68,63,68,64,53,65,63,63,49,55,53,60,60,51,66,69,49,55,54,52
  20.     ,71,61,58,47,69,48,45,55,51,69,65,72,79,58,77,60,65,69,56,62
  21.     ,61,46,54,62,75,77,68,64,73,69,66,64,55,63,68,62,65,71,67,59
  22.     ,72,69,69,63,68,64,59,59,70,65,55,69,46,54,70,66,62,60,65,52
  23.     ,61,57,67,71,85,62,50,73,63,80,59,71,105,78,57,80,73,74,79,70
  24.     ,66,54,65,60,55,55,66,56,55,57,68,66,51,64,49,47,51,53,62,66
  25.     ,73,57,61,63,72,73,61,68,52,64,58,62,58,61,69,72,69,82,80,60
  26.     ,77,61,69,57,76,59,40,57,55,62,60,45,71,57,64,54,81,81,63,71
  27.     ,68,59,66,54,73,64,78,69,63,66,73,72,57,74,56,55,50,48,61,62
  28.     ,52,61,68,64,71,70,71,74,67,70,52,69,56,63,81,62,55,64,72,62
  29.     ,76,75,75,54,79,49,46,42,31,51,48,56,65,55,58,43,61,75,52,69
  30.     ,60,54,56,63,65,69,79,68,67,72,64,66,71,67,62,61,66,61,67,58
  31.     ,58,63,68,63,56,59,63,55,58,62,52,70,60,68,71,67,59,63,61,59
  32.     ,86,59,56,78,66,67,46,69,45,52,70,73,58,71,67,50,55,51,60,71
  33.     ,64,65,58,52,60,68,63,59,71,85,57,53,64,62,69,60,54,62,70,58
  34.     ,51,53,71,60,59,76,80,69,64,76,74,62,67,61,56,57,69,66,62,67
  35.     ,57,65,73,54,55,52,50,54,65,78,70,62,59,77,71,57,69,55,81,78
  36.     ,60,70,51,61,75,72,66,57,59,51,61,62,63,61,65,67,57,67,70,56
  37.     ,62,56,82,68,58,56,74,63,65,69,68,69,79,74,65,53,61,58,64,70
  38.     ,44,56,63,75,58,55,65,72,73,65,65,76,76,56,51,76,75,63,51,56
  39.     ,73,73,61,69,67,74,68,66,64,59,73,60,68,69,63,66,59,66,62,53
  40.     ,57,62,73,65,62,61,57,50,63,75,68,58,54,65,74,54,68,60,71,63
  41.     ,64,50,81,67,39,36,70,84,77,68,64,56,63,66,73,81,63,50,22,24
  42.     ,74,71,59,60,77,71,49,51,59,58,69,77,65,72,51,53,48,53,40,27
  43.     ,55,53,56,62,65,73,68,74,69,67,68,47,43,58,72,63,67,56,69,60
  44.     ,61,61,78,67,47,70,88,76,70,76,80,70,60,72,52,67,64,36,25,9
  45.     ,70,79,53,59,75,73,59,50,51,60,62,68,74,61,59,56,44,31,20,5
  46.     ,62,49,51,67,65,54,67,76,74,71,57,54,61,48,64,64,64,57,63,63
  47.     ,61,67,69,60,46,68,60,58,54,73,72,75,68,59,46,55,43,34,32,5
  48.     ,63,68,58,71,64,49,60,68,52,56,63,56,56,66,52,43,35,24,14,6
  49.     ,49,56,57,64,71,66,68,62,71,65,66,57,68,60,66,72,67,59,64,60
  50.     ,76,74,69,45,41,68,66,68,76,77,50,67,65,77,62,46,28,21,25,7
  51.     ,64,59,63,64,73,67,62,58,55,48,63,61,60,40,33,22,26,20,19,23
  52.     ,57,56,59,69,75,73,49,72,67,69,70,68,70,58,57,56,63,58,56,54
  53.     ,79,56,68,66,43,73,67,63,74,65,75,50,38,42,42,24,23,4,22,27
  54.     ,60,55,63,67,66,57,70,64,71,58,48,46,44,18,20,8,13,13,21,20
  55.     ,60,58,61,72,64,62,62,55,58,72,68,64,72,63,67,67,66,66,67,57
  56.     ,69,58,55,65,48,60,64,64,68,57,50,22,18,44,24,18,24,19,34,35
  57.     ,64,68,66,73,72,71,65,60,67,48,39,22,25,9,1,8,17,21,20,22
  58.     ,62,61,61,54,62,60,62,53,50,59,58,64,67,63,72,74,71,59,59,45
  59.     ,75,50,55,57,81,64,72,60,59,40,29,19,18,47,27,20,24,25,19,43
  60.     ,68,68,69,65,57,64,63,44,51,47,29,14,16,6,0,16,25,24,13,17
  61.     ,65,76,69,56,62,67,70,71,62,62,67,75,70,61,66,74,63,57,68,59
  62.     ,72,66,70,70,65,60,81,41,25,32,20,21,6,10,17,17,27,18,29,43
  63.     ,58,54,60,57,54,58,49,27,32,27,13,2,18,14,17,22,25,26,32,22
  64.     ,67,75,75,74,81,76,66,79,80,58,60,65,60,63,55,42,55,60,66,79
  65. ]
  66.  
  67. image = np.array(data, dtype=np.uint8).reshape(60,-1)
  68.  
  69. b,g,r = image[::3,],image[1::3,],image[2::3,]
  70.  
  71. result = cv2.merge([b,g,r])
  72.  
  73. cv2.imwrite("little.png", result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement