/Common Problem
Common Problem
Classification Of Cameras In Machine Vision Systems

As the core component of machine vision system, industrial camera is self-evident for its importance to machine vision system. According to different classifications, cameras are divided into many types:

1. Color camera, black and white camera:

The black and white camera directly converts the light intensity signal into the image gray value, and generates a gray image; the color camera can obtain the light signal of the red, green and blue components in the scene, and output the color image. Color cameras can provide more image information than black and white cameras. There are two main ways to implement color cameras, prism spectroscopy and Bayer filtering. The prism spectroscopic color camera uses optical lenses to separate the R, G, and B components of the incident light, converts the three colors of light signals into electrical signals on three sensors, and finally synthesizes the output digital signals to obtain a color image .

2. CCD camera, CMOS camera

The main difference between the chips lies in the way they convert light into electrical signals. For a CCD sensor, light is irradiated on the pixel, and the pixel generates electric charge. The electric charge is transmitted through a small number of output electrodes and converted into current, buffer, and signal output. For CMOS sensors, each pixel completes the conversion of charge to voltage by itself, and at the same time generates a digital signal.

3. Classified by target surface type: area scan camera, line scan camera

Cameras can be distinguished not only based on sensor technology, but also based on sensor architecture. There are two main sensor architectures: area scan and line scan. Area scan cameras are usually used in occasions where the output is directly displayed on the monitor. Line scan cameras are used for continuous moving object imaging or where continuous high-resolution imaging is required. A natural application of line scan cameras is to image continuous products in still images (Web Inspection), such as textiles, paper, glass, steel plates, etc. At the same time, line scan cameras are also suitable for non-still image detection in the electronics industry. Like the German Kappa camera, according to its CCD specifications, it can also be divided into line array and area array.

4. Classified by output mode: analog camera, digital camera
According to the different camera data output modes, it is divided into analog camera and digital camera. The analog camera outputs analog signal, and the digital camera outputs digital signal. Analog cameras and digital cameras can be further subdivided. For example, German Kappa cameras also include: USB 2.0 interface, EE 1394 a / Fire Wire, Camera Link interface, and Gigabit Ethernet interface. Analog cameras are divided into progressive scan and interlaced scan. Interlaced scan cameras also include EIA, NTSC, CCIR, PAL and other standard formats. For a detailed introduction to the interface technology, please refer to the acquisition card and acquisition technology section.
When choosing an industrial digital camera, the speed of object imaging must be fully considered. For example, assuming that the object does not move during exposure during the shooting process, a relatively simple and inexpensive industrial camera can be used; for stationary or slowly moving objects, an area scan industrial camera is most suitable for imaging stationary or slow moving objects. Because the entire area must be exposed at one time, any movement during the exposure time will cause the image to be blurred. However, motion blur can be controlled by reducing the exposure time or using a flash; for fast-moving objects, when using a moving object When using an area scan industrial camera, you need to consider the number of moving objects in the industrial camera during the exposure time, and you also need to consider the smallest feature that can be represented by a pixel on the object, that is, the object resolution. The rule of thumb when collecting images of moving objects That is, the exposure must occur within the time when the movement of the collected object is less than one pixel. If the object you are collecting is moving at a constant speed of 1 cm/sec, and the object resolution has been set to 1 pixel/mm, then the maximum exposure time required is 1/10 per second. Because the object moves a distance exactly equal to one pixel in the camera sensor, there will be a certain amount of blur when using the maximum exposure time. In this case, it is generally inclined to set the exposure time faster than the maximum value, such as 1/20 per second, to keep the object moving within half a pixel. If the same object moves at a speed of 1 cm/sec and the object resolution is 1 pixel/micron, then the maximum exposure required in one second is 1/10000. The speed of the exposure setting depends on the camera used, and Can you give the object enough light to get a good image?
How To Calculate The Magnification Of The Lens
Different types of digital camera lenses have a series of technical specifications with their own characteristics (this can be found in the specifications of the relevant lens). Here we will introduce the "closest focus distance" and "closest focus distance" that we often mentioned in photography and should be understood. The two technical specifications of "maximum magnification" will be introduced later on other technical specifications of the lens.
In my understanding, it is mainly related to the focal length and the closest focusing distance as shown below:

