# Design and Simulation of a Vision-Based Automatic Trout Fish-Processing Robot
## 1 Introduction
In a design proposed by [PERSON] [23], a device with attached material to the spinal cord with two sets of rotating disks was applied. The first set of the discs guides and presses the fish, and the other set under the fish performs the cleaning operation from beneath the fish. The second set of the disks were placed opposite with angles. In this design, the fish is pulled from the tail, and the belly is downward. In order to use this tool, it is necessary to clean the belly and remove the head in the previous step. Among the described systems, only in the designs proposed by [PERSON] [20] and [PERSON] [19], a combination of mechanical and electronic sensors has been applied to detect the dimensions of the fish, which can be applied to extract the fish size and cutting points. Since in each of these systems, only a single operation of cutting or gutting is undertaken, using these sensors is sufficient for dimension determination. In [PERSON]'s design [20], the head of the fish remains on the fish, and only the gutting process with the details of belly-cutting, suction, and belly cleaning steps are undertaken in a single system. Also, in the system designed by [PERSON] [19], the head of the fish is removed in the previous stage, and subsequently, by passing through the conveyor belt, the gutting process is performed. These sensors are used while cutting and cleaning operations are performed on the belly because the exact head-cutting position requires special methods like machine vision. Then, an automated line for slaughtering and cutting fish heads using machine vision was designed [24]. To slaughter the fish, the pneumatic jacks were equipped to narrow blades. The general structure of the device used in this study is similar to those applied by [PERSON] [25] with the difference that, in addition to all devices applied as mechanical tools, the stunning technology enabled the feeding of alive fish so that they can be processed simultaneously. It was also necessary to identify the fishtail and head sides in order to make an injury on the right side. In the current system, an automated system is designed for trout beheading, gutting, and cleaning. As this system consists of mechanical, controlling, and machine vision sections, the whole system needs an accurate design and synchronization. The mechanical system was designed in CATIA software (Dassault Systems Corporation) and simulated in Automated Dynamic Analysis of Mechanical Systems (ADAMS) simulation software owned by MSC Software Corporation. The controlling algorithm was developed in Siemens TiaPortal15 software and tested to solve any errors. Extracted data from the machine vision system are sent to the control unit by the Ethernet TCP/IP protocol. Finally, by installing magnetic and inductive sensors, pneumatic cylinders and actuators, and user interface panel, the machine functioning was synchronized and calibrated. Since the system is supposed to process fish of different dimensions, machine vision can provide a precise cutting point determination. With such system, not only the fish dimension is defined, but also the head cutting, belly-cutting length and gutting points are defined based on the fish fin segmentation. Since the fish dimensions are different, there is a high risk of collision between the arms and the grippers as they pass in front of each functioning station. Therefore, designing a system capable of functioning different cutting and cleaning actions on fish of different sizes in an integrated machine is the main goal of this research. The detailed goals are presented as follows:  
1. Designing a trout fish-processing system capable of processing the fish in different dimensions. 2. Developing the system into a machine at which different cleaning steps can be performed in one integrated system (belly-cutting, beheading, gutting, and cleaning processes). 3. Designing a system that is adapted with online data extracted from the online image processing technique. 4.