Patent attributes
An electronic device can have two or more pairs of cameras capable of performing three-dimensional imaging. In order to provide accurate disparity information, these cameras should be sufficiently rectified. Automatic rectification can be performed by periodically capturing images with a pair of front-facing cameras, and locating matching facial or other feature points in corresponding images captured by those cameras. Small misalignment errors can be treated as linear translations, such that a set of linear equations can be used to solve for the misalignments. Another process can process a set of homographies for the cameras until a cost function converges. Various other approaches can be used as well, such as to directly solve for yaw, pitch, and roll errors. Once this information is obtained, the misalignment values (or related values) can be stored for use in correcting images subsequently captured by those cameras.