Matlab code for plenoptic camera calibration. Check the supplementary video for an overview of the process.
Before running the following steps ensure that the micro-lens centers are available. If not, run LightFieldCalib_Step1_MicroLensCenter using your camera's white images.
Plenoptic_GeoCalibration_Step2_Center_Image: Obtain the central sub-aperture images.
centersNearWorldCorners: Find the micro-lenses which observe the same 3D corner.
microImageCornerDetection: Detect the corners in the micro-images. Input is a single image
but can be wrapped to run in many images.
centersFromCorners: Match detected micro-image corners to its corresponding micro-lens center.
Runs for one image of the dataset. No need to run for others. If no lens_types are saved, use other image or increase the number of detected corner.
clusterCornerPointsLocal
typeClassificationUsingCircularRegion
makeGridTypeGeneral
cornerCorrespondences: Assign the 2D-to-3D correspondences.
This step can be run with one or more images. At the moment the user enters which type of lenses wants to calibrate but can be easily wrapped to run for all the types. If different number than 1, 2, 3 is given as input the calibration will procceed assuming all the lenses are the same. In order for this to work though, the correspondences have to be assigned in a similar manner. Saves the intrinsics and extrinsics after the linear solution and the non-linear optimisation.
cornerLinearSolutionManyImages