master
Pavel 3 years ago
parent 681b67b25d
commit 2f5b066f8d
  1. BIN
      trace/LWTC5q8.png
  2. 19
      trace/trace_1.py
  3. 21
      trace/trace_2.py

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

@ -0,0 +1,19 @@
from scipy import misc
image = misc.imread('LWTC5q8.png')
d = 9
total = 0
for y in range(85):
counter = 0
value = 0
for x in range(30):
if image[x+1,y+5,0] == 0:
counter += 1
value += 2**x
if counter > 3:
length = len(str(abs(value)))+ len(str(abs(y - d)))
if y - d == 0: length -= 2
total += length
print('%2d %2d %9d %2d' % (counter, length, value, y - d))
#print(total, d)

@ -0,0 +1,21 @@
from scipy import misc
image = misc.imread('LWTC5q8.png')
d = 76
total = 0
for y in range(85):
counter = 0
value = 0
for x in range(30):
if image[x+1,y+5,0] == 0:
counter += 1
value += 2**x
if counter > 0:
if y < 30:
continue
length = len(str(abs(value)))+ len(str(abs(y - d)))
if y - d == 0: length -= 2
total += length
print('%2d %2d %9d %2d' % (counter, length, value, y - d))
#print(total, d)
Loading…
Cancel
Save