Start a new topic

OCR and captured image in Xamarin

Hi ,

I finally succeed creating a plugin in Xamarin.

Right know I want to have the captured image in my plugin and after that, I will send the image to an OCR SDKs like Anyline.

I couldn't find any documentation about it.

How can't I convert Frame.GetData() to an image ?

what is the fitting format?




Hello Hamid,

Since you have also created a stack overflow post with more details, our technical team was able to provide some support there. However, providing support for “non-Wikitude product” related issues, as I am sure you can understand, is not possible for us due to time and resources constraints. We have a very active forum community and we provide support to everyone within some days. We appreciate your feedback and we will continue to work hard in order to constantly improve our products and services.

Thanks
Eva

 

Dear Eva

As you know most of the developers using this SDK as a trial to develop a productive application.

Right know my company is working in AR and looking for best AR SDK. beside me, my coworkers are working with other SDKs(like "Layar") to develop the same application and at the deadline, the best SDK will be chosen to buy.

 As you know the linking with other libraries is very important which you have developed only OpenCV and Zbar.

I wish you consider this opinion to be more successful in this field.


Hello Hamid,

Converting the format with jpeg and png with Tesseract is not a Wikitude related issue, so we cannot provide you any support here. I am sure you understand that Wikitude can only provide support for questions and issues directly related to Wikitude products.

Thanks
Eva

 

Dear Alex, thanks for clarifying.

As Eva said in this post I'm using "Tesseract" OCR library.

Now the problem is using YV12 format. I couldn't find any way to convert it to jpeg or png and "Tesseract" can't recognize frame.getData().

It doesn't matter wich SDK it is. I can develop Native Java in Android Studio too.

Hi,


Please note that we do not officially support the Wikitude PluginsAPI for Xamarin,


The Plugins API works in the following way:

  • Frame.getData returns the pointer to the frame data.
  • Frame.getSize returns the size of the frame.
  • Frame.getFrameColorSpace returns the color space of the frame (YV12 for Android/NV21 for iOS if you are not using an InputPlugin).
  • Frame.getFrameStrides (only needed if you are using camera2 on Android)

YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y(Lumincance) plane followed by (W/2) x (H/2) Cr(ChrominanceRed) and Cb(ChrominanceBlue) planes.
NV21 is a 4:2:0 YCbCr planar format comprised of a WxH Y(Lumincance) plane followed by (W/2) x (H/2) Cb(ChrominanceBlue) and Cr(ChrominanceRed) planes where Cb and Cr pixels are interleaved.

These are all the informations you need to know to do whatever you like with the frame. 

Unfortunately there is no sample code available for the Anyline demo but it seems similar to our BarcodePlugin sample which is included in the Wikitude JavaScript API package.

Best Regards,
Alex



Where can I find the source code related to this? "https://www.wikitude.com/showcase/text-recognition-sdk/". It can help me a lot.

Login or Signup to post a comment