if the camera is of fixed focal length,using the camera caliberation toolbox,we can find the focal length as well as the extrinsic parameters.for that,use a chekerboard,take different photos of it at different angles and store them with a common basename..eg:image1, image2 etc..and add this folder to the current directory of matlab.then use the caliberation tool box.
but i dont know the case if the camera is autofocus..