mastermindw 2017-06-06 01:45 采纳率: 0%
浏览 894

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

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条回答 默认 最新

  • oyljerry 2017-06-06 02:27
    关注

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

    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?