We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesML Kitmlsdk.cardmlplugin.card.bcrMLBcrCapture

MLBcrCapture

class info
com.huawei.hms.mlplugin.card.bcr.MLBcrCapture
Represents the bank card recognition plug-in.

Public Method Summary

Public Methods

Method
public void captureFrame(android.content.Context context, MLBcrCapture.Callback callback)
Recognizes bank card information in camera streams.

Parameters

Parameter nameParameter desc
contextContext.
callbackRecognition result callback.

Sample Code

Collapse
Word wrap
Dark theme
Copy code
  1. MLBcrCaptureConfig config = new MLBcrCaptureConfig.Factory()    
  2.     // Set the recognition screen orientation.
  3.     // MLBcrCaptureConfig.ORIENTATION_AUTO: adaptive mode. The physical sensor decides the recognition screen orientation.
  4.     // MLBcrCaptureConfig.ORIENTATION_LANDSCAPE: landscape mode. The screen width is greater than the screen height.
  5.     // MLBcrCaptureConfig.ORIENTATION_PORTRAIT: portrait mode. The screen height is greater than the screen width.
  6.     .setOrientation(MLBcrCaptureConfig.ORIENTATION_AUTO)
  7.     .create();
  8. MLBcrCapture bankCapture = MLBcrCaptureFactory.getInstance().getBcrCapture(config);
  9. // Recognizes bank cards. You can specify the class instance for implementing the callback API.
  10. bankCapture.captureFrame(this, callback);
This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.