Start a new topic

Detection on taken picure (static image)

Hi,


We use the SDK to take a picture when in a specific position regarding to the detected target.

The taken picture is then provided to the SDK (replacing the camera preview) through an input plugin to determine where is the target in the taken picture (the user may have moved during the capture).

On some devices the preview is paused during the capture, and so there are lots of chance that the user moved during capture.


My problem is: when I provide a static image to the SDK, the recognized target is the same as the last preview frame (the one sent before the capture).

Event if the target is not present in the picture (by hiding it with the hand for exemple), the SDK sends me the last recognized target.

I tried to wait for several samples, but still the last recognized target is given.


(I'm using JS SDK 8.5 on android with a native input plugin, and image recognition feature)


Regards,

Laurent


Hi Laurent,



would it be possible to see your input plugin implementation? I would expect input plugins to work just fine with static images.



- Daniel

Hi Daniel,


After some research:


In fact my problem is a synchronisation problem. I use the input plugin's update event to compute position matrix when a target is detected. As sometimes the processing done is a bit heavy, I added a variable that the java side sets to true when a sample is requested, and the native plugin will send an update to the java side only when requested.


During the phase take picture / preview frame replacing, the SDK sends me some updates with previous frame's target or empty recognizedTargetsBucket.

I also noticed that the number of thoses samples varies accross the phones I have.


I can add a synchro to know when the picture is effectively replacing the preview frame when sent to the SDK, but what about the updates ?


So my question is: how many update samples should I wait for (or how many time) to be sure they're about the currently provided frame ?

Or maybe another way to link the update event to the camera frame ?


Thanks,

Laurent






Login or Signup to post a comment