write_objectwrite_objectWriteObjectWriteObjectwrite_object (算子)

名称

write_objectwrite_objectWriteObjectWriteObjectwrite_object — 写入图标对象。

签名

write_object(Object : : FileName : )

Herror write_object(const Hobject Object, const char* FileName)

Herror T_write_object(const Hobject Object, const Htuple FileName)

void WriteObject(const HObject& Object, const HTuple& FileName)

void HObject::WriteObject(const HString& FileName) const

void HObject::WriteObject(const char* FileName) const

void HObject::WriteObject(const wchar_t* FileName) const   ( Windows only)

static void HOperatorSet.WriteObject(HObject objectVal, HTuple fileName)

void HObject.WriteObject(string fileName)

def write_object(object: HObject, file_name: str) -> None

描述

write_objectwrite_objectWriteObjectWriteObjectWriteObjectwrite_object writes the iconic ObjectObjectObjectObjectobjectValobject to the file FileNameFileNameFileNameFileNamefileNamefile_name. The iconic object is a (possibly mixed) tuple of images, regions, or XLDs. If no extension is specified in FileNameFileNameFileNameFileNamefileNamefile_name, the extension '.hobj'".hobj"".hobj"".hobj"".hobj"".hobj" will be appended. The iconic data is written in the HALCON Iconic Object format described below.

HALCON Iconic Object (HOBJ):

HOBJ is a binary file format, which provides the functionality to write and read all kinds of iconic HALCON objects (images, regions, and XLDs). Since data is written with neither compression nor conversion, writing this file format is faster than other supported file formats in most circumstances. Hence, if an application needs to read and write all kinds of iconic HALCON objects as fast as possible and no compression is required, this format should be used. The default file extension for this file format is '.hobj'".hobj"".hobj"".hobj"".hobj"".hobj". For images, all HALCON pixel types can be written. Multi-channel images are supported. The channels can have mixed pixel types but must have the same width and height. The domain of an image and it's creation date are stored in the file as well. An object tuple is written into a single file.

执行信息

参数

ObjectObjectObjectObjectobjectValobject (输入对象)  object(-array) objectHObjectHObjectHObjectHobject

Iconic object.

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

Name of file.

File extension: .hobj

结果

如果参数有效,算子 write_objectwrite_objectWriteObjectWriteObjectWriteObjectwrite_object 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的后继

read_objectread_objectReadObjectReadObjectReadObjectread_object, read_imageread_imageReadImageReadImageReadImageread_image

另见

read_objectread_objectReadObjectReadObjectReadObjectread_object, write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image, read_imageread_imageReadImageReadImageReadImageread_image, write_regionwrite_regionWriteRegionWriteRegionWriteRegionwrite_region, read_regionread_regionReadRegionReadRegionReadRegionread_region

模块

基础