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");
  • 相关阅读:
    快速幂
    三角函数与反三角函数的使用
    poj1050 dp动态规划
    归并排序算法
    KMP算法(查找子序列)
    hdu1233 继续畅通工程 (最小生成树——并查集)
    set<pair<int,int> > 的运用
    HDU 4513 吉哥系列故事――完美队形II (manacher算法)
    Codeforces Round #360 (Div. 2) C. NP-Hard Problem (BFS)
    Codeforces Round #357 (Div. 2) C.Heap Operations 优先队列 + 模拟
  • 原文地址:https://www.cnblogs.com/ssjylsg/p/2513195.html
Copyright © 2011-2022 走看看