关于opencv设置视频的属性无效问题-创新互联
自己最近做一个项目,采用Opencv2.4.10+MFC处理,结果发现,在视频处理过程中,采用bool VideoCapture::set(int propId, double value)函数设置图像的分辨率,返回值为0,查看opencv2.4.10文档,是这样的
站在用户的角度思考问题,与客户深入沟通,找到迁安网站设计与迁安网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都网站设计、成都网站建设、企业官网、英文网站、手机端网站、网站推广、域名注册、虚拟空间、企业邮箱。业务覆盖迁安地区。propId– Property identifier. It can be one of the following:
– CV_CAP_PROP_POS_MSECCurrent position of the video file in milliseconds.
– CV_CAP_PROP_POS_FRAMES0-based index of the frame to be decoded/captured
next.
– CV_CAP_PROP_POS_AVI_RATIORelative position of the video file: 0 - start of the
film, 1 - end of the film.
– CV_CAP_PROP_FRAME_WIDTHWidth of the frames in the video stream.
– CV_CAP_PROP_FRAME_HEIGHTHeight of the frames in the video stream.
– CV_CAP_PROP_FPSFrame rate.
– CV_CAP_PROP_FOURCC4-character code of codec.
– CV_CAP_PROP_FRAME_COUNTNumber of frames in the video file.
– CV_CAP_PROP_FORMATFormat of the Mat objects returned by retrieve() .
– CV_CAP_PROP_MODEBackend-specific value indicating the current capture mode.
– CV_CAP_PROP_BRIGHTNESSBrightness of the p_w_picpath (only for cameras).
– CV_CAP_PROP_CONTRASTContrast of the p_w_picpath (only for cameras).
– CV_CAP_PROP_SATURATIONSaturation of the p_w_picpath (only for cameras).
– CV_CAP_PROP_HUEHue of the p_w_picpath (only for cameras).
– CV_CAP_PROP_GAINGain of the p_w_picpath (only for cameras).
– CV_CAP_PROP_EXPOSUREExposure (only for cameras).
– CV_CAP_PROP_CONVERT_RGBBoolean flags indicating whether p_w_picpaths should
be converted to RGB.
– CV_CAP_PROP_WHITE_BALANCECurrently unsupported
– CV_CAP_PROP_RECTIFICATIONRectification flag for stereo cameras (note: only
supported by DC1394 v 2.x backend currently)
value – Value of the property.
文档中并没有明确视频帧的宽度,高度仅仅适合摄像头或是视频,于是我用
CV_CAP_PROP_FRAME_WIDTH,CV_CAP_PROP_FRAME_HEIGHT设置视频帧的分辨率,结果
结果发现,设置无效,于是总结出目前的opencv版本不支持视频帧
分辨率设置。
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
本文题目:关于opencv设置视频的属性无效问题-创新互联
网页链接:http://azwzsj.com/article/dphces.html