-
Notifications
You must be signed in to change notification settings - Fork 7
3. Script Descriptions: C_singleExtrinsicsSolution
This page is under construction, please check back for final version
-
This function solves the extrinsics (EO) for a given camera for use in the toolbox. The user will load gcp and intrinsic (IO) information via input files. The user will specify coordinate system information as well as initial extrinsics rough guesses. The function will output the solved extrinsics in the form of the vector extrinsics, metadata information in initialCamSolutionMeta, and a reprojection error figure.
Note, the extrinsics solution will be in the same coordinate system as the GCPs. Regardless of what the user enters, this will be referred to as the WORLD coordinate system with a subscript W. It is encouraged that the user enter GCPs in a geographic coordinate system (State Plane, UTM, etc). The toolbox will complete a coordinate system rotation in subsequent functions. Also, the nlinfit solver is very sensitive to the initial guess; so it must be an educated guess. It is particularly sensitive to the guessed azimuth, tilt, and swing. If incorrect, nlinfit will error or provide a nonsensical answer. Please check veracity of provided extrinsics. Descriptions of the World Coordinate System and extrinsic definitions (particularly azimuth, tilt, and swing) are in Section 6.
This function is to be run third in the progression for each camera in a multi-camera fixed station or for each collection for a UAS platform. GCP calibration and geometry solution calculation should occur any time a camera has moved for a fixed station, the first frame in a new UAS collect, or intrinsics has changed.
Input is entered by user into the script in Sections 1-4.
Section 1: Saving Information
Variable Description oname Output string for the basename for the Extrinsic/Intrinsic Solution mat files to be saved under. odir Output filepath where the Extrinsic/Intrinsic Solution mat file will be saved. Section 2: Intrinsics
Variable Description Section 3: GCP Information
Variable Description
Figure 3: Example GCP input txt file for C_singleExtrinsicSolution
-
Section 4: Solution Information
Variable | Description |
---|---|
extrinsicsInitialGuess | A [1x6] vector of the initial guess of extrinsics, the EO solution, for the corresponding camera image. Extrinsics is formatted as [ x y z azimuth tilt swing] where xyz correspond to the same world coordinate system as gcps entered in gcpXyzPath in Section 3. Azimuth, tilt and swing should be in radians. For UAS, this information can be estimated from the autopilot. For fixed camera stations it is suggested you survey in the location of the cameras. Further descriptions of the extrinsics vector and world coordinate systems can be found in Section 6. |
extrinsicsKnownsFlag | Enter the number of knowns, or what you would like fixed in your EO solution. 1 represents fixed where 0 represents floating (solvable) for each value in extrinsics. Review [4] for a discussion of which extrinsics may float relative to the number of GCPs and the effect on rectification accuracy. |
A .mat file saved as oname_IOEOInitial.mat in odir. Will contain following variables.
Variable | Description |
---|
A figure with the original ‘clicked’ GCPs plotted on the imagePath in red along with the reprojected GCP values using the extrinsic solution in yellow. Example from uasDemoData shown In Figure 4. Note, red is difficult to see because it is a high accuracy solution and yellow is directly on top.
Figure 4: Example reprojection figure in C_singelExtrinsicSolution for uasDemoData to observe extrinsic solution accuracy.
-
-
extrinsicsSolver
-
xyz2DistUV
-
intrinsicsExtrinsics2P
-
distortUV
-
distUV2XYZ
-
undistortUV
-
Requires Also: MATLAB Statistics and Machine Learning Toolbox
-