패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.2.3

ml_card_scanner

은행 신용 카드를 스캔하기 위한 패키지입니다.

AndroidiOS
30일 다운로드
185
좋아요
29
Pub 점수
100

패키지 설치

flutter pub add ml_card_scanner

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

머신러닝을 사용하여 은행 카드와 신용 카드를 스캔하기 위한 Flutter 패키지입니다. 이미지에서 카드 정보를 캡처할 수 있는 사용자 친화적인 인터페이스를 제공하며, 카드 유형, 번호, 만료일 및 카드 소지자 이름을 자동으로 감지합니다. 안드로이드 및 iOS용으로 개발되었으며, 프라이버시와 속도를 위해 디바이스 내 처리를 활용합니다. 결제 또는 금융 앱에 빠른 카드 데이터 추출 기능이 필요한 경우 원활하게 통합할 수 있습니다.

사용 사례

  • 모바일 앱에서 신용카드 정보 입력
  • 자동 카드 정보 캡처
  • 결제 양식 사전 채우기
  • 금융 앱 온보딩
  • 은행 서비스를 위한 문서 스캔

주요 기능

  • 기기 기반의 머신러닝 기반 카드 감지
  • 주요 카드 유형(VISA, 마스터카드 등) 지원
  • 실시간 카드 필드 인식
  • 개인 정보 보호 중심, 클라우드 처리 없음
  • Flutter 플러그인을 통한 간단한 통합

적합한 대상

  • 모바일 뱅킹 애플리케이션
  • 전자상거래 체크아웃 흐름
  • 비용 추적 도구
  • 카드 관리 플랫폼
  • 빠른 카드 입력이 필요한 앱

고려 사항

  • Android 및 iOS에서 카메라 권한이 필요합니다
  • 오래된 기기에서는 성능이 다를 수 있습니다
  • 명확하고 잘 조명된 카드 이미지로 최상의 결과를 얻을 수 있습니다
  • 표준 카드 형식에 한정
  • 비표준 카드 디자인에 대해 보정이 필요할 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

ml_ card_scanner

The ml_card_scanner plugin allows you to scan bank cards.

Features

  • Can scan expiration date, card type and card number
  • Work with horizontal and vertical cards
  • Powered by Google's Machine Learning models
  • Great performance and accuracy
  • Fully offline scan makes it a completely secure scanner.
Warning: This package does not guarantee 100% 
accurate scanning of card details, 
so always give users the opportunity 
to check and modify the data before using it.

Prepare

###Android

  1. Add these to android/grade.properties file:
android.useAndroidX=true
android.enableJetifier=true
  1. In android/app/build.gradle file:
android {
  compileSdkVersion 31 // Set this to at least 31
  minSdkVersion 21 // at least 21
  ...
}
  1. Add the permission to android/app/src/main/AndroidManifest.xml file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  <uses-permission android:name="android.permission.CAMERA"/> 
  ...
 </manifest>

###iOS

Add to ios/Runner/Info.plist file:

<key>NSCameraUsageDescription</key>
<string>Your Description</string>

Add this lines to the top of your Podfile:

# Uncomment this line to define a global platform for your project
 platform :ios, '10.0'

And add the following to end of your Podfile file:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      ... # Here are some configurations automatically generated by flutter

      # You can enable the permissions needed here. For example to enable camera
      # permission, just remove the `#` character in front so it looks like this:
      #
      # ## dart: PermissionGroup.camera
      # 'PERMISSION_CAMERA=1'
      #
      #  Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',

       
        ## dart: PermissionGroup.camera
         'PERMISSION_CAMERA=1',

        ]

    end
  end
end

Usage

Just import the package and call ml_card_scanner an use ScannerWidget in your code:

ScannerWidget(controller: _controller)

Also ScannerWidget have another parameter you can specify:

  • overlayBuilder - set your overlay widget or specify null to use the default;
  • overlayTextBuilder - set your widget or specify null to use the default;
  • cameraPreviewBuilder - set your widget constraints for CameraPreview or specify null to use the default;
  • scannerDelay - set the scan delay or not set to use the default 400 (interval between card scannings in millisecconds);
  • oneShotScanning - set to false - the scan will run continuously, true -scaninng will stop after card detected;
  • overlayOrientation - set the default overlay orientation, by default portrait;
  • cameraResolution - resolution preset for camera, by default high;
  • controller - ScannerWidgetController widget controller to get scanned card details or error;
  • cardScanTries - how many recognition varians to collect before provide scanning result;
  • usePreprocessingFilters - applying built in preprocessing filters to improve recognition quality; would slow down the recognition process, but improve the quality;

See example/lib/ml_card_scanner.dart for implementation.

For ScannerWidgetController have functionality:

  • enable or disable scanning;
  • enable or disable camera preview;
  • set onCardScanned callback;
  • set onError callback;

Example Output :

Number card: 5173949390587465
Type: Master Card
Expiry: 10/24

카테고리

의존성

의존성 목록 5 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.