gcv2hocr
gcv2hocr copied to clipboard
gcv2hocr2.py - Support using vertices instead of normalizedVertices for bbox
Currently in gcv2hocr2.py
, the coordinate of the bounding box for block
, paragraph
, and word
is created from their respective boundingBox.normalizedVertices
:
https://github.com/dinosauria123/gcv2hocr/blob/40adc1026fc10a0fbe746a0a26329d0e9bcd527a/gcv2hocr2.py#L123 https://github.com/dinosauria123/gcv2hocr/blob/40adc1026fc10a0fbe746a0a26329d0e9bcd527a/gcv2hocr2.py#L129 https://github.com/dinosauria123/gcv2hocr/blob/40adc1026fc10a0fbe746a0a26329d0e9bcd527a/gcv2hocr2.py#L135
Is it possible to create a new flag in argparse.ArgumentParser
to enable the script to use boundingBox.vertices
when creating the boxes, in case when boundingBox.normalizedVertices
is not available? Thanks!
Edit: typo