This paper presents a method to generate humanoid gaits from a human locomotion pattern recorded by a motion capture system. Thirty seven reflective markers were fixed on the human subject skin in order to get the subject whole body motion. To reproduce the human gait, especially the toes and heel contacts, the front and back edges of the robot's feet are used as support at the start and the end of the double support phase. The balance of the robot is respected using the zero moment point (ZMP) criterion and confirmed by the simulation software OPENHRP (General Robotics, Inc®). First, the feet trajectory as well as the ZMP reference trajectory are defined from the motion of the robot controlled as a marionette with the measured human joint angles. Then a specific inverse kinematic (IK) algorithm is proposed to find the humanoid robot's joint trajectories respecting the constraints of balance, floor contacts, and joint limits. The studied motion presented in this paper is a human walking trajectory containing a start, a movement in a straight line, a stop, and a quarter turn. The method was developed to be easily used for human-like robots of different sizes, masses, and structures and has been tested on the robot HRP-2 (AIST, Kawada Industries, Inc®) and on the small-sized humanoid robot HOAP-3 (Fujitsu Automation Ltd®).