Giter VIP home page Giter VIP logo

flutter-simple-edge-detection's Introduction

simple_edge_detection

Note: Substantial parts of the code described here have been created during my working relationship with Truststone Software GmbH.

A Flutter plugin enabling the user to detect edges of a given image. It returns the relative coordinates of the detection rectangle.

Demo

Try out

If you just want to test it, go ahead and clone this repository. Before you can run the example, you need to download the OpenCV library. Download the iOS pack and Android on https://opencv.org/releases/. Afterwards, copy the respective files into the directory of this plugin where project_root is the root folder of this plugin:

# OpenCV for Android
cp -R sdk/native/jni/include project_root
cp sdk/native/libs/* project_root/android/src/main/jniLibs/*

# OpenCV for iOS
cp -R opencv2.framework project_root/ios

Getting Started

Add plugin as dependency

In order to use the package, please verify you have added the latest version to you pubspec.yml:

dependencies:
  flutter:
    sdk: flutter
  simple_edge_detection: local_path_to_this_repository

Import the package in your code

import 'package:simple_edge_detection/edge_detection.dart';

Call the detection using a file path to an image

final picker = ImagePicker();
final pickedFile = await picker.getImage(source: ImageSource.gallery);
final filePath = pickedFile.path;

EdgeDetectionResult result = await EdgeDetector().detectEdges(filePath);

Technical information

This package uses the OpenCV C++ library version 4.4.0 to perform the detection task. It utilizes Dart-FFI to execute the native code.

Tutorial / Infos / Article

Find the respective tutorial about how everything was created and how it's to be used on https://www.flutterclutter.dev/flutter/tutorials/implementing-edge-detection-in-flutter/2020/1509/

flutter-simple-edge-detection's People

Contributors

youaredev123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.