blinkinput / blinkinput-ios

OCR SDK for iOS powered by MicroBlink
Apache License 2.0
130 stars 26 forks source link

Is it possible to scan a hologram image Using MBIImageReturnProcessor ? #51

Open himanshujindal8 opened 3 years ago

himanshujindal8 commented 3 years ago

Is it possible to scan a hologram image Using MBIImageReturnProcessor ?

mparadina commented 3 years ago

Hi @himanshujindal8

Thank you for waiting for our response.

At the moment, we do not support scanning and information extractions from holograms. Once we do, I will certainly get back to you here.

Let me know if you have any additional questions in the meantime.

Regards, Milan

himanshujindal8 commented 3 years ago

Hi,

Okay thanks for your reply. One more question, Is there any possibility to compare a part of image with a different image ?

mparadina commented 3 years ago

Hi @himanshujindal8

Can you please give me more information regarding the image comparison question? Do you need to compare the images because of verifications or some other reason?

Will all images be taken via the SDK?

Regards, Milan

himanshujindal8 commented 3 years ago

Hi @mparadina,

Yes I need it for verification purpose. The document scanned from SDK will be compared with an image that we have got locally with us just for verification. Whether scanned document image contains the image or not ? Your inputs are valuable to us.

Thanks, Himanshu

mparadina commented 3 years ago

Hi @himanshujindal8

Thank you for the clarification.

From my understanding of the inquiry, I can suggest using the Document Capture recognizer, which only takes the cropped document image: https://github.com/blinkinput/blinkinput-ios#-document-capture-recognizer

With it, you can get the cropped image of the document with the fullDocumentImage method when the recognizer enters the valid state.

The part of the code would look like this:

func barcodeOverlayViewControllerDidFinishScanning(_ barcodeOverlayViewController: MBIBarcodeOverlayViewController, state: MBIRecognizerResultState) {

        // check for valid state
        if state == MBIRecognizerResultState.valid {
            // first, pause scanning until we process all the results
            barcodeOverlayViewController.recognizerRunnerViewController?.pauseScanning()

            DispatchQueue.main.async(execute: {() -> Void in
                let image = self.documentCaptureRecognizer?.result.fullDocumentImage?.image
                //perform the verification actions with the obtained image
            })
        }
    }

Also to add, maybe using our BlinkID SDK might help in achieving your use case. For instance, with it, you can scan both sides of the document, extract the information from it (if needed), and take both cropped full document images (both, front and backside), and send the images for your internal verification.

You can find more information here: https://github.com/BlinkID/blinkid-ios

Also, you can use the BlinkID Combined recognizer to capture both sides of the document and retrieve full document images: http://blinkid.github.io/blinkid-ios/Classes/MBBlinkIdCombinedRecognizerResult.html

If you only want to scan, for instance, the front side of the document, you can use the BlinkID recognizer: https://github.com/BlinkID/blinkid-ios#-blinkid-recognizer

Let me know if you have any additional questions.

Regards, Milan