0
点赞
收藏
分享

微信扫一扫

GenImageInterleaved Wrong type of control parameter 1


HALCON error #
1201: Wrong type of control parameter 1
源码:

HObject rgbImage;
const int iRow = 1;
const int iCol = 1;
const char sz[3 * iRow*iCol] = { 1,2,3 };
try
{
HalconCpp::GenImageInterleaved(&rgbImage, (const char*)sz, "rgb",
iCol, iRow, 0,
"byte", iCol, iRow,
0, 0, -1, 0);
}

将 HObject rgbImage;改成HImage rgbImage; 错误提示不变。

改成成员函数,就好了。

HImage rgbImage;
const int iRow = 1;
const int iCol = 1;
const char sz[3 * iRow*iCol] = { 1,2,3 };
try
{
rgbImage.GenImageInterleaved( (void*)sz, "rgb",
iCol, iRow, 0,
"byte", iCol, iRow,
0, 0, -1, 0);
}
CATCH_AND_LOG;

开发环境:Win10 + VS2017+ halcon20

GenImageInterleaved Wrong type of control parameter 1_错误提示

第一个参数是ImageRGB,第一个控制参数是PixelPointer, 错误提示误导人。 

举报

相关推荐

0 条评论