Abstract:To solve the problem that the image processing system used in robot fish water polo game can be easily influenced by the asymmetry of the light in the competition area and then the robot could be recognized wrongly or even got lost, this passage gives out a algorithm for image process which is based on regional treatment and then get the location of the underwater robot. This algorithm mainly process on the first image, remove the background and the get the coarse coordinate of the robot using histogram analysis and regional treatment in machine vision, and then segment the color code out, get the direction and location of the robot. The following process uses regional treatment, simplifies through using the data produced in last image and correcting the information of the robot. The result shows that this algorithm can reduce the influence of the light and make up the shortage in the image processing system used in robot fish water polo game.