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 求数学坐标画圆以及直线的算法
  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决