*2.5. Flow Diagram of 3D Positioning Algorithm*

The flow diagram of the 3D positioning algorithm for pineapple eyes based on multiangle image stereo matching in the study is shown in Figure 9. It mainly includes all pineapple eye image acquisition to identify and match the pineapple eye on the γ and γ + 90-degree image. When matching images on the γ degree and γ + 90 degree, all the pineapple eye coordinates (*L*, *θ*) are stored in a list. When matching the next set of images (γ + 30 degree and γ + 120 degree), some pineapple eyes which are duplicated with the previous set of images will inevitably be obtained. Because the pineapple eye coordinate (*L*, *θ*) is a global coordinate, the coordinates (*L*, *θ*) are approximate. By comparing the newly obtained pineapple eye coordinates with the pineapple eye coordinates stored in the list, it is easy to find and eliminate duplicate pineapple eyes. In this paper, the Euclidean distance judgment is used as the judgment basis; when the distance between the two pineapple eyes is less than 1 mm, the two pineapple eyes are considered to be duplicate pineapple eyes.
