目录
数组的初始化、数组元素提取、数组元素赋值
Halcon中使用HTuple描述数组时,如何对其进行定义、初始化、以及元素的设置与提取,如下:
// 定义HTuple数组变量
HalconCpp::HTuple *ImageDimensions = nullptr;
ImageDimensions = new HalconCpp::HTuple();
HalconCpp::GetDlModelParam(*dlModelHandle,"image_dimensions",ImageDimensions);
// 提取数组元素
int width;
width = ImageDimensions->TupleSelect(0);
int height;
height = ImageDimensions->TupleSelect(1);
int channels;
channels = ImageDimensions->TupleSelect(2);