We have a product where we let users create Tif OCR template and then process Tif images to populate fields based on the template to match on OCR anchor.
It all works great if the template and processing images have same DPI. However it doesn't work if the DPI are not same. For example we found an issue where the template Tif has 300 DPI resolution. Whenever process images of 200 DPI resolution against the template, it doesn't return the correct coordinates for the anchor, which then results in wrong data field values.
We have tried to scale or manually set the resolution to same value, but still the anchor is not right.
We have also tried to do some math and calculate search coordinates in inches and then calculate pixels depending of the resolution but it doesn't seem to work right.
Please download the example Tif files in below link. 300 DPI tif is used to create template. The anchor coordinates are stored in inches in database. 200 DPI tif is then processed for data fields against the template. When processed the resulting anchor found is way bigger which is not right and results in incorrect OCR data.
https://drive.google.com/file/d/1DMXblT ... sp=sharing
The only possible solution here is that your template and all candidates need to have the same characteristics so the results are consistent. That means if the template is 300 DPI then the candidates should also be 300 DPI with the same kind of acquisition context. Of course, you can re-scale the 200 DPI candidate using appropriate methods (not only changing the DPI), but it is not recommended, as it produces bad results either.
Let us know if it helps.
But we think it getting right anchor should work regardless of the DPI as we supplying the coordinate pixels converted from inches when template was created.
I think two functions CreateAnchorTemplate() and FindAnchor() could be improved to get the right result.
We are a paying customer, can we please open up a technical support ticket? I have asked another question about OCR on Tif files that we are having trouble with. The whole mechanism of GDPicture creating Tif does something weird to the final file, that screws up the OCR and anchoring coordinates.
Who is online
Users browsing this forum: No registered users and 0 guests