小编use*_*838的帖子

我有3个错误:期望一个")",期望一个表达式,类型为long的参数与U32类型的参数不兼容

/*******************************************************************/
#define cdisp(a, src, col);
#define FL_wpset_U8 256;
/*******************************************************************/
void main(void)
{
    int posx= 100, posy=100, dx=300, dy=300; 
    long length=5000; 
    int threshold=125; 
    int lx, x0=0, y0=0;
    int res1=0,res2=0, *rlc, *input, i;
    long dest1,dest2,desttemp, addr;
    char c;
    image Area, Ovl;





    ScrSetLogPage((int)ScrGetPhysPage);
    OvlSetLogPage((int)OvlGetPhysPage);

    OvlClearAll;

    set_ovlmask(255);

    ImageAssign(&Area,ScrByteAddr(posx,posy), dx, dy, ScrGetPitch);

    ImageAssign(&Ovl,OvlBitAddr(posx,posy), dx, dy, OvlGetPitch);


    frameo(&Ovl);




    vmode(vmOvlLive);
    /* follow contour */
    dest1=DRAMWordMalloc((long)length);
    dest2=DRAMWordMalloc((long)length);
Run Code Online (Sandbox Code Playgroud)

2个错误在行中frameo(&Ovl)(预期为")",预期表达式).

desttemp = dest1;
res1 = contour8(&Area,x0,y0,~2,threshold,length,&desttemp);
Run Code Online (Sandbox Code Playgroud)

最后一个错误位于最后一行(long类型的参数与U32类型的参数不兼容).contour8的函数签名是I32 contour8(image *a, I32 x0, I32 y0, I32 dir, I32 thr, …

c c++ opencv

1
推荐指数
1
解决办法
128
查看次数

如何修复错误"long*与U32**不兼容"?

我尝试使用以下签名调用函数:

I32 contour8(image *a, I32 x0, I32 y0, I32 dir, I32 thr, U32 lng, U32 **dst);
Run Code Online (Sandbox Code Playgroud)

使用此代码:

int posx = 100, posy = 100, dx = 300, dy = 300;
long length = 5000;
int threshold = 125;
int lx, x0 = 0, y0 = 0;
int res1 = 0, res2 = 0, *rlc, *input, i;
long dest1, dest2, desttemp, addr;
char c;
image Area;

desttemp = dest1;
res1 = contour8(&Area, x0, y0, ~2, threshold, length, &desttemp);
Run Code Online (Sandbox Code Playgroud)

但是在编译时我得到以下错误:

error argument …
Run Code Online (Sandbox Code Playgroud)

c c++ type-conversion

-1
推荐指数
1
解决办法
277
查看次数

标签 统计

c ×2

c++ ×2

opencv ×1

type-conversion ×1