This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

Image scaling

From Intelligent Perception

(Redirected from Image resizing)
Jump to: navigation, search

If you shrink the image by 2, each pixel in the new image is "made" of 4 old pixels. Then the value of this pixel (the gray level of the color) is the average of those four.

If you stretch the image by the factor of 2, you break each pixel into four. They all have the same value = the value of the original pixel. After the fact some averaging can be done as well, in order to "smooth out" the image.

In Pixcavator use the slider marked with Shrink factor.

Keep in mind that once the image is shrunk, it is the new image that will be analyzed. Generally, this will not affect the number of objects detected as long as they are "large" and stay apart from each other. However, the sizes and locations of the objects will be displayed relative to the shrink coefficient.

Example. If an object is located at X=100, Y=100 in the original image and the shrink coefficient is 2, then the location displayed will be (50,50).

If the slider is set at m, each of the two the dimensions of the image will be shrunk by m and as a result the size/area of the found objects will be reduced by m*m.

Example. If an object has size 100 (100 pixels) in the original image and the shrink coefficient is 2, then the size displayed will be 25.

Another way of thinking about shrinking the image is as reducing image resolution. See Robustness of geometry

To see when this can be encountered, browse our numerous image analysis examples.