结构体 编译报错 求大神帮助

S32 iRetVal = 0;
IA_LPR_ROI_SET_S stLprRoi;
stLprRoi.astIveImage[0].enType = IVE_IMAGE_TYPE_YUV420SP;
iRetVal = IVE_CREATE_IMAGE_S(&stLprRoi.astIveImage[0], IVE_IMAGE_TYPE_YUV420SP, 1280, 720);
if (LPR_OK != iRetVal)
{
printf("[FUNC:%s][LINE:%d]:detect init err %d\n",iRetVal);
return LPR_ERROR;
}
int iReadNum = 0;
stLprRoi.astIveImage[0].enType = IVE_IMAGE_TYPE_YUV420SP;
//stLprRoi.astIveImage[0].u16Stride[0] = stLprRoi.astIveImage[0].u16Stride[0];
FILE *pScaleFile = fopen("./pic_720P/0.yuv", "rb");
for (i = 0; i < stLprRoi.astIveImage[0].u16Height * 3 / 2; i++)
{
iReadNum = fread(stLprRoi.astIveImage[0].pu8VirAddr[0] + i * stLprRoi.astIveImage[0].u16Stride[0], sizeof(U8), stLprRoi.astIveImage[0].u16Width, pScaleFile);
if (iReadNum != stLprRoi.astIveImage[0].u16Width)
{
printf("ReadFile err");
}
}
fclose(pScaleFile);
typedef struct tagIaLprROISet
{

#define MAX_IMAGE_NUM (5)
IVE_IMAGE_S astIveImage[MAX_IMAGE_NUM];

pU8 pucImage;          
pU8 pucImageU;         
pU8 pucImageV;         

S32 iCandiNum;
IA_LPR_PLATE_SET_S stPlateSet;               

} IA_LPR_ROI_SET_S;

typedef struct hiIVE_IMAGE_S
{
IVE_IMAGE_TYPE_E enType;

HI_U32  u32PhyAddr[3];
HI_U8  *pu8VirAddr[3];

HI_U16  u16Stride[3];
HI_U16  u16Width;
HI_U16  u16Height;

HI_U16  u16Reserved;        

}IVE_IMAGE_S;

IA_Lpr_Test.c:177:41: error: request for member 'u16Height' in something not a structure or union
for (i = 0; i < stLprRoi.astIveImage[0].u16Height * 3 / 2; i++)
^
IA_Lpr_Test.c:179:49: error: request for member 'pu8VirAddr' in something not a structure or union
iReadNum = fread(stLprRoi.astIveImage[0].pu8VirAddr[0] + i * stLprRoi.astIveImage[0].u16Stride[0], sizeof(U8), stLprRoi.astIveImage[0].u16Width, pScaleFile);
^
IA_Lpr_Test.c:179:93: error: request for member 'u16Stride' in something not a structure or union
iReadNum = fread(stLprRoi.astIveImage[0].pu8VirAddr[0] + i * stLprRoi.astIveImage[0].u16Stride[0], sizeof(U8), stLprRoi.astIveImage[0].u16Width, pScaleFile);
^
IA_Lpr_Test.c:179:143: error: request for member 'u16Width' in something not a structure or union
iReadNum = fread(stLprRoi.astIveImage[0].pu8VirAddr[0] + i * stLprRoi.astIveImage[0].u16Stride[0], sizeof(U8), stLprRoi.astIveImage[0].u16Width, pScaleFile);
^
IA_Lpr_Test.c:180:48: error: request for member 'u16Width' in something not a structure or union
if (iReadNum != stLprRoi.astIveImage[0].u16Width)

2个回答

HI_U8 等这些类型定义能不能找到,有没有包含它定义的头文件

没有定义出来。。。看看是不是缺少头文件了

 HI_U16
 pU8

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!