A new type of vision-based autonomous robotic fish capable of 3-D locomotion is developed in this paper. Based on our robotic fish prototype, the forces and moments acting on its fins and body are analyzed, and the governing motion equations are derived. We further investigate a decentralized control method in target-tracking and collision-avoidance task for two autonomous robotic fish. Most of previous work on the task strategies of autonomous robots is focused on terrestrial robots and seldom deals with underwater applications due to the uncertainties and complexity in a hydro environment. To address this challenge in such an underwater task, a situated-behavior-based decentralized control is employed on each robotic fish according to its visual data. On dealing with motion planning of the fish during target tracking and collision avoidance, a control law by a combination of an attractive force toward a target and a repulsive force for collision avoidance is utilized. Experimental results of the task performed by two autonomous robotic fish validate the effectiveness of the proposed method.