T O P I C R E V I E W |
jeffp |
Posted - Oct 01 2024 : 18:18:05 As the documentation states, CalcOrientation can only detect 0° or 90° orientation. The problem I have is that a document rotated 90% to the left AND 90% to the right both give me the same result, 90. I'm looking to do an Auto Rotate but I would need to know which one is 90% and which on is -90% to get it right. It would also be nice to know if the document was 180% too.
Is the a workaround or would you consider making this call a bit more powerful as described above?
jp |
18 L A T E S T R E P L I E S (Newest First) |
jeffp |
Posted - Oct 07 2024 : 17:54:29 Got it. Thanks.
jp |
xequte |
Posted - Oct 07 2024 : 17:44:01 Hi Jeff
We've sent you an update that should work better at detecting the orientation in these sparse text images, however it may still fail if the text is too unclear to be read well.
Nigel Xequte Software www.imageen.com
|
xequte |
Posted - Oct 05 2024 : 16:51:57 Hi
Are you passing this language path to: TIEBitmapHelper.OCR_GetOrientation()?
https://www.imageen.com/help/TIEBitmapHelper.OCR_GetOrientation.html
Nigel Xequte Software www.imageen.com
|
jeffp |
Posted - Oct 04 2024 : 21:52:18 I have my TrainedData files in a subfolder off the main exe path. Is that a problem. It works with TIEVisionOCR since I can set the path there.
jp |
xequte |
Posted - Oct 04 2024 : 19:30:35 Hi Jeff
We're looking at the documents provided above to see if we can get orientation information even for the sparse text ones. At this time there is no way to get progress information.
What is the error that you are getting with OCR_GetOrientation()?
Do you have ievision.dll, eng.TrainedData and osd.TrainedData in your current Windows folder?
Nigel Xequte Software www.imageen.com
|
jeffp |
Posted - Oct 04 2024 : 11:59:45 Is there a way to get progress information from the OCR process?
|
jeffp |
Posted - Oct 04 2024 : 11:07:29 Ok. Now that I have IEVision I'm try to use the Helper function for IEBitmap. I'm trying this example out of the help.
deskewAngle := ImageEnView1.IEBitmap.OCR_GetOrientation(); if deskewAngle <> 0 then ImageEnView1.Proc.Rotate( -deskewAngle, ierFast, clWhite );
However, I'm getting a error in the OCR_GetOrientation call.
Do I need to configure the OCR engine and set language files somewhere before I make this call?
Thanks.
jp |
jeffp |
Posted - Oct 03 2024 : 23:20:14 Got it. Thanks.
Also, what version on the Tesseract OCR engine is IEVision using?
jp |
xequte |
Posted - Oct 03 2024 : 21:20:22 Hi Jeff
Just emailed it.
Nigel Xequte Software www.imageen.com
|
jeffp |
Posted - Oct 03 2024 : 09:00:27 Just ordered IEVision, so I'd love for you to email me the beta so I can use the helper.
jp |
xequte |
Posted - Oct 02 2024 : 20:21:58 Hi Jeff
You could certainly use methods to confirm that the result is as expected, such as checking the text boxes.
As you can see with your 90A image, OCR has failed because of the low quality of the text, but it still correctly gets the text box position:
The OCR_GetOrientation() fix is available in the current beta if you want to email me for it, alternatively just avoid using the helper (as the IEVision code itself is not affected).
Nigel Xequte Software www.imageen.com
|
jeffp |
Posted - Oct 02 2024 : 18:56:06 With all the document processing we do on new and existing images, we turn them into searchable PDFs by running an OCR process. In our current process, we always analyze the page orientation first, then rotate it straight up before running it through any of our OCR engines (we find the OCR is much better if the page is straight up going into the engine). So for for us, it's critical to have a reliable call to get an image's correct orientation. Again, 99% of what we do are text based images. I'm happy to work with you on this one if we can figure out a better way to get orientation. Happy to pay for some dev hours as well if needed.
jp |
jeffp |
Posted - Oct 02 2024 : 17:49:28 Also, as to my orientation issue, is there a way to calculate the orientation even on the files with little text by doing an OCR process and analyzing the coordinates of the Word or Line boxes?
jp |
jeffp |
Posted - Oct 02 2024 : 17:41:28 Interesting.
When will the Helper functions like TIEBitmapHelper.OCR_GetOrientation be working again?
jp |
xequte |
Posted - Oct 02 2024 : 17:21:30 Hi Jeff
The results are as follows:
Orientation90A.bmp: Fail Orientation90B.bmp: OK Orientation180A.bmp: Fail Orientation180B.bmp: OK Orientation270A.bmp: Fail Orientation270B.bmp: OK
It looks like all the "A" images have too little text for it to calculate the orientation.
Nigel Xequte Software www.imageen.com
|
jeffp |
Posted - Oct 02 2024 : 12:01:32 Note: Avoid using the helper method TIEBitmapHelper.OCR_GetOrientation which has an issue with skewed documents (or email us for the latest beta).
I'd love to get on the beta here when I try IEVision. I do a ton with scanned documents so I deal a lot with OCR and Orientation, etc.
I'll have some good test docs for this.
jp |
jeffp |
Posted - Oct 02 2024 : 09:54:54 Nigel,
Before I buy the IEVision component can you make sure the Orientation call in IEVision gets these correct.
See attached zip file.
--Jeff
attach/jeffp/202410295315_Orientations.zip 74.22 KB
jp |
xequte |
Posted - Oct 01 2024 : 22:55:58 Hi Jeff
CalcOrientation uses an algorithm that is based on histogram density, without understanding the content of the document, so it can only detect 0° or 90° orientation. It cannot detect inverted text, and will give an inaccurate result for documents that are right-rotated.
For more accurate orientation detection use:
https://www.imageen.com/help/TIEVisionOCR.getOrientation.html
Note: Avoid using the helper method TIEBitmapHelper.OCR_GetOrientation which has an issue with skewed documents (or email us for the latest beta).
https://www.imageen.com/help/TIEBitmapHelper.OCR_GetOrientation.html
Nigel Xequte Software www.imageen.com
|