Skip to content

gen_image_warp_mapGenImageWarpMapGenImageWarpMapgen_image_warp_mapT_gen_image_warp_map🔗

Short description🔗

gen_image_warp_mapGenImageWarpMapGenImageWarpMapgen_image_warp_mapT_gen_image_warp_map — Generate an image map based on non-regular correspondence points.

Signature🔗

gen_image_warp_map( out image Map, point.y Row1, point.x Column1, point.y Row2, point.x Column2, extent.x ImageWidth, extent.y ImageHeight, extent.x MapWidth, extent.y MapHeight, string Method, string MapType, attribute.name GenParamName, attribute.name GenParamValue )void GenImageWarpMap( HObject* Map, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, const HTuple& ImageWidth, const HTuple& ImageHeight, const HTuple& MapWidth, const HTuple& MapHeight, const HTuple& Method, const HTuple& MapType, const HTuple& GenParamName, const HTuple& GenParamValue )static void HOperatorSet.GenImageWarpMap( out HObject map, HTuple row1, HTuple column1, HTuple row2, HTuple column2, HTuple imageWidth, HTuple imageHeight, HTuple mapWidth, HTuple mapHeight, HTuple method, HTuple mapType, HTuple genParamName, HTuple genParamValue )def gen_image_warp_map( row_1: Sequence[float], column_1: Sequence[float], row_2: Sequence[float], column_2: Sequence[float], image_width: int, image_height: int, map_width: int, map_height: int, method: str, map_type: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]] ) -> HObject

Herror T_gen_image_warp_map( Hobject* Map, const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2, const Htuple ImageWidth, const Htuple ImageHeight, const Htuple MapWidth, const Htuple MapHeight, const Htuple Method, const Htuple MapType, const Htuple GenParamName, const Htuple GenParamValue )

Description🔗

gen_image_warp_mapGenImageWarpMap generates an image Mapmapmap based on the non-regular correspondence points (Row1row1row_1, Column1column1column_1) and (Row2row2row_2, Column2column2column_2).

Given the correspondence points (Row1row1row_1, Column1column1column_1) and (Row2row2row_2, Column2column2column_2), the generated Mapmapmap maps points from (Row2row2row_2, Column2column2column_2) to (Row1row1row_1, Column1column1column_1) while generating a smooth mapping for all other coordinates.

Specify the size of the input image for the mapping with ImageWidthimageWidthimage_width and ImageHeightimageHeightimage_height. Only pixels within this area will be accessed when applying the generated map.

The size of the generated Mapmapmap can be set with MapWidthmapWidthmap_width and MapHeightmapHeightmap_height. In combination with how (Row1row1row_1, Column1column1column_1) are selected the map can be configured to transform only a specific part of the input image.

With Methodmethodmethod the algorithm to generate the map can be selected. Currently, only 'thin_plate_spline'"thin_plate_spline" is available. This method interpolates on a global scale, which means that all points are regarded for the interpolation, no matter how far away they are. The influence of far points is correlated to \(r^2 \cdot \log(r)\) where \(r\) defines the distance of two points.

With MapTypemapTypemap_type the type of the output map can be selected. Currently, only 'coord_map_sub_pix'"coord_map_sub_pix" is available (convert_map_typeConvertMapType describes the types).

Further method specific parameters are passed with GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value. The currently supported method does not accept additional parameters.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

Parameters🔗

Mapmapmap (output_object) singlechannelimage → object (vector_field)HObject (vector_field)HImage (vector_field)HObject (vector_field)Hobject * (vector_field)

Generated image map.

Row1row1row_1 (input_control) point.y-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinate of original correspondence points.

Column1column1column_1 (input_control) point.x-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column coordinate of original correspondence points.

Restriction: number(Row1) == number(Column1)

Row2row2row_2 (input_control) point.y-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinate of target correspondence points.

Restriction: number(Row2) == number(Row1)

Column2column2column_2 (input_control) point.x-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column coordinate of target correspondence points.

Restriction: number(Column2) == number(Column1)

ImageWidthimageWidthimage_width (input_control) extent.x → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the image to map.

Restriction: ImageWidth > 0

ImageHeightimageHeightimage_height (input_control) extent.y → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the image to map.

Restriction: ImageHeight > 0

MapWidthmapWidthmap_width (input_control) extent.x → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the generated map.

Restriction: MapWidth > 0

MapHeightmapHeightmap_height (input_control) extent.y → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the generated map.

Restriction: MapHeight > 0

Methodmethodmethod (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Method used to create the map.

Default: 'thin_plate_spline'"thin_plate_spline"

MapTypemapTypemap_type (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Type of the generated map.

Default: 'coord_map_sub_pix'"coord_map_sub_pix"

GenParamNamegenParamNamegen_param_name (input_control) attribute.name(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Names of additional parameters.

Default: [][]

GenParamValuegenParamValuegen_param_value (input_control) attribute.name(-array) → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)MaybeSequence[Union[int, float, str]]Htuple (double / Hlong / char*)

Values of additional parameters.

Default: [][]

Combinations with other operators🔗

Combinations

Possible successors

map_imageMapImage

Alternatives

gen_arbitrary_distortion_mapGenArbitraryDistortionMap, gen_grid_rectification_mapGenGridRectificationMap

Module🔗

Foundation