Measure

This module is used to measure nearly planar objects on a surface.

The surface must be parallel to the image plane.

get_ratio(image)[source][source]

Determine the ratio to convert from pixel to mm.

The user must select two points on the image. The selected points, will be used to determine the ratio between px and mm.

Parameters:image (ndarray) – Reference image.
Returns:Ratio to convert pixel to mm.
Return type:float
get_origin(image)[source][source]

Determine origin of the image.

The user must select one point on the image. The selected point will be used to define the origin of the image, this will assure that mapped coordinates will always be in relation to the origin and not to the image.

Parameters:image (ndarray) – Reference image.
Returns:origin (2,)
Return type:ndarray