| With the advancement of technological civilization,robots have been widely used in the production and production of industrial lines in various fields.Combining machine vision technology with robots is of great importance for the robot to perform tasks that capture objects that are not fixed in position and whose attitude is uncertain,making the robot more flexible.Monocular vision has the advantages of low cost,low power consumption and easy operation,and is widely used in manufacturing,crop picking and navigation.Therefore,this paper takes the irregular shape stapler as the research object,adopts monocular vision to achieve target pose recognition and two-dimensional centroid positioning and determine the rotation angle,and the related algorithms involved in "machine vision-based target recognition and localization" are carried out.The main research contents are as follows:(1)Image preprocessing has an important impact on target recognition and localization results.In this paper,the traditional image preprocessing method is time-consuming and ineffective.Firstly,the more mature genetic algorithm image segmentation is analyzed.Then,the improved median filtering algorithm is used for image filtering,and the best histogram entropy method(KSW entropy method)and improved genetic algorithm(Genetic Algorithm,GA)are combined to perform image segmentation.The improved Canny algorithm is used as edge extraction.method.Finally,the experimental processing by MATLAB proves that the method has stronger real-time performance than the traditional segmentation algorithm and the segmentation effect meets the experimental requirements.(2)In order to obtain the internal and external parameters of the camera,the current camera calibration algorithm is deeply explored,and Zhang Zhengyou calibration method is used for camera calibration,model is established,and error analysis can meet the requirements of identification and positioning.(3)According to the improved segmentation algorithm,the target is tested and tested according to the Euclidean distance measurement algorithm.The shape invariant moment algorithm in the shape feature extraction method is used to perform the target two-dimensional centroid localization experiment.The comparison results verify the improved the segmentation algorithm is effective for improving the real-time and positioning accuracy of target recognition and localization.In conclusion,the related algorithms of this paper are integrated with machine vision in the MATLAB GUI system,the recognition rate of the stapler pose is 92.5%,and the average absolute error values in the x direction and y direction are 3.3710 mm and 4.0106 mm respectively,the average absolute error value of the angle is 4.17° and the average processing time is 3.1051 s.The research improves the real-time performance of recognition and positioning and the accuracy of positioning.Compared with the identification and positioning of regular objects,the method is more adaptable. |