Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
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.
HUAWEI HMS Core
Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.
| class info |
| com.huawei.hms.mlplugin.card.bcr.MLBcrCapture |
| Represents the bank card recognition plug-in. |
| Return type | Method name |
| void | captureFrame(android.content.Context context, MLBcrCapture.Callback callback) |
| Method |
| public void captureFrame(android.content.Context context, MLBcrCapture.Callback callback) |
| Recognizes bank card information in camera streams. |
Parameters
| Parameter name | Parameter desc |
| context | Context. |
| callback | Recognition result callback. |
Sample Code
- MLBcrCaptureConfig config = new MLBcrCaptureConfig.Factory()
- // Set the recognition screen orientation.
- // MLBcrCaptureConfig.ORIENTATION_AUTO: adaptive mode. The physical sensor decides the recognition screen orientation.
- // MLBcrCaptureConfig.ORIENTATION_LANDSCAPE: landscape mode. The screen width is greater than the screen height.
- // MLBcrCaptureConfig.ORIENTATION_PORTRAIT: portrait mode. The screen height is greater than the screen width.
- .setOrientation(MLBcrCaptureConfig.ORIENTATION_AUTO)
- .create();
- MLBcrCapture bankCapture = MLBcrCaptureFactory.getInstance().getBcrCapture(config);
- // Recognizes bank cards. You can specify the class instance for implementing the callback API.
- bankCapture.captureFrame(this, callback);
Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Quick start
Helps you find desired resources with ease.