Lastly, we have to integrate the HDevelop program into our Visual Studio Project.
#include <iostream> #include "HalconCpp.h" #include "hdev_count_regions/source/hdev_count_regions.h" int main() { HalconCpp::HImage Image("pcb"); hdev_count_regions::SetResourcePath("hdev_count_regions/res_hdev_count_regions"); HalconCpp::HTuple Number{}; hdev_count_regions::count_regions(Image, &Number); std::cout << "Number of Regions: " << Number.L() << '\n'; }