Digital Image Processing Notes (Python) [3]

Table of contents

Four Test: Pixel size calculation

Five Image Acquisition

1. Collection equipment

(1) Device type

(2) Commonly used devices

(3) Advantages and disadvantages

(4) Basic performance indicators

2.Python realizes simple image acquisition


Four Test: Pixel size calculation

The cell size is the area of ​​each pixel. The single pixel area is small, the number of pixels per unit area is large, and the resolution of the camera is increased, which is conducive to the detection of small defects and the increase of the detection field of view.

Calculation formula: pixel size = photoreceptor chip size / number of pixels (resolution)

My phone is Mi 12x, the sensor is IMX766, the size is 1/1.56 inch (8.16mm x 6.1mm). Read a photo taken with a mobile phone through Python and calculate the pixel size.

from PIL import Image
img = Image.open('image/2.jpg')
w = img.width   # 像素宽
h = img.height   # 像素长
print(w,h)
# 计算像元
x = 8.16/w * 1000
y = 6.1/h * 1000
print('%.2f'%x,"µm",'%.2f'%y,"µm")

Five Image Acquisition

1. Collection equipment

(1) Device type

Acquisition of digital images, the acquisition device generally has two devices:

  1. Sensor: A physical device sensitive to a certain electromagnetic energy spectrum band (X-ray, infrared, ultraviolet, visible light), and can convert the received radiation into an electrical signal proportional to it.
  2. Digital device: It can convert the signal transmitted by the sensor into a discrete digital form, which can be input into the computer.

(2) Commonly used devices

Commonly used acquisition equipment - widely used in recent years is mainly based on "solid-state array" devices that are sensitive to photons

  1. Charge-Coupled Device (CCD):
    The solid-state array in a CCD camera is made up of discrete silicon imaging elements called photosensitive elements. Such a photosensitive element can generate an output voltage proportional to the intensity of the received input light.
  2. Complementary Metal Oxide Semiconductor (CMOS):
    The sensor of a CMOS camera mainly includes: sensor core, analog/digital converter, output register, control register, gain amplifier, etc.
  3. Charge injection device (CID):
    In the sensor chip of the CID camera, there is an electrode matrix corresponding to the image matrix, and there are two isolated/insulated electrodes that can generate potential wells in each pixel. One of the electrodes communicates with the corresponding electrodes of all the pixels in the same row. And the other electrode communicates with electrodes corresponding to all pixels in the same column. If accessing pixels, it can be achieved by accessing rows and columns.

(3) Advantages and disadvantages

CMOS integrates the entire system on one chip, which reduces power consumption, saves space, and lower overall cost, but the noise level of CMOS cameras is about an order of magnitude higher than that of CCD cameras. CID camera devices are much less sensitive to light, but can be accessed randomly, and will not cause problems such as image blooming.

(4) Basic performance indicators

Indicators to be considered for image acquisition devices:

  1. Linear response: Whether the relationship between the strength of the input physical signal and the strength of the output response signal is linear.
  2. Sensitivity: Absolute sensitivity can be expressed by the minimum number of photons that can be detected, and relative sensitivity can be expressed by the number of photons required to change the output by one level.
  3. Signal-to-noise ratio: refers to the ratio (capacity or strength) of the useful signal to the unwanted interference in the collected images.
  4. Shadow (non-uniformity): Refers to the phenomenon that the input physical signal is constant but the output digital form is not constant.
  5. Shutter speed: corresponding to the time required for each acquisition and shooting.
  6. Read speed: Refers to the rate at which signal data is read (transmitted) from the sensitive unit.
  7. Spatial resolution: According to the size and arrangement of sensor units, the number of pixels in the captured image.
  8. Amplitude resolution: According to the sensitivity of the photosensitive element and the set value range of each level, the sensitivity to the change of the light source.

2.Python realizes simple image acquisition

Refer to the blog I wrote before: https://blog.csdn.net/fjyalzl/article/details/126553940?spm=1001.2014.3001.5501

Guess you like

Origin blog.csdn.net/fjyalzl/article/details/127023353