Skip to content
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

Does cv2.resize () keeping the aspect ratio ? #17069

Closed
brian208579 opened this issue Apr 14, 2020 · 1 comment
Closed

Does cv2.resize () keeping the aspect ratio ? #17069

brian208579 opened this issue Apr 14, 2020 · 1 comment
Labels
question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org

Comments

@brian208579
Copy link

Hi,
I using AlexeyAB/darknet to training my yolov3 model then I found the this issues.
So I check the blobFromImage() function, It will preserving the aspect ratio.
But AlexeyAB/darknet without keeping aspect ratio, means blobFromImage() will affect performance.
Does cv2.resize() preserving the aspect ratio ?
If not , I will plan to using cv2.resize() preprocessing first , then execute blobFromImage().
Is this feasible ? or Could you give me some suggestion to solve this problem ?
Appreciate !!!

@dkurt
Copy link
Member

dkurt commented Apr 15, 2020

With OpenCV you may do any preprocessing which is necessary for the network. Both resize and blobFromImage transform image to specific size.

Please use a forum for usage questions.

@dkurt dkurt closed this as completed Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question (invalid tracker) ask questions and other "no action" items here: https://forum.opencv.org
Projects
None yet
Development

No branches or pull requests

3 participants