HarvestProfit / react-native-rectangle-scanner

React Native Document/Rectangle Scanner
MIT License
196 stars 62 forks source link

onPictureProcessed callback to receive detectedRectangle with interpolated coordinates and dimensions #52

Open dibat opened 4 years ago

dibat commented 4 years ago

How about onPictureProcessed callback to receive detectedRectangle but with interpolated bottomLeft, bottomRight, topLeft, topRight coordinates and dimensions in regards of the final initialImage dimensions? Right now, the detectedRectangle is usable only for RectangleOverlay, but if you need it later for an additional perspective crop processing (using https://github.com/Michaelvilleneuve/react-native-perspective-image-cropper for example) it is not usable since its aspect ratio doesn't correspond the final initialImage dimensions.

humphreyja commented 4 years ago

@dibat We have been discussing the ability to send coordinates to the api for manual cropping. I think it'd be a great addition to this package. (Allowing developers to create photo editors similar to the iPhone document scanner that comes with the notes app).