ClassesClassesClassesClasses | | | | Operators

reset_obj_dbreset_obj_dbResetObjDbreset_obj_dbResetObjDbResetObjDb (Operator)

Name

reset_obj_dbreset_obj_dbResetObjDbreset_obj_dbResetObjDbResetObjDb — Initialization of the HALCON system.

Signature

reset_obj_db( : : DefaultImageWidth, DefaultImageHeight, DefaultChannels : )

Herror reset_obj_db(const Hlong DefaultImageWidth, const Hlong DefaultImageHeight, const Hlong DefaultChannels)

Herror T_reset_obj_db(const Htuple DefaultImageWidth, const Htuple DefaultImageHeight, const Htuple DefaultChannels)

Herror reset_obj_db(const HTuple& DefaultImageWidth, const HTuple& DefaultImageHeight, const HTuple& DefaultChannels)

void ResetObjDb(const HTuple& DefaultImageWidth, const HTuple& DefaultImageHeight, const HTuple& DefaultChannels)

static void HSystem::ResetObjDb(Hlong DefaultImageWidth, Hlong DefaultImageHeight, Hlong DefaultChannels)

void HOperatorSetX.ResetObjDb(
[in] VARIANT DefaultImageWidth, [in] VARIANT DefaultImageHeight, [in] VARIANT DefaultChannels)

void HSystemX.ResetObjDb(
[in] Hlong DefaultImageWidth, [in] Hlong DefaultImageHeight, [in] Hlong DefaultChannels)

static void HOperatorSet.ResetObjDb(HTuple defaultImageWidth, HTuple defaultImageHeight, HTuple defaultChannels)

static void HSystem.ResetObjDb(int defaultImageWidth, int defaultImageHeight, int defaultChannels)

Description

The operator reset_obj_dbreset_obj_dbResetObjDbreset_obj_dbResetObjDbResetObjDb initializes the HALCON system. With this operator the five relations (grayvalue data, region data, XLDs, iconic objects and object tuplets) which are necessary for image processing with HALCON will be installed (see also count_relationcount_relationCountRelationcount_relationCountRelationCountRelation). In case the HALCON database was enabled (set_system('database','true')set_system("database","true")SetSystem("database","true")set_system("database","true")SetSystem("database","true")SetSystem("database","true")) and the relations already exist, all data entries listed in the relations will get deallocated!

The parameters DefaultImageWidthDefaultImageWidthDefaultImageWidthDefaultImageWidthDefaultImageWidthdefaultImageWidth and DefaultImageHeightDefaultImageHeightDefaultImageHeightDefaultImageHeightDefaultImageHeightdefaultImageHeight provide the initial values for the global maximum image size. If the first created object is an image, (e.g., read_imageread_imageReadImageread_imageReadImageReadImage), the set values will only be overruled, if they are smaller than the size of the created object. If on the other hand the first object to be created is a region, the values will only be adjusted in case the new image is larger than the set values. This is not only the case for the first image which is created or read: the global image size will always be enlarged, if larger images are created.

The global image size is of consequence for the opening of windows (open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow) and the memory estimate and clipping of regions. Whenever the clip mode is activated, regions will be clipped according to the global image size (set_system('clip_region','true')set_system("clip_region","true")SetSystem("clip_region","true")set_system("clip_region","true")SetSystem("clip_region","true")SetSystem("clip_region","true")). This can lead to problems if images of various sizes are used. In this case only the fact that a region is smaller or of the same size as the largest image can be guaranteed.

The parameter DefaultChannelsDefaultChannelsDefaultChannelsDefaultChannelsDefaultChannelsdefaultChannels returns the most frequent number of channels of an image object. This value can be set to 0 if for the most part regions are used. If more channels than those having been set at the initialization are necessary for one image, the number will be enlarged dynamically for this image. If less channels than those having been set at the initialization are necessary for the image, the superfluous channels will be set as undefined. For the user this will seem as if they were non existent, however, memory is allocated unnecessarily.

The parameter values can be queried using the operator get_systemget_systemGetSystemget_systemGetSystemGetSystem.

Attention

If the operator reset_obj_dbreset_obj_dbResetObjDbreset_obj_dbResetObjDbResetObjDb is not called at the beginning of a HALCON session, HALCON will be initialized automatically by the operator reset_obj_db(128,128,0)reset_obj_db(128,128,0)ResetObjDb(128,128,0)reset_obj_db(128,128,0)ResetObjDb(128,128,0)ResetObjDb(128,128,0) causing side effects on region clipping, accordingly. When the database was enabled by the parameter value 'database' of the operator set_systemset_systemSetSystemset_systemSetSystemSetSystem, calling reset_obj_dbreset_obj_dbResetObjDbreset_obj_dbResetObjDbResetObjDb will deallocate all iconic objects.

Parallelization

Parameters

DefaultImageWidthDefaultImageWidthDefaultImageWidthDefaultImageWidthDefaultImageWidthdefaultImageWidth (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Default image width (in pixels).

Default value: 128

Suggested values: 64, 128, 320, 640, 800, 1280

DefaultImageHeightDefaultImageHeightDefaultImageHeightDefaultImageHeightDefaultImageHeightdefaultImageHeight (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Default image height (in pixels).

Default value: 128

Suggested values: 64, 128, 240, 480, 600, 1024

DefaultChannelsDefaultChannelsDefaultChannelsDefaultChannelsDefaultChannelsdefaultChannels (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Usual number of channels.

Default value: 0

Suggested values: 0, 1, 2, 3, 4, 5, 6, 7

Result

The operator reset_obj_dbreset_obj_dbResetObjDbreset_obj_dbResetObjDbResetObjDb returns the value 2 (H_MSG_TRUE) if the parameter values are correct. Otherwise an exception will be raised.

See also

get_channel_infoget_channel_infoGetChannelInfoget_channel_infoGetChannelInfoGetChannelInfo, count_relationcount_relationCountRelationcount_relationCountRelationCountRelation

Module

Foundation


ClassesClassesClassesClasses | | | | Operators