The camera is generally installed in the head of a biomimetic robotic fish with embedded vision. The issue of stability control of the head is explored to guarantee the steady acquisition of image data. Specifically, hydrodynamics of the biomimetic robotic fish is modeled based on the Newton-Euler method, which is applied to comparing the head swing status in the cases of different body models. In addition, a genetic algorithm is developed to optimize parameters for multiple moving joints, intended to minimize the swing of the robotic fish's head. Finally, experiments are conducted on a selfdesigned biomimetic robotic fish equipped with an embedded vision system. The results indicate that the swing of the head is decreased and the imaging stability and continuity are greatly improved by the stability control. However, it is inevitable that the swimming velocity decreases. This method lays the foundation for locomotion control and task execution based on embedded vision.