Page 1 of 1

resize to lower resolutions to preprocess for CV app

Posted: 2019-12-02T07:28:53-07:00
by allomorphy
We have a CV application that runs on images produced on various smartphones.
Our image sets have various native pixel sizes, for example 3024x4032 with iphone 11.
USers may capture with other devices lower resolutions like for example:
1080x1920 or 1440x2960

We want to use a command to emulate the way an image would look at the lower pixel density and then use this as input to our CV routine.
So this is a form of image augmentation if you like to test our CV app under alternative challenges.
This command looks fit for this purpose:

Code: Select all

-verbose -strip -resize 1080x1920 -quality 75 -density 72x72 -units pixelsperinch 
But why would I change quality or density or units?

Best wishes

Re: resize to lower resolutions to preprocess for CV app

Posted: 2019-12-02T08:08:08-07:00
by snibgo
"-quality" affects the image compression in the output file. See https://www.imagemagick.org/script/comm ... hp#quality

"-density" and "-units" change metadata, so software that that cares about physical dimensions (inches, centimetres or whatever) correctly processes the image.

Incidentally, "-strip" is a bad idea if your input may have an embedded ICC profile.