General questions

recognition in child threads

Can recognition be called in multiple child threads?


Dear Dovy Zou,


thank your for contacting us and your question.


Currently, the recognition cannot be done on several processes, it is a single-thread process.


What is the reason of your question? You are providing the ink in "batch mode", and you would like to speed up the recognition process?


Best regards,


Olivier

Hello, we have more data to identify at this time, so we want to cut into a small number of parts, put multiple sub-threads for segmentation recognition, and finally spliced together. If you say that you don't support multithreading, then this method is not ready for use.


In order not to block the main thread, I put the identification in a single sub-thread, including the destruction of the "Package" after the recognition is also placed in the child thread. Now there is a new problem, the destruction of "Package" will sometimes be very slow, resulting in the next recognition will be reported: 1, Error, -[IINKEngine deletePackage: error:]::172 package is opened; 2, Error , -[IINKEngine createPackage:error:]::139 package is already opened. I guess it should be the last time that the legacy "Package" was not destroyed.


What method do you have over there, which will allow me to speed up the last time to identify the legacy "Package" destruction speed when the amount of data is large?


thank you very much!

Dear Dovy Zou,


currently, in order to prevent the "package is already opened" message, you shall call the "waitForIdle" method before closing the package.


Once editor is in "idle" state, you should be able to properly close the editor, contentPart and contentPackage.


Regarding speeding up the recognition process, this is not possible by itself: text recognition is a very demanding process, and the more ink you provide in "batch mode", the longer the recognition process will take.


Best regards,


Olivier


Login or Signup to post a comment