edge_detector 1.0.1
edge_detector: ^1.0.1 copied to clipboard
Edge detector plugin based on google ml kit object detection. Allows basic edge detection for given image.
edge_detector #
Edge detector plugin based on google ml kit object detection. Allows basic edge detection for given image file.
💡 Please note that this package is just for edge detection. 💡
Please check other packages for cropping tools:
- auto_crop - available for Android & iOS only.
- custom_cropper
Preview #
Example usage #
Basic usage #
Future<void> _detectEdges() async {
final imageFile = File('path/to/image');
final edges = await EdgeDetector().detectEdges(imageFile);
if (edges == null) return;
final topLeft = edges.topLeft; // Offset(x,y).
final topRight = edges.topRight; // Offset(x,y).
final bottomRight = edges.bottomRight; // Offset(x,y).
final bottomLeft = edges.bottomLeft; // Offset(x,y).
final all = edges.values; // [topLeft, topRight, bottomRight, bottomLeft].
}
Full example #
Full example showing how to set up and use EdgeDetector. Source code