gcv2hocr icon indicating copy to clipboard operation
gcv2hocr copied to clipboard

gcv2hocr2.py - Support using vertices instead of normalizedVertices for bbox

Open SoloSynth1 opened this issue 3 years ago • 5 comments

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

SoloSynth1 avatar Mar 24 '21 10:03 SoloSynth1