Starting with HALCON 11, all functions and classes of HALCON/C++ use the namespace HalconCpp to prevent potential name conflicts with other C++ libraries.
You can specify (“use”) the namespace in three ways:
HalconCpp::HObject original_image, smoothed_image; HalconCpp::ReadImage(&original_image, "monkey");
int main(int argc, char* argv[])
{
using namespace HalconCpp;
HObject original_image, smoothed_image;
ReadImage(&original_image, "monkey");
Then, you can use HALCON's classes and functions without prefix inside this block.
#include "HalconCpp.h" using namespace HalconCpp;
using HalconCpp::HObject; using HalconCpp::ReadImage; HObject original_image, smoothed_image; ReadImage(&original_image, "monkey");
Which method is the most suitable depends on your application, more exactly on what other libraries it includes and if there are name collisions.
Please note that the namespace is not mentioned in the operator descriptions in the reference manual in order to keep it readable. Similarly, in the following sections the namespace is left out.