candidates = [] for roi in rois: cropped = enhanced[roi[1]:roi[1]+roi[3], roi[0]:roi[0]+roi[2]] text = pytesseract.image_to_string(cropped, config='--psm 7 -c tessedit_char_whitelist=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-') if re.search(serial_regex, text): candidates.append((text.strip(), confidence_score))
"serial_number": "SN: X7G9K2L4M1", "cleaned": "X7G9K2L4M1", "confidence": 0.97, "is_valid": true
Please confirm you want to block this member.
You will no longer be able to:
Please note: This action will also remove this member from your connections and send a report to the site admin. Please allow a few minutes for this process to complete.