The Calcam image analyser tool provides a convenient interactive way to convert between 2D image positions and 3D real space positions, given a Calcam calibration. While this is only the most simple use of camera spatial calibration, it can be convenient to have a quick, easy way to quickly find the correspondance between image and 3D coordinates.
The image analyser window is shown below:
Loading an image to analyse¶
At the top of the Image and Calibration control tab is a group of controls for loading an image you want to analyse. The From dropdown list selects the source from which you want to load the image. The options available as standard are loading from an image file (default) or loading an image from another Calcam calibration. If you define any custom image sources (see Image Sources), they will also appear in this dropdown menu. Once an image source is selected, the relevant inputs to set up the image loading appear below the dropdown list. Once the relevant fields are completed, click the Load button to load the image. Note: when the images is loaded it will always be displayed in its original orientation until a calibration is loaded.
Basic information about the current image id displayed in the Image box. This also provides an option to apply histogram equilisation to improve the contrast of image features.
Loading a Calibration¶
The calibration to use for the analysis is also controlled on the Image and Calibration control tab. To load a calibration to use for the analysis, click the Load… button in the Calibration for analysis box. This box also displays the name of the currently loaded calibration, and full details of the calibration can be viewed by clicking the Properties… button in this box.
If the loaded calibration contains information about the CAD model settings last used when the calibration was edited, the applicable CAD model will be automatically loaded, if available. The CAD view will also be set to match the camera view automatically when the calibration is loaded.
Loading a CAD model¶
If the CAD model is not loaded automatically when loading the calibration, or you want to change the CAD model used, this is controlled on the Machine Model control tab. At the top of this tab are controls for loading a CAD model. Two dropdown boxes are provided to select the CAD model to load and the model variant. The Load button to the right of the model variant then loads the model. Underneath the model variant dropdown box is a checkbox labeled Enable default model features on load: if checked, the default parts of the CAD model are all loaded as soon as the model itself is loaded. If not checked, the model definition will be loaded but none of the 3D mesh data will be loaded, and instead you can turn on features individually. This is useful if working with a large model on a slow computer where you don’t want to wait for the whole model to load if not needed. You can change to a different CAD model or variant at any time by selecting a different item from the dropdown boxes and clicking Load again.
Turning CADmodel features On/Off¶
For CAD models composed of multiple parts in separate mesh files, individual mesh files can be turned on or off by ticking/unticking them in the Enable / Disable Features panel. This can be done for individual parts, groups of parts (if defined in the CAD model) or the entire model. This can be helpful to improve performance when working with large models if not all parts are necessary for a particular calibration, or for removing parts which are in the way and make the calibration more difficult.
Performing Position Analysis¶
With an image, calibration and CAD model loaded, clicking on either the CAD model or image will place a green cursor at the clicked position. A green cursor will also appear at the corresponding point on the other view. Quantitative information about the current cursor position is displayed on the Position Analysis tab.
If the cursor is placed on the CAD model at a position not visible in the image, the cursor turns red on the CAD model view. If the cursor position is within the image field of view but hidden behind part of the CAD model, a red cursor will also appear on the image at the position where that point would be if it was not hidden from view.
By default, the CAD model view will also show a solid green line in 3D representing the line of sight from the camera to the cursor position. A red line shows the continuation of the sight-line after it has passed the cursor. If the cursor is hidden from the camera’s view, a green sight-line is shown up to the point where the sight-line hits the object hiding the cursor, then the remainder of the sight-line is shown in red.
The Position Analysis control tab has boxes showing details of the image coordinates, 3D coordinates and sight-line coordinates corresponding to the current cursor position. It also contains the following additional controls:
Show CAD wireframe overlay on image checkbox: displays the CAD wireframe overlay on top of the image. This can be used to confirm the accuracy of the calibration or provide context for the image.
Show cursor close-up button: If the cursor is visible to the camera, this button sets the 3D CAD view to show a close-up of the current cursor position.
Reset View button: resets the 3D CAD view to match the image.
Show line-of-sight on 3D view checkbox: turn on or off display of the camera sight-line on the 3D view. If turned off, only the cursor is shown.