# Computer Vision as a Tool to Support Quality Control and Robotic Handling of Fruit: A Case Study
## 2 Materials and Methods
### Workplace Setup  
The working area was designed to ensure that the images obtained were of sufficient quality and resolution to allow defects and unique characteristics of the fruit to be identified. Another important requirement was to keep the camera perpendicular to the working area, to facilitate converting the distance in pixels to the distance in meters. In addition, a configuration that provided good mobility for the robotic arm at all stages of the work was essential. Figure 1 illustrates the experimental setup.  
Several components are identified in Figure 1:  
1. Tower: The tower used to support the camera was designed with three stainless-steel tubes for each segment to ensure structural stability while maintaining a lightweight and modular construction. The design allows for adjustability at specific connection points, providing flexibility in positioning the tower to accommodate the spatial constraints of the case study location. This tower was developed with 3D printing and stainless-steel tubes to be the support for the light source (2) and camera (3), fulfilling the requirement of being perpendicular to the base (6), at a distance of 650 mm.
2. Light source: Two 12V LED projectors connected in series with the function of being a point light source that acts in the direction of Equipment 6. Obtaining high-quality images can greatly simplify vision algorithms and improve their reliability. In machine vision applications, good and uniform lighting is important. Non-uniform illumination by an external light source can promote failures in the segmentation process and, consequently, in the detection process [22].
3. Raspberry Pi 5 with PiCamera module 3: Used for image acquisition and processing, returning commands to the robotic arm. The camera was initialized using a custom class that defined specific functions to control video streaming. In this setup, the camera was configured to capture images at a resolution of 1280 \(\times\) 720 pixels, which was sufficient for our application. Beyond this, it is important to highlight that the Raspberry Pi Camera Module 3 itself is equipped with features that inherently  
Figure 1: Experimental setup with lighting and camera fixture, robotic arm, soft gripper actuator, and base.  
contribute to high-quality image capture. With its 12-megapixel resolution, the module can produce still images at a resolution of 4608 \(\times\) 2592 pixels and record video at up to 1080p at 50 frames per second. These characteristics alone ensure that the module delivers excellent image quality without the need for additional enhancements.
4. Robotiq 2F-85 actuator and Fin Ray Effect (FRE) fingers: robotic gripper with soft FRE fingers installed, responsible for handling the fruit, as shown in Figure 2.
5. UR3e: robotic arm that receives information from the Raspberry Pi 5, responsible for handling the fruit.
6. Base: aluminum base constructed in Minitec profile, which facilitates secure mounting of the entire system.  
The global coordinate system of the camera corresponds to its resolution, where the top-left corner is defined as (0,0) and the bottom-right corner as (1280,720). In this case, the use of the camera matrix and distortion coefficients is not required. The PiCamera Module 3 exhibits low distortion, which has a negligible impact on the results.