首页 > 技术知识 > 正文

问题:海思采集视频,四周有一个白色的方框把视频包裹。想除去这个边框。 有白色边框的代码:

VPSS_CHN_ATTR_S stChnAttr ;//= {0}; stChnAttr.bSpEn = HI_FALSE; stChnAttr.bUVInvert = HI_FALSE; stChnAttr.bBorderEn = HI_TRUE; stChnAttr.stBorder.u32Color = 0xffffff; stChnAttr.stBorder.u32LeftWidth = 2; stChnAttr.stBorder.u32RightWidth = 2; stChnAttr.stBorder.u32TopWidth = 2; stChnAttr.stBorder.u32BottomWidth = 2; s32Ret = HI_MPI_VPSS_SetChnAttr(VpssGrp, VpssChn, &stChnAttr); if (s32Ret != HI_SUCCESS) { SAMPLE_PRT(“HI_MPI_VPSS_SetChnAttr failed with %#x\n”, s32Ret); return HI_FAILURE; } 对边框的设置,主要对结构体VPSS_CHN_ATTR_SBORDER_S 和的设置 typedef struct HI_VPSS_CHN_ATTR_S { HI_BOOL bSpEn; HI_BOOL bUVInvert; HI_BOOL bBorderEn; //边框使能开关 BORDER_S stBorder; //边框属性 }VPSS_CHN_ATTR_S; //定义边框属性结构体 typedef struct hiBORDER_S { HI_U32 u32TopWidth; /* 边框顶部宽度,以像素为单位*/ HI_U32 u32BottomWidth; /* 边框底部宽度,以像素为单位*/ HI_U32 u32LeftWidth; /*边框左边宽度,以像素为单位*/ HI_U32 u32RightWidth; /* 边框右边宽度,以像素为单位*/ HI_U32 u32Color; /*边框颜色,颜色格式为RGB888*/ } BORDER_S;
<

所以,如果设置成无边框,只需要修改一个参数。 stChnAttr.bBorderEn = HI_FALSE; 原文链接:https://blog.csdn.net/wo_Niu123/article/details/90071088?utm_medium=distribute.pc_relevant.none-task-blog-baidulandingword-3&spm=1001.2101.3001.4242

猜你喜欢