zoukankan      html  css  js  c++  java
  • 多易拍 二次开发

    1.多易拍介绍:百度百科:http://baike.baidu.com/view/4320163.htm

    2.多易拍,简单实现图片抓拍

    前置动作:
      A:安装驱动
      B:vs 引入videochannel control com组建
    1.初始化:
    初始化:
    View Code
    this.axVideoChannel1.NISetProperty("InputMode", "3");
    this.axVideoChannel1.NISetProperty("SourceFilterName", "NewImage SuperCam");                         
    this.axVideoChannel1.NISetProperty("SamplerEnable", "YES");
    this.axVideoChannel1.NISetProperty("SealMaskEnable", "YES");
    this.axVideoChannel1.NISetProperty("WarpingEffectEnable", "YES");
    
    this.axVideoChannel1.NISetProperty("KeepVideoAspectEnable", "YES");
    this.axVideoChannel1.NISetProperty("EnableTargetDPI", "YES");
    this.axVideoChannel1.NISetProperty("CameraFOVHeight", "27.1");
    this.axVideoChannel1.NISetProperty("CameraFOVWidth", "36.1");
    this.axVideoChannel1.EnableMask = true;
    
    this.axVideoChannel1.NISetProperty("CompressFilterName", "default");
    this.axVideoChannel1.NISetProperty("SmartTeeEnable", "YES");
    this.axVideoChannel1.ROIXRatio = 0.85;
    this.axVideoChannel1.ROIXRatio = 0.75;
    this.axVideoChannel1.ROIYRatio = 0.75;
    
    this.axVideoChannel1.AllowContextMenu = false;
    this.axVideoChannel1.NISetProperty("VideoBackgroundColorRGB", "0,0,0");
    this.axVideoChannel1.ColorMode = 117;
    this.axVideoChannel1.ColorMode = 119;           
    this.axVideoChannel1.ColorMode = 121;
    
    this.axVideoChannel1.ColorMode = 0x00020000 + 25;
    this.axVideoChannel1.ColorMode = 101;
    this.axVideoChannel1.NISetProperty("Do", "CreateAllFilters");
    
    this.axVideoChannel1.StartPlay();

    2.抓拍

    View Code
    this.axVideoChannel1.EnablePreview = false;
    this.axVideoChannel1.AutoFit = false;
    this.axVideoChannel1.NISetProperty("MonoNoiseLevel", "0.85");
    this.axVideoChannel1.NISetProperty("EnableTargetDPI", "YES");
    this.axVideoChannel1.NISetProperty("TargetDPIColor", "200");
    
    this.axVideoChannel1.NISetProperty("TargetDPIMono", "200");
    this.axVideoChannel1.ColorMode = 1;
    this.axVideoChannel1.DoGrabAndEdit();
    3.获取文件流:以下几种方法都可以
    View Code
    this.axVideoChannel1.NIGetProperty("GetResultImageJPEG");
    this.axVideoChannel1.NIGetProperty("GetSnapshotJPEG"); 
    this.axVideoChannel1.NIGetProperty("GetProcessedSnapshotJPEG");
    this.axVideoChannel1.NIGetProperty("GetSnapshot");

    4.保存文件 

    View Code
    this.axVideoChannel1.SaveToFile(string.Format("C://{0}.JPG",DateTime.Now.ToString("yyyyMMddmmss")));

    5.停止/关闭

    View Code
    this.axVideoChannel1.StopPlay();
    this.axVideoChannel1.NISetProperty("Do", "DestroyFilterGraph");
  • 相关阅读:
    Javascript学习总结
    MVC和MVVM
    各大搜索引擎网址收录入口地址
    微软称IE9将更加出色 对手谷歌也能从中受益(图文)
    公安部:身份证丢失无需挂失 被冒用不担责 冒用身份证犯罪
    微软发布Mac 8版Messenger 支持视频会议(图)
    如何删除XP系统的NETWARE,改变登陆界面 火急!!XP系统登录界面由于netware造成的不能更改
    使用WebBrowser自动登录阿里妈妈网站
    微软发布IE9开发者预览版 不支持XP系统(图)
    ASP 0113 的错误的终极解决办法(三种)
  • 原文地址:https://www.cnblogs.com/ssjylsg/p/2513195.html
Copyright © 2011-2022 走看看