Halcon中“Not enough memory available”异常处理方法之一

来源:互联网 发布:极品飞车18mac 编辑:程序博客网 时间:2024/04/28 11:41

Halcon在执行threshold_sub_pix算子的时候,有几率抛出异常“Not enough memory available”。
查询手册,异常代码为:H_ERR_MEM 6001 Not enough memory available

解决方法:使用threshold算子替代即可。
异常代码:

threshold_sub_pix (ImageReduced, Border, threshold)

改善后

threshold(ImageReduced, Region1, threshold, 255)gen_contour_region_xld(Region1, Border, 'border_holes')
阅读全文
0 0