GithubHelp home page GithubHelp logo

Comments (5)

Shubhamp777 avatar Shubhamp777 commented on August 28, 2024 1

Oh, Okay :)

Thanks a lot for your valuable reply.

Regards,
Shubham

from blinkid-in-browser.

vjekoart avatar vjekoart commented on August 28, 2024

Hi @Shubhamp777,

Before instance of recognizer runner is created, one can register various MetadataCallbacks. One of the callbacks provided is onDetectionFailed. This callback is called when all recognizers in RecognizerRunner have failed to detect anything on the image.

This callback is used in provided examples. It's possible to see how the callback is used in Scan from camera example.

Sincerely,
Vjekoslav

from blinkid-in-browser.

Shubhamp777 avatar Shubhamp777 commented on August 28, 2024

Hi vjekoart,

I applied your suggestion in my code.
But I also want to know , If detection is completely failed during the scan. then what it returns any callback for the same.
Could you please let me know this also?

Suppose If scanning of any document doesn't exctract the data. This case It should also return a call back/ It does?

Thanks,
SP

from blinkid-in-browser.

vjekoart avatar vjekoart commented on August 28, 2024

Hi @Shubhamp777,

Callback onDetectionFailed is one mechanism to get notified when nothing will be extracted. Another mechanism is to check if results are empty. This should be done when extraction is finished, and when there is no need to keep camera on anymore.

Based on the Scan from camera example, once the results have been retrieved with const processResult = await videoRecognizer.recognize();, it's useful to check if results are empty, or if there is some data available.

To check if results are empty, simple if condition will do:

if ( processResult !== BlinkIDSDK.RecognizerResultState.Empty )
{
    // Do something with results
}
else
{
    // Notify user that data cannot be extracted
}

Hope this helps.

Sincerely,
Vjekoslav

from blinkid-in-browser.

vjekoart avatar vjekoart commented on August 28, 2024

Hi @Shubhamp777,

Have you managed to implement desired behaviour in case of failed detection and/or empty results?

Sincerely,
Vjekoslav

from blinkid-in-browser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.