Пример #1
0
 /**默认相机配置
  * **/
 private void DefaultRGBCamera()
 {
     //彩色图像如果定义成rgb8的话,
     //在 RealsenseImage.GetBitmap()中
     //返回的24位Bmp图像颜色是反的
     format = ModuleFormat.Bgr8;
 }
Пример #2
0
        /* 使用各模块的检测方法提取格式 */
        private void getModulesStyle(WordprocessingDocument wd, string folderPath, List <Module> modList)
        {
            //遍历所有子节点
            foreach (Module mod in modList)
            {
                if (mod.Detect == true)
                {
                    string className = mod.ClassName;
                    string path      = "PaperFormatDetection.Format." + className;
                    //反射创建类的实例,返回为 object 类型
                    Console.WriteLine("  ==> [" + mod.CnName + "]正在提取格式");

                    Type     type       = Type.GetType(path);
                    object[] parameters = new object[3];
                    parameters[0] = this.modList;
                    parameters[1] = this.locator;
                    parameters[2] = this.masterType;
                    object       obj  = Activator.CreateInstance(type, parameters);
                    ModuleFormat imod = obj as ModuleFormat;
                    imod.getStyle(wd, folderPath);
                }
            }
        }
Пример #3
0
 private void DefaultInfraredCamera()
 {
     format = ModuleFormat.Y8;
 }
Пример #4
0
 private void DefaultDepthCamera()
 {
     format = ModuleFormat.Z16;
 }
Пример #5
0
 /**自己定义的枚举与Realsense自带枚举的转换
  * ModuleFormat-》Intel.RealSense.Format
  * **/
 public static Intel.RealSense.Format GetRs2Format(ModuleFormat format)
 {
     Intel.RealSense.Format rsFormat = (Intel.RealSense.Format)format;
     return(rsFormat);
 }
Пример #6
0
 /**如果不想要默认的format,则用这个构造函数
  * **/
 public Module(ModuleStream module, ModuleFormat format)
 {
     moduleType  = module;
     this.format = format;
 }