read_world_fileT_read_world_fileReadWorldFileReadWorldFileread_world_file (算子)

名称

read_world_fileT_read_world_fileReadWorldFileReadWorldFileread_world_file — 从 ARC/INFO 世界文件中读取地理编码。

签名

read_world_file( : : FileName : WorldTransformation)

Herror T_read_world_file(const Htuple FileName, Htuple* WorldTransformation)

void ReadWorldFile(const HTuple& FileName, HTuple* WorldTransformation)

void HHomMat2D::ReadWorldFile(const HString& FileName)

void HHomMat2D::ReadWorldFile(const char* FileName)

void HHomMat2D::ReadWorldFile(const wchar_t* FileName)   ( Windows only)

static void HOperatorSet.ReadWorldFile(HTuple fileName, out HTuple worldTransformation)

void HHomMat2D.ReadWorldFile(string fileName)

def read_world_file(file_name: str) -> Sequence[float]

描述

read_world_fileread_world_fileReadWorldFileReadWorldFileReadWorldFileread_world_file reads a geocoding from an ARC/INFO world file with the file name FileNameFileNameFileNameFileNamefileNamefile_name and returns it as a homogeneous 2D transformation matrix in WorldTransformationWorldTransformationWorldTransformationWorldTransformationworldTransformationworld_transformation. To find the file FileNameFileNameFileNameFileNamefileNamefile_name, all directories contained in the HALCON system variable 'image_dir'"image_dir""image_dir""image_dir""image_dir""image_dir" (usually this is the content of the environment variable HALCONIMAGES) are searched (see read_imageread_imageReadImageReadImageReadImageread_image). This transformation matrix can be used to transform XLD contours to the world coordinate system before writing them with write_contour_xld_arc_infowrite_contour_xld_arc_infoWriteContourXldArcInfoWriteContourXldArcInfoWriteContourXldArcInfowrite_contour_xld_arc_info。If the matrix WorldTransformationWorldTransformationWorldTransformationWorldTransformationworldTransformationworld_transformation is inverted by calling hom_mat2d_inverthom_mat2d_invertHomMat2dInvertHomMat2dInvertHomMat2dInverthom_mat2d_invert, the resulting matrix can be used to transform contours that have been read with read_contour_xld_arc_inforead_contour_xld_arc_infoReadContourXldArcInfoReadContourXldArcInfoReadContourXldArcInforead_contour_xld_arc_info to the image coordinate system.

执行信息

参数

FileNameFileNameFileNameFileNamefileNamefile_name (输入控制)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the ARC/INFO world file.

WorldTransformationWorldTransformationWorldTransformationWorldTransformationworldTransformationworld_transformation (输出控制)  hom_mat2d HHomMat2D, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Transformation matrix from image to world coordinates.

结果

If the parameters are correct and the world file could be read, the operator read_world_fileread_world_fileReadWorldFileReadWorldFileReadWorldFileread_world_file 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。

可能的后继

hom_mat2d_inverthom_mat2d_invertHomMat2dInvertHomMat2dInvertHomMat2dInverthom_mat2d_invert, affine_trans_contour_xldaffine_trans_contour_xldAffineTransContourXldAffineTransContourXldAffineTransContourXldaffine_trans_contour_xld, affine_trans_polygon_xldaffine_trans_polygon_xldAffineTransPolygonXldAffineTransPolygonXldAffineTransPolygonXldaffine_trans_polygon_xld

另见

write_contour_xld_arc_infowrite_contour_xld_arc_infoWriteContourXldArcInfoWriteContourXldArcInfoWriteContourXldArcInfowrite_contour_xld_arc_info, read_contour_xld_arc_inforead_contour_xld_arc_infoReadContourXldArcInfoReadContourXldArcInfoReadContourXldArcInforead_contour_xld_arc_info, write_polygon_xld_arc_infowrite_polygon_xld_arc_infoWritePolygonXldArcInfoWritePolygonXldArcInfoWritePolygonXldArcInfowrite_polygon_xld_arc_info, read_polygon_xld_arc_inforead_polygon_xld_arc_infoReadPolygonXldArcInfoReadPolygonXldArcInfoReadPolygonXldArcInforead_polygon_xld_arc_info

模块

基础