Hi!
Can anyone help me, i'm trying to locate a specific rect on the image (attached), i need to identify the rect that contains the number (NF on my country is Invoice) - i put the red line to show the area that i need to get.
Thanks!!
![]() |
|
|||||
|
||||||
How to locate specific rect on image
6 posts
• Page 1 of 1
How to locate specific rect on imageHi!
Can anyone help me, i'm trying to locate a specific rect on the image (attached), i need to identify the rect that contains the number (NF on my country is Invoice) - i put the red line to show the area that i need to get. Thanks!!
Re: How to locate specific rect on imageHello,
Are you looking for rectangle, which contains NF-e and can be anywhere in the image? Or you just need to locate to right most one?
Re: How to locate specific rect on image
Hi! The rect containing the NF-e is always on the right side of the image. Thx for your reply!
Re: How to locate specific rect on imageHello,
Try thresholding then with Blob Counter on top. If the black border is thinck enough and is not broken, then innter white area should be possible to find as a single blob.
Re: How to locate specific rect on image
I've tried it and got detects about 60% - 70% (good results, but not enough yet because i need to scan about 80.000 documents / monthly). I applied gamma correction (0.5), threshold (about 130 - 135) and color filtering (range in 211 - 255, white) and (range 0-210, black) to "try' to improve results, but it doesn't work well for me. I've attached my result as follows: After "detection" i will run an OCR to get the numbers (Nº) and serial number (ŚERIE) of the image, i'm using blobs to detect rect on thresholded image, but the crop i'm applying on original image with the detected rect to run OCR, when rectangle is detected OCR run like a charm, but when detection fails i get no result ;/ Is there any way to "reforce" the lines on image to improve the detection or another way? Thanks a lot for the help!
Re: How to locate specific rect on imageHit and Miss filter done the job!
Thanks a lot for help! Result:
6 posts
• Page 1 of 1
|
![]() |
|