feat: Preserve Aspect Ratio Option
Context: Many computer vision algorithms and ML models require an input in which the aspect ratio of the original image is preserved by scaling the image down equally along both axis and then pad the rest of the input space with black or white pixels. A good example of this is the image resize method in the Tensorflow framework https://www.tensorflow.org/api_docs/python/tf/image/resize
This adds an option called preserveAspectRatio to the resize method which when set to true applies this resizing for the input instead of performing any kind of cropping. Mirror and rotation operations still apply afterwards though
Heyo - this is still WIP?
Hey @mrousavy yes - still a WIP as I need to fix this on Android but need the modular pipeline from #72 to be able to do this - on Android I need to correct for sensor rotation first and then apply the resize op here otherwise the image would be distorted
Hello, I think that I made a PR with the same purpose as yours. See #77. I'm struggling to implement the Android part, as the color channel doesn't work as I expected on Galaxy. Your PR neither doesn't include Android implementation. Did you have the same problem with me?