Search code examples
image-processingandroid-cameraresolution

Difference of a circle in picture with different resolutions by the same phone camera


I shoot a circle through the phone, and obtain the diameter of the circle (the number of pixels in the picture) by image processing. I found that the number of pixels of diameter is different at different resolutions.The following is the table about diameter at different resolution that I record through experiment. **I want to know how phone camera to get photos of different resolution sizes, and the relation between different resolutions.**I am searching for a long time on net. But no use.

enter image description here


Solution

  • The sensor in your camera has a certain size - it may be 29mmx19mm, or 24mm by 16mm (APS-C) or Micro Four Thirds (18mm by 13mm) or Full Frame (36mm by 24mm).

    When the light goes through the lens it forms an image of your circle on the sensor and the sensor records it. When you change resolution, the camera uses a different number of pixels to record it but the circle still shows up as the same number of millimetres on the sensor because it is the lens's focal length and the distance to the object that determines the size of the image formed on the sensor.

    If you divide the resolution by the diameter, you will see that your circle is forming a picture a constant size on your sensor - 6.25 units in size:

    enter image description here

    Let's try an example and pretend your camera is full frame. That means that at 640x480 resolution, 640 pixels is 36mm, so your 104 pixel wide circle means that the image formed on your sensor is

    104 * 36mm
    ---              = 5.85mm
    640
    

    When you record at 4160 resolution, your 36mm is divided into 4160 pixels, so your 664 pixels make

    664 * 36mm 
    ----             = 5.7mm
    4160 
    

    So basically, what you are seeing is that the size of the image on your sensor is independent of the resolution you record it at - which is correct since the size of the image on the sensor is determined by the focal length of your lens and the distance to the object.