How CCD vision system determines the focal length of the required industrial lens
The following factors must be considered when choosing a suitable industrial lens for a specific application:
• Field of view-the size of the imaged area.
• Working distance (WD)-the distance between the camera lens and the object or area being observed.
• CCD - The size of the camera imaging sensor device.

• These factors must be treated in a consistent manner. If you are measuring the width of an object, you need to use the horizontal CCD specification, and so on. If the measurement is in inches, it is calculated in feet and then converted to millimeters.

Refer to the following example: There is a 1/3” C-mount CDD camera (4.8 mm horizontally). The distance from the object to the front of the lens is 12” (305 mm). The size of the field of view or object is 2.5” (64 mm). The conversion factor is 1” = 25.4 mm (rounded).
FL = 4.8 Mm x 305 Mm / 64 Mm
FL = 1464 Mm / 64 Mm
FL = According to the requirements of 23 mm lens
FL = 0.19” x 12” / 2.5”
FL = 2.28” / 2.5”
FL = 0.912” x 25.4 Mm/inch
FL = According to the requirements of 23 mm lens

Note: Do not confuse the working distance with the distance from the object to the image. The working distance is the distance from the front of the lens to the object being observed. The distance from the object to the image is the distance between the CCD sensor and the object. When calculating the required focal length of the lens, the working distance must be used.

How To Choose Industrial Lenses In Machine Vision Solutions

In a machine vision project, industrial lens is one of the important components, so when determining a machine vision solution, how should we choose industrial lens?

1、Clarify the lens field of view, optical magnification and working distance required in the customer's machine vision solution

When selecting an industrial lens, a lens with a slightly larger field of view than the object under test is usually selected to facilitate motion control.

2、Depth of field requirements:

For the requirement of depth of field, the aperture should be as small as possible; for the choice of magnification, use low-magnification industrial lens as far as possible under the project permit. If the project requirements are more stringent, I tend to choose a sophisticated industrial lens with a high depth of field.

3、Camera chip size and camera interface:

Each lens has matching camera interface and chip size specifications. For example, a 2/3" industrial lens supports the largest industrial camera rake surface of 2/3", which cannot support industrial cameras above 1".

4、Pay attention to the coordination with the light source, and choose a suitable industrial lens

Lenses of different specifications also have matching light sources to choose from.

5、Customer's installation environment:
In the case of alternative solutions, it is unrealistic for customers to change the size of the equipment. Lenses with similar optical parameters and different sizes can be selected according to their needs.
What Is A Machine Vision System-Shenzhen Vision Technology Co., Ltd.

       Machine vision technology is an important branch of computer science. It integrates technologies such as optics, mechanics, electronics, computer software and hardware, and involves computers, image processing, pattern recognition, artificial intelligence, signal processing, optomechanical integration, etc. Areas. Since its initial development, it has a history of more than 20 years. Its functions and applications have been gradually improved and promoted with the development of industrial automation, especially the current digital image sensors, CMOS and CCD cameras, DSP, FPGA, ARM and other embedded The rapid development of technology, image processing and pattern recognition has greatly promoted the development of machine vision.

       In short, machine vision is the use of machines instead of human eyes to make various measurements and judgments. On the production line, people who make such measurements and judgments will cause errors and errors due to fatigue and differences between individuals, but the machine will work tirelessly and steadily. Generally speaking, the machine vision system includes the lighting system, lens, camera system and image processing system. For each application, we need to consider the operating speed of the system and the image processing speed, whether to use a color or black and white camera, the size of the detection target or whether the detection target has defects, how large the field of view needs to be, how high the resolution needs to be, and how much contrast needs to be Wait. From a functional point of view, a typical machine vision system can be divided into: image acquisition part, image processing part and motion control part.

