パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.2

flutter_text_detect_area

Flutterテキスト検出エリアのテキスト認識機能は、領域選択ツールをドラッグ・移動・パンすることで、画像の特定領域からのテキストを認識・検出できます。

AndroidiOS
30日間ダウンロード
127
いいね数
29
Pub ポイント
150

パッケージをインストール

flutter pub add flutter_text_detect_area

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutter Text Detect Area は、画像内の特定領域における正確なテキスト認識を目的とした Flutter パッケージです。ユーザーが画像上をドラッグ、移動、またはパンしてセレクタを操作することで、選択した領域からのテキストを分離し検出します。ドキュメントスキャンや画像からのデータ抽出など、焦点を当てたOCRが必要なアプリケーションに最適であり、機械学習およびコンピュータビジョン技術を活用しています。このパッケージは Android および iOS の両方のプラットフォームをサポートしており、モバイルデバイスで利用可能です。pub.dev を通じて Flutter プロジェクトにシームレスに統合できます。

用途

  • ドキュメントスキャン
  • 画像ベースのデータ抽出
  • 選択的テキスト認識
  • モバイルOCRアプリ
  • 画像内のリアルタイムテキスト検出

主な機能

  • ドラッグしてパンする領域選択
  • 正確な領域ベースのテキスト検出
  • クロスプラットフォーム対応(AndroidおよびiOS)
  • Flutterとの簡単な統合
  • リアルタイムOCR処理

適している対象

  • OCR機能を開発する開発者
  • 選択的テキスト抽出を必要とするアプリ
  • 画像分析を備えたモバイルアプリケーション
  • 画像読み取り機能付き教育ツール
  • フィールドデータ収集アプリ

注意事項

  • カメラまたは画像の入力が必要です
  • パフォーマンスはデバイスの機能に依存します
  • 正確性は画像の品質によって異なります
  • 選択範囲内のテキストに制限
  • 低品質の画像に対して追加の前処理が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Flutter Text Detect Area

pub package GitHub stars License: GPLv3 Flutter Compatible Platform


A Flutter plugin that enables text detection from specific areas of an image or live camera preview. Just drag/select the area you want to scan, and let it extract the text using ML Kit.

Perfect for scanning:

  • 🧾 Receipts image
  • 📄 Documents image
  • 📘 PDFs image
  • 🧠 Custom fields in images

🚀 Features

  • 📸 Supports both live camera and gallery image input
  • ✍️ Manual area selection (drag, resize, pan, freeze)
  • 🔁 Detect text once or continuously
  • 📱 Android & iOS support
  • ✅ Simple integration

📦 Installation

Add to your pubspec.yaml:

dependencies:
  flutter_text_detect_area: <latest-version>

Import in your Dart file:

import 'package:flutter_text_detect_area/flutter_text_detect_area.dart';

📸 Preview

Pick Image (GIF) Live Camera (GIF)
Pick Camera
Multi Text Detection (PNG) Single Text Detection Camera (PNG)
Multi Single

📂 Image Picker Setup

Use the image_picker package to choose an image:

final pickedFile = await ImagePicker().pickImage(source: ImageSource.gallery);

✨ Example Usage

Navigator.of(context).push(
  MaterialPageRoute(
    builder: (context) => SelectImageAreaTextDetect(
      detectOnce: true, // Set to false for continuous scan
      enableImageInteractions: true,
      imagePath: pickedFile?.path ?? '',
      onDetectText: (value) {
        if (value is String) {
          print("Detected: $value");
        } else if (value is List<String>) {
          for (int i = 0; i < value.length; i++) {
            print("${i + 1}. ${value[i]}");
          }
        }
      },
      onDetectError: (error) {
        if (error is PlatformException &&
            (error.message?.contains("InputImage width and height should be at least 32!") ?? false)) {
          ScaffoldMessenger.of(context).showSnackBar(
            const SnackBar(content: Text("Selected area must be at least 32x32 pixels.")),
          );
        }
      },
    ),
  ),
);

🔐 Permissions

Android (AndroidManifest.xml)
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
iOS (Info.plist)
<key>NSCameraUsageDescription</key>
<string>Need camera access for live scanning</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Need photo access to pick images</string>

✅ Platform Support

Platform Supported
Android ✅
iOS ✅
Web ❌

🔍 Output Format

  • If detecting once: returns String
  • If detecting multiple areas: returns List<String>

💡 Use Cases

  • Scan receipts for expenses
  • Extract fields from identity cards
  • Detect table content from scanned documents
  • Select and extract from academic papers or books

👨‍💻 Contributors


📄 License

This project is licensed under the GNU GPLv3.

カテゴリー

依存関係

依存関係一覧 7 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。