Measure Point to Point
Use this tool to measure the distance between two points as well as the orientation of the corresponding distance segment.
The tool requires that the ROI parameters, i.e., all points, are available and delivered from one or two previous tools.
The distances between the points are instantly measured. The tool allows multiple measurements, performed between the two ROIs with the same placement in the parameters. Thus, the measurement is performed between the first ROI of the "Point 1" parameter and the first ROI of the "Point 2" parameter and so on. However, you have to make sure that the number of ROIs in the two parameters is equal, e.g., if "Point 1" contains 3 ROIs, "Point 2" must also contain 3 ROIs. If this is not the case, no measuring is performed.
This tool can also handle calibration information. If both parameters are connected to results of previous tools, possible calibration information contained in the connected result can also be processed. This means that the results of this tool may contain calibration information, e.g., in case the connected parameter represents a distance in pixel, it will be transformed into a distance in world using the calibration information. However, the measurement will only be processed with the calibration information if both processed parameters contain calibration information, else the results are returned without calibration information.
Parameters
Basic Parameters
Image:
This parameter represents the input image in which the segments are measured.
Point 1:
This parameter defines one of the point region(s) of interest (ROIs) for the measuring. By default no ROI is defined. To define the point(s) for the measuring you have to connect the parameter to any ROI result of a previous tool. In case the connected ROI is no point ROI, the respective center point of the ROI is used as point for the measure.
You have to make sure to define as many point ROIs in this parameter as in the parameter "Point 2", otherwise no measurement is performed.
Point 2:
This parameter defines one of the point region(s) of interest (ROIs) for the measuring. By default no ROI is defined. To define the point(s) for the measuring you have to connect the parameter to any ROI result of a previous tool. In case the connected ROI is no point ROI, the respective center point of the ROI is used as point for the measure.
You have to make sure to define as many point ROIs in this parameter as in the parameter "Point 1", otherwise no measurement is performed
Results
|
Visualization |
Description |
|---|---|
|
|
This image visualizes the distance and orientation that is measured between the points:
Furthermore, the resulting ROIs are visualized in the image:
|
Basic Results
Segment:
This result returns the graphical representation of the measured "Distance" between the points. The result is returned as a segment ROI.
Distance:
This result returns the distance that is measured between the points. The result is returned as real number in pixels and world units in case of calibrated parameters, respectively.
Orientation:
This result returns the angle between the measured distance segment and the virtual horizontal line through "Point 1". It is returned in degrees as a real number in a range of −180° to 180°.
Tool State:
"Tool State" returns information about the state of the tool and thus can be used for error handling. Please see the topic Tool State Result for more information about the different tool state results.
Additional Results
Center Point:
This result returns the center point of the measured "Segment" between the points. The result is returned as a point ROI.
Processing Time:
This result returns the duration of the most recent execution of the tool in milliseconds. The result is provided as additional result. Therefore, it is hidden by default but it can be displayed via the button beside the tool results. For more information see the section Processing Time in the tool reference overview.
Application Examples
This tool is used in the following MERLIC Vision App examples:
- measure_distance_between_corners.mvapp
- measure_distance_to_center_led.mvapp