Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does OpenCV blobFromImage preserve the aspect ratio of the input image?

I wonder if the cv::blobFromImage() preserves the aspect ratio of the input image when it applies a resize or it stretches the image to the target size.

The documentation says "If crop is false, direct resize without cropping and preserving aspect ratio is performed". The word "and" makes the sentence a bit vague raising the question if "without" applies to the "preserving aspect ratio".

click to hide/show revision 2
retagged

updated 2018-06-12 11:44:40 -0600

berak gravatar image

Does OpenCV blobFromImage preserve the aspect ratio of the input image?

I wonder if the cv::blobFromImage() preserves the aspect ratio of the input image when it applies a resize or it stretches the image to the target size.

The documentation says "If crop is false, direct resize without cropping and preserving aspect ratio is performed". The word "and" makes the sentence a bit vague raising the question if "without" applies to the "preserving aspect ratio".