今天在调试程序中发现一个问题,再次让我感受Halcon内存管理的神秘,嘿嘿
说说问题吧
Hlong PointerGray, PointerRed, PointerGreen, PointerBlue; Hlong WidthGray, HeightGray;
get_image_pointer1(objImageGray, &PointerGray, lpcsType, &WidthGray, &HeightGray);
编译可以通过,但是
Hlong PointerGray, PointerRed, PointerGreen, PointerBlue; Hlong WidthGray, HeightGray; get_image_pointer3(objImage, &PointerRed, &PointerGreen, &PointerBlue, &lpcsType, &WidthGray, &HeightGray);
编译就通不过,大家可以试一下
如果需要,可以使用 decompose3(objImage, &objImageRed, &objImageGreen, &objImageGray);
然后使用函数get_image_pointer1()得到指针
|