This repository has been archived by the owner. It is now read-only.

Add BoxImageTransform to pad or crop images instead of resizing #453

Merged
merged 2 commits into from Nov 10, 2017

Conversation

Projects
None yet
3 participants
@saudet
Copy link
Member

saudet commented Nov 6, 2017

Fixes #417

What changes were proposed in this pull request?

Add an alternative fallback to resizing images, one that keeps aspect ratio and size of objects in images by padding and cropping them appropriately from the center.

Also fix PipelineImageTransform not passing Random to transforms

How was this patch tested?

Unit tests including a new one pass. Also performed visual inspection of results.

Add BoxImageTransform to pad or crop images instead of resizing
Also fix PipelineImageTransform not passing Random to transforms

@saudet saudet requested a review from AlexDBlack Nov 6, 2017

@AlexDBlack
Copy link
Member

AlexDBlack left a comment

LGTM overall.
My only question is about "by either padding or cropping them" - under what conditions is an image padded vs. cropped? Is this configurable?
Maybe also note this in the javadoc.

@huitseeker
Copy link
Contributor

huitseeker left a comment

LGTM!

@saudet saudet merged commit bada00d into master Nov 10, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.