ClassesClassesClassesClasses | | | | Operators

convert_map_typeconvert_map_typeConvertMapTypeconvert_map_typeConvertMapTypeConvertMapType (Operator)

Name

convert_map_typeconvert_map_typeConvertMapTypeconvert_map_typeConvertMapTypeConvertMapType — Convert image maps into other map types.

Signature

convert_map_type(Map : MapConverted : NewType, ImageWidth : )

Herror convert_map_type(const Hobject Map, Hobject* MapConverted, const char* NewType, const Hlong ImageWidth)

Herror T_convert_map_type(const Hobject Map, Hobject* MapConverted, const Htuple NewType, const Htuple ImageWidth)

Herror convert_map_type(Hobject Map, Hobject* MapConverted, const HTuple& NewType, const HTuple& ImageWidth)

HImage HImage::ConvertMapType(const HTuple& NewType, const HTuple& ImageWidth) const

void ConvertMapType(const HObject& Map, HObject* MapConverted, const HTuple& NewType, const HTuple& ImageWidth)

HImage HImage::ConvertMapType(const HString& NewType, const HTuple& ImageWidth) const

HImage HImage::ConvertMapType(const HString& NewType, Hlong ImageWidth) const

HImage HImage::ConvertMapType(const char* NewType, Hlong ImageWidth) const

void HOperatorSetX.ConvertMapType(
[in] IHUntypedObjectX* Map, [out] IHUntypedObjectX*MapConverted, [in] VARIANT NewType, [in] VARIANT ImageWidth)

IHImageX* HImageX.ConvertMapType(
[in] BSTR NewType, [in] VARIANT ImageWidth)

static void HOperatorSet.ConvertMapType(HObject map, out HObject mapConverted, HTuple newType, HTuple imageWidth)

HImage HImage.ConvertMapType(string newType, HTuple imageWidth)

HImage HImage.ConvertMapType(string newType, int imageWidth)

Description

convert_map_typeconvert_map_typeConvertMapTypeconvert_map_typeConvertMapTypeConvertMapType converts the input MapMapMapMapMapmap into a different map type. The main usage of convert_map_typeconvert_map_typeConvertMapTypeconvert_map_typeConvertMapTypeConvertMapType is to convert a nearest neighbor or bilinear map (e.g., obtained by gen_image_to_world_plane_mapgen_image_to_world_plane_mapGenImageToWorldPlaneMapgen_image_to_world_plane_mapGenImageToWorldPlaneMapGenImageToWorldPlaneMap) to a coordinate map, as this is the only type supported on compute devices.

NewTypeNewTypeNewTypeNewTypeNewTypenewType specifies the type of conversion. The following values are supported:

'coord_map_sub_pix'"coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix"

creates a map that consists of a vector_field image which contains the absolute subpixel precise row and column coordinates of each pixel's mapping. (input map must be 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" or 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor")

'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear"

creates a map with linear coordinates and bilinear interpolation coefficents (see map_imagemap_imageMapImagemap_imageMapImageMapImage). (input map must be 'coord_map_sub_pix'"coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix")

'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"

creates a nearest neighbor map with linear coordinates (see map_imagemap_imageMapImagemap_imageMapImageMapImage). (input map must be 'coord_map_sub_pix'"coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix")

In ImageWidthImageWidthImageWidthImageWidthImageWidthimageWidth the width of the images to be mapped by MapConvertedMapConvertedMapConvertedMapConvertedMapConvertedmapConverted must be given. If this width is identical to the width of MapMapMapMapMapmap, you can pass the string 'map_width'"map_width""map_width""map_width""map_width""map_width".

Parallelization

Parameters

MapMapMapMapMapmap (input_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject (vector_field / int4 / int8 / uint2)

Input map.

MapConvertedMapConvertedMapConvertedMapConvertedMapConvertedmapConverted (output_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject * (vector_field / int4 / int8 / uint2)

Converted map.

NewTypeNewTypeNewTypeNewTypeNewTypenewType (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Type of MapConverted.

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

List of values: 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'coord_map_sub_pix'"coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix""coord_map_sub_pix", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"

ImageWidthImageWidthImageWidthImageWidthImageWidthimageWidth (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*) (Hlong / BSTR) (Hlong / char*)

Width of images to be mapped.

Default value: 'map_width' "map_width" "map_width" "map_width" "map_width" "map_width"

Example (HDevelop)

gen_radial_distortion_map (MapFixed, CamParOriginal, CamParVirtualFixed, \
                           'bilinear')
convert_map_type(MapFixed, MapConverted, 'coord_map_sub_pix', 'map_width')
query_available_compute_devices (DeviceIdentifier)
open_compute_device (DeviceIdentifier[0], DeviceHandle)
activate_compute_device (DeviceHandle)
map_image (GrayImage, MapConverted, ImageRectifiedFixed)

Result

convert_map_typeconvert_map_typeConvertMapTypeconvert_map_typeConvertMapTypeConvertMapType returns 2 (H_MSG_TRUE) if all parameter values are correct.

Possible Predecessors

gen_image_to_world_plane_mapgen_image_to_world_plane_mapGenImageToWorldPlaneMapgen_image_to_world_plane_mapGenImageToWorldPlaneMapGenImageToWorldPlaneMap, gen_radial_distortion_mapgen_radial_distortion_mapGenRadialDistortionMapgen_radial_distortion_mapGenRadialDistortionMapGenRadialDistortionMap, gen_arbitrary_distortion_mapgen_arbitrary_distortion_mapGenArbitraryDistortionMapgen_arbitrary_distortion_mapGenArbitraryDistortionMapGenArbitraryDistortionMap, gen_grid_rectification_mapgen_grid_rectification_mapGenGridRectificationMapgen_grid_rectification_mapGenGridRectificationMapGenGridRectificationMap, find_local_deformable_modelfind_local_deformable_modelFindLocalDeformableModelfind_local_deformable_modelFindLocalDeformableModelFindLocalDeformableModel

Possible Successors

map_imagemap_imageMapImagemap_imageMapImageMapImage

Module

Foundation


ClassesClassesClassesClasses | | | | Operators