TI AM5728 Industrial Camera Development Summary
[Copy link]
An Overview of Industrial Cameras Industrial cameras are a key component in machine vision systems. Their most essential function is to convert light signals into orderly electrical signals. Choosing a suitable camera is also an important part of machine vision system design. The camera not only determines the image resolution and image quality, but is also directly related to the operation mode of the entire system. Industrial cameras should have the characteristics of high precision, high definition, color reproduction, low noise, etc., and can be programmed by computers to control parameters such as exposure time, brightness, gain, etc. In addition, the image window can be zoomed in and out, with external trigger input, flash control output and other functions. Industrial cameras are composed of two basic components: image photosensitive chips and digital data interfaces. Image photosensitive chips are composed of hundreds of thousands to millions of pixels. Pixels convert the intensity of light into voltage output. The voltage of these pixels is output in the form of grayscale values, and all pixels are put together to form an image and sent to the computer. The main data interfaces are USB 2.0, USB3.0, 1394 and Gigabit Ethernet. Generally, industrial cameras provide a resolution of 640x480 pixels and a frame rate of 30fps. Detailed explanation of the second example Compile the industrial camera example program and run the following command on the Ubuntu PC: cd SDK/JiangNiu-demo/FlyCapOpenCV make 2.1 Video acquisition example The example source code is located in SDK/JiangNiu-demo/FlyCapOpenCV/FlyCapVideo.cpp 2.1.1 Example running steps 1 Refer to the board power-on login section to start JN-miniVB, and then connect the USB industrial camera to the JN-miniVB USB3.0 interface. 2 JN-miniVB runs the following command to start the FlyCapVideo example root@am57xx-evm:~#cd /opt/JiangNiu-demo/FlyCapOpenCV/ root@am57xx-evm:~#./FlyCapVideo 2.1.2 Example Results The HDMI display interface is shown in Figure 2-1-1: Figure 2-1-1 2.1.3 Example Analysis The FlyCapVideo program obtains the collected data from the industrial camera, transfers it to the OpenCV environment to process the image, obtains the image length, width, image data and other parameters, and converts the image to the OpenCV Mat type. The detailed process is shown in Figure 2-1-2: Figure 2-1-2 2.2 Sobel Edge Detection Example The example source code is located in SDK/JiangNiu-demo/FlyCapOpenCV/FlyCapSobel.cpp 2.2.1 Example running steps 1 Refer to the board power-on and login section, start JN-miniVB, and then connect the USB industrial camera to the JN-miniVB USB3.0 interface. 2 JN-miniVB runs the following command to start the FlyCapSobel instance root@am57xx-evm:~#cd /opt/JiangNiu-demo/FlyCapOpenCV/ root@am57xx-evm:~#./FlyCapSobel 2.2.2 Example Results The HDMI display interface is shown in Figure 2-2-1: Figure 2-2-1 2.2.3 Example Analysis The FlyCapSobel program performs Sobel algorithm processing on the video captured by the industrial camera, processes the X and Y directions of the image respectively, and then weighted sums the processing results in the two directions. 2.3 Hough line detection example The example source code is located in SDK/JiangNiu-demo/FlyCapOpenCV/FlyCapHoughlines.cpp 2.3.1 Example running steps 1 Refer to the board power-on and login section, start JN-miniVB, and then connect the USB industrial camera to the JN-miniVB USB3.0 interface. 2 JN-miniVB runs the following command to start the FlyCapHoughlines instance root@am57xx-evm:~#cd /opt/JiangNiu-demo/FlyCapOpenCV/ root@am57xx-evm:~#./FlyCapHoughlines 2.3.2 Example Results The HDMI display interface is shown in Figure 2-3-1: Figure 2-3-1 2.3.3 Example Analysis The FlyCapHoughlines program obtains data from an industrial camera, converts it into a Mat type object under OpenCV, uses the Canny algorithm to detect image edges, and performs Hough line detection on edge images. Note: This case is developed and tested using the JN-mini5728+JN-miniVB kit of the Jiangniu community AM5728 development board.
|