write_polygon_xld_arc_infowrite_polygon_xld_arc_infoWritePolygonXldArcInfoWritePolygonXldArcInfowrite_polygon_xld_arc_info (算子)
名称
write_polygon_xld_arc_infowrite_polygon_xld_arc_infoWritePolygonXldArcInfoWritePolygonXldArcInfowrite_polygon_xld_arc_info — 将 XLD 多边形以 ARC/INFO 生成格式写入文件。
签名
Herror write_polygon_xld_arc_info(const Hobject Polygons, const char* FileName)
Herror T_write_polygon_xld_arc_info(const Hobject Polygons, const Htuple FileName)
描述
write_polygon_xld_arc_infowrite_polygon_xld_arc_infoWritePolygonXldArcInfoWritePolygonXldArcInfoWritePolygonXldArcInfowrite_polygon_xld_arc_info writes the XLD polygons
PolygonsPolygonsPolygonsPolygonspolygonspolygons to an ARC/INFO generate format file with name
FileNameFileNameFileNameFileNamefileNamefile_name. If no absolute path is given in
FileNameFileNameFileNameFileNamefileNamefile_name, the output file is created in the current
directory of the HALCON process. The polygons must have been
transformed to the world coordinate system with
affine_trans_polygon_xldaffine_trans_polygon_xldAffineTransPolygonXldAffineTransPolygonXldAffineTransPolygonXldaffine_trans_polygon_xld beforehand. The necessary
transformation can be read from an ARC/INFO world file with
read_world_fileread_world_fileReadWorldFileReadWorldFileReadWorldFileread_world_file。
注意
The XLD contours that are possibly referenced by PolygonsPolygonsPolygonsPolygonspolygonspolygons
are not stored in the ARC/INFO file, since this is not possible with
the ARC/INFO generate file format. Therefore, when the polygons are
read again using read_polygon_xld_arc_inforead_polygon_xld_arc_infoReadPolygonXldArcInfoReadPolygonXldArcInfoReadPolygonXldArcInforead_polygon_xld_arc_info, this information
is lost, and no references to contours are generated for the
polygons. Hence, operators that access the contours associated with
a polygon, e.g., split_contours_xldsplit_contours_xldSplitContoursXldSplitContoursXldSplitContoursXldsplit_contours_xld will not work
correctly.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
PolygonsPolygonsPolygonsPolygonspolygonspolygons (输入对象) xld_poly(-array) → objectHXLDPolyHObjectHXLDPolyHobject
XLD polygons to be written.
FileNameFileNameFileNameFileNamefileNamefile_name (输入控制) filename.write → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of the ARC/INFO file.
示例(HDevelop)
* Read transformation and image
read_world_file ('image.tfw', WorldTransformation)
read_image (Image, 'image.tif')
* Segment image
* ...
* Write result
affine_trans_polygon_xld (Polygons, PolygonsWorld, WorldTransformation)
write_polygon_xld_arc_info (PolygonsWorld, 'result.gen')
结果
If the parameters are correct and the file could be written, the
operator write_polygon_xld_arc_infowrite_polygon_xld_arc_infoWritePolygonXldArcInfoWritePolygonXldArcInfoWritePolygonXldArcInfowrite_polygon_xld_arc_info 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
affine_trans_polygon_xldaffine_trans_polygon_xldAffineTransPolygonXldAffineTransPolygonXldAffineTransPolygonXldaffine_trans_polygon_xld
另见
read_world_fileread_world_fileReadWorldFileReadWorldFileReadWorldFileread_world_file,
read_polygon_xld_arc_inforead_polygon_xld_arc_infoReadPolygonXldArcInfoReadPolygonXldArcInfoReadPolygonXldArcInforead_polygon_xld_arc_info,
write_contour_xld_arc_infowrite_contour_xld_arc_infoWriteContourXldArcInfoWriteContourXldArcInfoWriteContourXldArcInfowrite_contour_xld_arc_info
模块
基础