BlinkReceipt / blinkreceipt-android

MIT License
49 stars 16 forks source link

Missing values that are available in Blink Receipt Web Api #46

Closed vtn-dev-manish closed 1 year ago

vtn-dev-manish commented 1 year ago

The webapi of from Blink contains the following additional information: "is_blurry": false, "is_receipt": true, "is_screen": false, How can we get these in android and IOS?

We do have "raw_text": "raw ocr text"

@Override
public void onRecognizerResultsChanged(@NonNull RecognizerResult result) {
if ( result instanceof OcrRawResult ) {
OcrRawResult ocrRawResult = (OcrRawResult) result;
}
}
dpanzer commented 1 year ago

Hi @vtn-dev-manish - on iOS you can access these properties by implementing your own custom view controller and then in the callback for when the user snaps a picture, we provide a BRFrameAttributes object that contains these properties. The guide for implementing a custom camera controller is here: https://blinkreceipt.github.io/blinkreceipt-ios/custom-camera-controller.html and the specific method is this: userSnappedPhotoOnReady

@pequots34 Can provide guidance for Android

pequots34 commented 1 year ago

@vtn-dev-manish when you get a picture with the recognizer view you will get a Take Picture Result, which will have those properties.

captureFrame.setOnClickListener(v -> recognizerView.takePicture(new CameraCaptureListener() {

        @Override
        public void onCaptured(@NonNull BitmapResult results) {
            if (results instanceof TakePictureResult) {
                TakePictureResult picture = (TakePictureResult) results;
            }

            recognizerView.confirmPicture(results);
        }

        @Override
        public void onException(@NonNull Throwable e) {
        }

    }));
vtn-dev-manish commented 1 year ago

Hi @pequots34 Thanks for the reply

Is there a way I can get these values in override fun onRecognizerDone(results: ScanResults, media: Media) {

As I need to know these values for images that are selected by user. Can we have these values in ScanResults object

pequots34 commented 1 year ago

its currently only available when you take a picture.

vtn-dev-manish commented 1 year ago

Can we expect it to be in the next update as we also have a usecase where we send bitmaps to blink receipt sdk?

pequots34 commented 1 year ago

no this is not currently a feature we support, but will pass this along to our product team.