GenImageInterleaved Wrong type of control parameter 1

简介: 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

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


相关文章
|
算法 C# C++
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
|
5月前
|
CDN
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
46 0
|
7月前
|
存储 缓存 自然语言处理
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
55 1
|
8月前
Argument of type 'XX' is not assignable to parameter of type 'XX'
Argument of type 'XX' is not assignable to parameter of type 'XX'
150 0
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
|
人工智能 自然语言处理 语音技术
Invalid prop: type check failed for prop “index“. Expected String with value “5“问题解决
Invalid prop: type check failed for prop “index“. Expected String with value “5“问题解决
148 0
|
人工智能 Java
Required request body is missing
Required request body is missing
227 0
|
JSON 数据格式
Required request parameter ‘name‘ for method parameter type String is not present 报错解决方法
Required request parameter ‘name‘ for method parameter type String is not present 报错解决方法
3816 0
|
JSON 数据格式
Required request body is missing:415
Required request body is missing:415
Required request body is missing:415
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
328 0