-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up image cropping and resizing #58
base: master
Are you sure you want to change the base?
Conversation
570fbaa
to
9111635
Compare
Make the function center_crop_and_resize() support non-quadratic output shapes and crop padding shapes. The arguments image_size and crop_padding should be able to either be scalars (like they currently are) or lists or tuples containing both a height and a width.
9111635
to
3daf692
Compare
Hi @krikru |
3daf692
to
e6dc68c
Compare
I have updated my pull request. How does this code look? |
e6dc68c
to
36bb0b3
Compare
To make the process of cropping and resizing images go faster, switch from the resize function in skimage.transform to the resize function in cv2 if cv2 is available on the system, otherwise stick with skimage.transform.resize.
36bb0b3
to
0defe1c
Compare
@qubvel I have three pending pull requests, including this one. Will they be merged? |
Opencv returns BGR image, while scikit-image returns RGB image, I wonder if you tested the result? |
@Clara85 Tested in what regard? When resizing, OpenCV only returns a BGR image if it is fed a BGR image as input; if you feed it an RGB image it will also return an RGB image (it has no way of telling whether the image is a BGR or an RGB image, and therefore won't rearrange the channel order). |
No description provided.