edge_detector 0.0.1
edge_detector: ^0.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 and cropping for given image.
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