Operator Reference

gen_image_warp_mapT_gen_image_warp_mapGenImageWarpMapGenImageWarpMapgen_image_warp_map (Operator)

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

Signature

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)

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)

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

Description

gen_image_warp_mapgen_image_warp_mapGenImageWarpMapGenImageWarpMapgen_image_warp_map generates an image MapMapMapmapmap based on the non-regular correspondence points (Row1Row1Row1row1row_1, Column1Column1Column1column1column_1) and (Row2Row2Row2row2row_2, Column2Column2Column2column2column_2).

Given the correspondence points (Row1Row1Row1row1row_1, Column1Column1Column1column1column_1) and (Row2Row2Row2row2row_2, Column2Column2Column2column2column_2), the generated MapMapMapmapmap maps points from (Row2Row2Row2row2row_2, Column2Column2Column2column2column_2) to (Row1Row1Row1row1row_1, Column1Column1Column1column1column_1) while generating a smooth mapping for all other coordinates.

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

The size of the generated MapMapMapmapmap can be set with MapWidthMapWidthMapWidthmapWidthmap_width and MapHeightMapHeightMapHeightmapHeightmap_height. In combination with how (Row1Row1Row1row1row_1, Column1Column1Column1column1column_1) are selected the map can be configured to transform only a specific part of the input image.

With MethodMethodMethodmethodmethod the algorithm to generate the map can be selected. Currently, only 'thin_plate_spline'"thin_plate_spline""thin_plate_spline""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 where defines the distance of two points.

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

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

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

MapMapMapmapmap (output_object)  singlechannelimage objectHImageHObjectHObjectHobject * (vector_field)

Generated image map.

Row1Row1Row1row1row_1 (input_control)  point.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinate of original correspondence points.

Column1Column1Column1column1column_1 (input_control)  point.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinate of original correspondence points.

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

Row2Row2Row2row2row_2 (input_control)  point.y-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinate of target correspondence points.

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

Column2Column2Column2column2column_2 (input_control)  point.x-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinate of target correspondence points.

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

ImageWidthImageWidthImageWidthimageWidthimage_width (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the image to map.

Restriction: ImageWidth > 0

ImageHeightImageHeightImageHeightimageHeightimage_height (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the image to map.

Restriction: ImageHeight > 0

MapWidthMapWidthMapWidthmapWidthmap_width (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the generated map.

Restriction: MapWidth > 0

MapHeightMapHeightMapHeightmapHeightmap_height (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the generated map.

Restriction: MapHeight > 0

MethodMethodMethodmethodmethod (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Method used to create the map.

Default: 'thin_plate_spline' "thin_plate_spline" "thin_plate_spline" "thin_plate_spline" "thin_plate_spline"

MapTypeMapTypeMapTypemapTypemap_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of the generated map.

Default: 'coord_map_sub_pix' "coord_map_sub_pix" "coord_map_sub_pix" "coord_map_sub_pix" "coord_map_sub_pix"

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Names of additional parameters.

Default: []

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.name(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Values of additional parameters.

Default: []

Possible Successors

map_imagemap_imageMapImageMapImagemap_image

Alternatives

gen_arbitrary_distortion_mapgen_arbitrary_distortion_mapGenArbitraryDistortionMapGenArbitraryDistortionMapgen_arbitrary_distortion_map, gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMapgen_grid_rectification_map

Module

Foundation