Adjust calibrationπŸ”—

Changes the calibration factors and/or the world frame of an image without changing pixel data. This tool is useful when one needs to restore image calibration and position data after a tool that does not preserve it.

Many functions such as neural networks internally handle images as matrices or tensors that have no relation to the physical world. When such images are produced, their calibration factors and position need to be set before physical measurements can be made. This tool changes these values without altering the pixels.


  • image: The input image whose calibration/position is to be changed.

  • referenceImage: An optional image whose position and calibration factors will be copied. If this input is connected, the calibration factors and world coordinate frame of referenceImage will be copied to the output image as the first step.

  • scale: A 1-by-2 matrix specifying horizontal and vertical scaling factors. The focal lengths of the output image will be multiplied by scale. This is useful if the image has been e.g. downscaled. If a scaling factor is NaN, the corresponding focal length of image will be scaled so that its physical size matches referenceImage.

  • translation: A 1-by-2 matrix that can be used to translate the principal point of the output image. This is needed for example if a downscaled image isn’t perfectly centered on the original. For example, if a 9Γ—9 (center at (4, 4)) image is downscaled to 4Γ—4 (center at (1.5, 1.5)) so that one pixel is left out at the right and bottom edges, the center of the image after upscaling back to 8Γ—8 will be at (3.5, 3.5). This can be corrected by setting translation to (0.5, 0.5). If a translation coordinate is NaN, the translation will set so that the principal point matches the pricipal point of referenceImage.


  • image: The input image with new calibration factors and/or world frame.