# Vision Systems for a UR5 Cobot on a Quality Control Robotic Station
## 1 Introduction  
Vision systems are one of most the critical elements of modern automation and robotization processes. They have gained great recognition due to their significant capabilities in collecting and analyzing process data. The process of collecting and exchanging data between devices is the basic assumption of the concept of Industry 4.0, a concept characterized by integrating various systems based on recent achievements in many areas of science and technology, such as robotics, vision systems, machine learning, deep learning, and data processing [1, 2]. Vision systems, robots/cobots and autonomous mobile robots constitute essential components of the Industry 4.0 paradigm and smart manufacturing and will be an essential part of their future [3, 4, 5, 6]. In general, vision systems consist of the following components: an illumination system, lens, cameras, optional video signal acquisition card (frame grabbers), computer with appropriate software, communication systems with peripheral devices, and additional sensors. Vision technology (2D) available on the market can be categorized based on the type of devices utilized and the specific requirements [7]: vision sensors, smart cameras, embedded vision systems and PC-based vision systems. PC-based vision systems offer an independent selection of optimal elements which provide greater flexibility and the ability to utilize multiple cameras and complex image analysis algorithms. They distinguish themselves from smart camera vision sensors byallowing for the use of more than one camera and providing higher computational power for sophisticated vision algorithms (especially when equipped with a high-performance industrial computer). PC-based vision systems are suitable for a wide range of applications, including those requiring complex tasks such as system calibration, optical character recognition, code reading, counting and measuring, gauging and metrology, and object recognition based on deep learning. Designing a vision system within a robotic station is related to several important areas of knowledge in image processing, such as camera calibration, camera calibration with a robot, image preprocessing, image segmentation, analysis and recognition, shape detection, and vision-based measurements. The main purpose of the camera calibration process is to determine the internal and external parameters of the camera [8; 9; 10; 11; 12]. The need to carry out the calibration process is mainly related to the necessity to remove distortions introduced by the camera's optical path, the possibility of making measurements in SI units, and to obtain the model and position of the camera with reference to the given coordinate system [8; 9; 10; 11; 13]. System calibration is the most crucial step in a vision-based measurement system and is essential when metric data are required [10; 14]. Calibration of a camera with a robot [11; 12; 13; 15] can be classified as eye-to-hand (camera placed on the station) and eye-in-hand (camera mounted on the robot). As a result of the calibration procedure, a transformation is obtained that maps the system from the camera's image space to the coordinate system associated with the robot [11; 12; 13; 15; 16]. Image segmentation is aimed at dividing the image into subareas with similar features. These subareas enable, at a later stage, the extraction and isolation of various structures and objects in the image [17; 18; 19]. Recognition of image objects is a field dominated in recent years by deep learning algorithms. However, initially, three basic descriptor-based strategies were commonly used: SIFT (Scale-Invariant Feature Transform), SURF (Speeded Up Robust Features), and BRIEF (Binary Robust Independent Elementary Features). Using previous research [20; 21], the authors compared the basic algorithms for detecting and matching features available in the OpenCV libraries--in the first case, as part of experimental research, and in the second, as one of the tasks performed by a robotic station.