Declaration: TMetaData.SetPhotoCalibPars (PhotoIx: integer; CalibPars: TDouble2DArray; var r2x, r2y: double): integer;
The function SetPhotoCalibPars coregisters the photo referenced by the parameter PhotoIx and the hyperspectral image. PhotoIx can assume values between 1 and NumPhotos. The array parameter CalibPars is an array of 4 columns and NP rows defining the NP reference points.

The array CalibPars exhibits the following structure: each row of the array contains a reference point, the four columns contain the following information:

  • column 0: x-value in HSI (world coordinates, hsiX)
  • column 1: y-value in HSI (world coordinates, hsiY)
  • column 2: x-coord photo (pixels, PhotX)
  • column 3: y-coord photo (pixels, PhotY)
The figure below shows an example with 8 reference points:

The function returns the following error codes:
 0 ... everything is OK, the array CalibPars contains the calibration points
-1 ... the parameter PhotoIx is out of range

Hint: In order to directly access the metadata of the currently loaded dataset you can use the pre-declared global variable MData.