Self-Calibration of a 1D Projective Camera and Its Application to the Self-Calibration of a 2D Projective Camera