Freehand three-dimensional ultrasound (3D US) imaging is commonly used for various diagnostic and therapeutic procedures. In this technique, accurate tracking of the US transducer is a crucial requirement to develop high-quality 3D US volumes. However, current methods for transducer tracking are generally expensive and inconvenient. This paper presents a low-cost camera-based system for tracking the US transducer with six degrees of freedom (DoF). In this system, two orthogonal cameras with non-overlapped views are mounted on the US transducer. During US scanning, the two cameras are employed to track artificial features attached to the skin of the patient. A 3D surface map is constructed based on the tracked features and the 3D poses of each camera with respect to the skin are extracted separately. The estimated poses of the two cameras are spatially combined to provide accurate and robust pose estimation of the US transducer. The camera-based tracking of the US transducer has been applied to synthesize freehand 3D US volumes. The performance of the proposed system is evaluated by performing in-vitro 3D US imaging experiments and quantifying the synthesized US volumes. The results demonstrate that two points in the 3D US volume separated by a distance of 10 mm can be reconstructed with an average error of 0.7 mm.