The main working process of a complete machine vision system is as follows:
       1、The workpiece positioning detector detects that the object has moved to the center of the field of view of the camera system, and sends a trigger pulse to the image acquisition part.
       2、The image acquisition part sends out start pulses to the camera and the lighting system respectively according to the pre-set program and delay.
       3、The camera stops the current scan and restarts a new frame scan, or the camera is in a waiting state before the start pulse arrives, and starts a frame scan after the start pulse arrives. 
       4、The camera opens the exposure mechanism before starting a new frame scan, and the exposure time can be set in advance.
       5、Another start pulse turns on the lighting, and the turn-on time of the light should match the exposure time of the camera.
       6、After the camera is exposed, the scanning and output of a frame of image is officially started.
       7、The image acquisition part receives analog video signals and digitizes them through A/D, or directly receives digital video data digitized by the camera.
       8、The image acquisition part stores the digital image in the memory of the processor or computer.
       9、The processor processes, analyzes, and recognizes the image to obtain measurement results or logical control values.

       10、The processing result controls the movement of the pipeline, performs positioning, and corrects movement errors.

       It can be seen from the above workflow that machine vision is a relatively complex system. Because most of the system monitoring objects are moving objects, the matching and coordinated actions between the system and the moving objects are particularly important, which brings strict requirements to the action time and processing speed of each part of the system. In some application fields, such as robots, flying object guidance, etc., there are strict requirements on the weight, volume and power consumption of the entire system or part of the system. 

The advantages of the machine vision system are:
       1、Non-contact measurement will not cause any damage to the observer and the observed, thereby improving the reliability of the system.
       2、It has a wide spectral response range, such as the use of infrared measurement that is invisible to the human eye, which expands the visual range of the human eye.

       3、Working steadily for a long time, it is difficult for humans to observe the same object for a long time, while machine vision can do measurement, analysis and recognition tasks for a long time.

       The application fields of machine vision systems are becoming wider and wider. It has been widely used in industry, agriculture, national defense, transportation, medical treatment, finance, and even sports, entertainment and other industries. It can be said that it has penetrated into all aspects of our life, production and work.
How To Clean The Camera Lens

       Industrial lenses are the “eyes” of industrial cameras. Clear image quality can only be obtained by keeping the lens clean. When the camera is working, fingerprints and dust will inevitably be stained on the lens. If it is not cleaned in time, it will even erode the coating on the lens. Floor. When cleaning the dust on the lens, the operation sequence of blowing, brushing and wiping should be followed.

       Combination one, air blowing + brush + ultra-micro non-woven lens paper.
       Combination two, air blowing + brush + super fine fiber lens cloth + professional cleaning fluid.
       Combination three, dust removal compressed air tank + super fine fiber lens cloth + professional cleaning liquid + short cotton swab.
       1. Blow large dust particles away from the lens with air blowing or compressed air canister for dust removal;
       2. Use a brush to gently brush away the dust from top to bottom;
       3. If you encounter more stubborn stains, you need to use super micro non-woven lens paper or super fine fiber lens cloth to wipe from the center to the surrounding in the spiral outward order;

       4. For the movable part of the zoom ring, focus ring, etc., and the switch button on the lens, use a short cotton swab dipped in a small amount of lens cleaning liquid to wipe.

       1. Using low-end lens paper, lens cloth, etc. will not only produce dust or lint, but also keep other dust in itself. When repeatedly wiped, it will scratch the lens glass.
       2. Air blowing of inferior rubber is prone to aging and adhesion. Some use talcum powder mold release molding process in molding manufacturing, which will blow the original dust into the cleaned part, which is bound to cause secondary damage to the equipment Pollution.
       3. The usual stains can be wiped directly with super micro non-woven lens paper or super fine fiber lens cloth; if you encounter very stubborn stains, you must wipe it with professional cleaning fluid.
