Permalink
Browse files

Improve output for bruteforce.

  • Loading branch information...
1 parent b5bb3ac commit 96366da4ca4ec9d3613ccff7ff4945f609b39f33 @ali1234 committed Oct 25, 2012
Showing with 3 additions and 4 deletions.
  1. +2 −3 bruteforce.py
  2. +1 −1 vbi.py
View
@@ -36,7 +36,6 @@ def process_file(filename):
try:
f = file(filename).read()
for line in range(32):
- print line
offset = line*2048
vbiraw = np.array(np.fromstring(f[offset:offset+2048], dtype=np.uint8), dtype=np.float32)
for tl in np.arange(1.05,1.2,0.05):
@@ -49,10 +48,10 @@ def process_file(filename):
if tmp:
packet = v.deconvolve()
guessview.draw(vbiraw, v.g.convolved*256)
- print printer.do_print(packet), "thresh_low=%1.2f thresh_high=%1.2f gauss_sd=%1.2f gauss_sd_offset=%1.2f" % (tl, th, g, go)
+ print printer.do_print(packet), "thresh_low=%1.2f thresh_high=%1.2f gauss_sd=%1.2f gauss_sd_offset=%1.2f" % (tl, th, g, go), line
else:
packet = None
-
+ print "no teletext in line", line
except IOError:
pass
View
2 vbi.py
@@ -90,7 +90,7 @@ def find_offset_and_scale(self):
# Split into chunks and ensure there is something "interesting" in each
target = gauss(self.vbi, self.gauss_sd_offset)
- d = [np.std(target[x:x+128]) < 5.0 for x in range(64, 2048, 128)]
+ d = [np.std(target[x:x+128]) < 5.0 for x in range(64, 1440, 128)]
if any(d):
return False

0 comments on commit 96366da

Please sign in to comment.