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, 错误提示误导人。


相关文章
|
6月前
|
JavaScript API
required string parameter ‘XXX‘is not present 的几种情况
required string parameter ‘XXX‘is not present 的几种情况
1986 0
|
算法 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月前
|
存储 缓存 自然语言处理
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
47 1
|
6月前
Argument of type 'XX' is not assignable to parameter of type 'XX'
Argument of type 'XX' is not assignable to parameter of type 'XX'
133 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 报错解决方法
3733 0
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 ……
306 0
|
应用服务中间件
returned a response status of 405 Method Not Allowed
returned a response status of 405 Method Not Allowed
returned a response status of 405 Method Not Allowed
|
关系型数据库 MySQL 数据库
当你遇到Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value:
当你遇到Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value:
Error saving your changes: Description control characters are not allowed
在修改 GitHub 上的仓库描述时出现此提示信息:Error saving your changes: Description control characters are not allowed 开始以为是 Fork 来的没有修改权限,但之前没有遇到这样的情况,提示信息说的也不是这个意思。
2384 0