The Difference Between Ccd And Cmos-Shenzhen Vision Technology Co., Ltd.

       The main difference between CCD and CMOS in manufacturing is that CCD is integrated on a semiconductor single crystal material, while CMOS is integrated on a semiconductor material called metal oxide, and there is no essential difference in working principle. Only a few CCD manufacturers such as Sony and Panasonic have mastered this technology. Moreover, the CCD manufacturing process is more complicated, and the price of the camera using CCD will be relatively expensive. In fact, after technological transformation, the gap between the actual effects of CCD and CMOS has been reduced a lot. Moreover, the manufacturing cost and power consumption of CMOS are much lower than that of CCD, so many camera manufacturers use CMOS photosensitive elements. Imaging aspect: CCD imaging permeability and sharpness are very good under the same pixel, color reproduction and exposure can be guaranteed to be basically accurate. However, CMOS products tend to have average permeability, weak color reproduction capabilities for real objects, and poor exposure. Due to their own physical characteristics, there is still a certain distance between the image quality of CMOS and CCD. However, due to the low price and high integration, it has been widely used in the camera field.

       CCD is a relatively mature imaging device, and CMOS is regarded as the imaging device of the future. Because the CMOS structure is relatively simple and the same as the existing large-scale integrated circuit production process, the production cost can be reduced. In principle, the CMOS signal is a charge signal in points, while a CCD is a current signal in behavior units. The former is more sensitive, faster, and more power-efficient. The current advanced CMOS is not worse than the general CCD, but the CMOS process is not very mature. The general SMOS generally has low resolution and poor imaging.

       CCD or CMOS, basically both use silicon photodiodes to convert light to electricity. The principle of this conversion is similar to the "solar battery" effect of computers with "solar power" in your hands. The stronger the light, the stronger the electricity; conversely, the weaker the light, the weaker the electricity. The light image is converted into Electronic digital signal.

       Comparing the structure of CCD and CMOS, the location and number of ADCs are the biggest difference. Simply put, according to what we mentioned in the previous lecture "The working principle of CCD photosensitive element (Part 1)". Each time the CCD is exposed, the pixel transfer process is performed after the shutter is closed. The charge signal of each pixel (pixel) in each row is sequentially transferred to the "buffer", which is guided by the line at the bottom to output to the amplifier next to the CCD for amplification , And then series the ADC output; relatively, each pixel in the CMOS design is directly connected to the ADC (amplification and analog digital signal converter), the signal is directly amplified and converted into a digital signal.

Comparison of the advantages and disadvantages of the two

CCD versus CMOS

       Due to the basic differences in structure, we can list the differences in performance between the two. The characteristic of CCD is to fully keep the signal without distortion during transmission (dedicated channel design). Through the collection of each pixel to a single amplifier for unified processing, the integrity of the data can be maintained; the CMOS process is relatively simple, and there is no dedicated channel. Design, so you must first zoom in and then integrate the data of each pixel.

       On the whole, the application of CCD and CMOS designs reflects the imaging effect, resulting in different types of differences including ISO sensitivity, manufacturing cost, resolution, noise, and power consumption:

      ISO sensitivity difference: Since each pixel of CMOS includes an amplifier and A/D conversion circuit, too many additional devices compress the surface area of the photosensitive area of a single pixel, so under the same pixel, the same size of the sensor, the CMOS sensitivity Will be lower than CCD.

      Cost difference: CMOS application of the MOS process commonly used in the semiconductor industry can integrate all peripheral facilities in a single chip at one time, saving the cost and yield loss of processing the chip; relatively CCD uses charge transfer to output information, which must be developed separately Transmission channel, if there is a pixel failure (Fail) in the channel, it will cause a whole row of signals to be congested and cannot be transmitted. Therefore, the yield rate of CCD is lower than that of CMOS. In addition, the additional transmission channel and the addition of ADC and other peripherals, CCD The manufacturing cost is relatively higher than CMOS.

       Resolution difference: In the first point of "sensitivity difference", because the structure of each pixel of CMOS is more complex than CCD, its photosensitive aperture is not as large as CCD. When comparing CCD and CMOS photoreceptors of the same size, the analysis of CCD photoreceptor The degree is usually better than CMOS. However, if the size limitation is exceeded, the current CMOS photosensitive originals in the industry can reach 14 million pixels/full-frame design. The advantage of CMOS technology in volume rate can overcome the difficulties in the manufacture of large-size photosensitive originals, especially full-frame The width is 24mm-by-36mm.

       Noise difference: Since CMOS is equipped with an ADC amplifier next to each photosensitive diode, if it is measured in megapixels, then more than one million ADC amplifiers are required. Although it is a uniformly manufactured product, each amplifier has more At least there are slight differences, and it is difficult to achieve the effect of amplification and synchronization. Compared with the CCD of a single amplifier, the CMOS finally calculates more noise.

       Power consumption difference: CMOS image charge driving method is active, the charge generated by the photodiode will be directly amplified and output by the transistor next to it; but CCD is passive, and a voltage must be applied to make the charge in each pixel Move to the transmission channel. The applied voltage usually needs to be above 12 volts (V). Therefore, CCDs must have more precise power supply circuit design and withstand voltage. The high driving voltage makes the power of CCD far higher than CMOS.