Get Started         Best Practices         Developer Guide         FAQ        
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Providing NV21 image to CraftAROnDeviceIR?

Eutdeum Kim Jan 24, 2018

Hello there,

I'm currently working on integrate IR stuff to the company's app.
I succeeded in recognizing by providing Bitmap to CraftAROnDeviceIR and now am trying to connect camera preview with it.
But, because android camera preview returns NV21 byte array, I had to convert NV21 into Bitmap before providing it to CraftAROnDeviceIR.
As you know, it is a kind of time-consuming task.

Is there way to provide NV21 to CraftAROnDeviceIR directly?
I saw CraftARQueryImage has a constructor for NV21 image but it is not public so I couldn't use it.

Thanks!
Eutdeum


( Agent )
Luis Martinell

Jan 29, 2018

Hi Eutdeum,

Using the NV21 constructor, the SDK will eventually convert the image to a bitmap. Here’s some advices to mitigate the overhead:

  • Ask the camera for lower resolution images (if possible)
  • Resize the image before creating the CraftARQuery image (don’t go lower than half the size of the image)
  • Run the task in a background thread to prevent the UI from freezing.

I hope this helps.

Best regards,

Luis

0 rated
Eutdeum Kim

Jan 29, 2018

Thanks!

Eutdeum
0 rated

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Couldn't find what you were looking for?

support@catchoom.com
https://cdn.desk.com/
false
catchoom
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete