Click or drag to resize

BasePluginCameraPutPictureCenteredInCanvas Method

Given are two Mat objects, representing a (bigger) canvas and a (smaller) picture; the last one has to be put centered into the canvas and needs to be scaled to fit into the canvas, but without changing its aspect ratio.

Namespace: RAYLASE.Marker.CamerasPlugin
Assembly: RAYLASE.Marker.CamerasPlugin (in RAYLASE.Marker.CamerasPlugin.dll) Version: 2.19.0
Syntax
C#
public static Mat PutPictureCenteredInCanvas(
	Mat pictureMat,
	Mat canvasMat,
	out dvec2 position,
	out dvec2 scaledSize
)

Parameters

pictureMat  Mat
The picture to be put centered and scaled
canvasMat  Mat
The image the picture is to be put into.
position  dvec2
The coordinates where pictureMat is placed into canvasMat.
scaledSize  dvec2
The size of the scaled pictureMat when placed into canvasMat.

Return Value

Mat
The bigger Mat object containing the smaller.
See Also