Any ideas how to use JSON from requests.post to make a cv2 rectangle?

How would I go about turning this into a rectangle in cv2? Also, if there’s a way to save the image with overlay from ocr.space, that would work too.

Example return. This is the top line of one of my images:
{
“LineText”: “New Jersey”,
“MaxHeight”: 76.0,
“MinTop”: 48.0,
“Words”: [
{
“Height”: 56.0,
“Left”: 188.0,
“Top”: 48.0,
“Width”: 216.0,
“WordText”: “New”
},
{
“Height”: 76.0,
“Left”: 416.0,
“Top”: 48.0,
“Width”: 320.0,
“WordText”: “Jersey”
}
]
}

Do you need source code on how to draw the overlay? You can look at the Copyfish source code, it uses the OCR API, too.

Any chance you could link it? I can’t seem to find source code anywhere.

Sorry, forgot. Here: GitHub - A9T9/Copyfish: Copy, paste and translate text from images, videos and PDFs with this free Chrome extension => Copyfish/overlay.js at master · A9T9/Copyfish · GitHub

Probably a dumb question, but is there no way to do this in Python?

Sorry I cant help you with it.