Tegra-optimized Canny

This commit is contained in:
Andrey Kamaev
2011-11-11 14:45:53 +00:00
parent 330357f7dd
commit 4136855ba8
3 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
from optparse import OptionParser
import glob, sys, os
import glob, sys, os, re
if __name__ == "__main__":
parser = OptionParser()
@@ -29,7 +29,7 @@ if __name__ == "__main__":
continue
idx1 = text.find("<tbody>") + len("<tbody>")
idx2 = html.rfind("</tbody>")
html = html[:idx2] + text[idx1:]
html = html[:idx2] + re.sub(r"[ \t\n\r]+", " ", text[idx1:])
except:
pass