[go: up one dir, main page]

CN102289416A - Image Acquisition Method Based on Virtual Hardware Device - Google Patents

Image Acquisition Method Based on Virtual Hardware Device Download PDF

Info

Publication number
CN102289416A
CN102289416A CN2011101946746A CN201110194674A CN102289416A CN 102289416 A CN102289416 A CN 102289416A CN 2011101946746 A CN2011101946746 A CN 2011101946746A CN 201110194674 A CN201110194674 A CN 201110194674A CN 102289416 A CN102289416 A CN 102289416A
Authority
CN
China
Prior art keywords
encapsulation layer
interface
image acquisition
interface protocol
hardware device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101946746A
Other languages
Chinese (zh)
Other versions
CN102289416B (en
Inventor
王勇
陈宇
周昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sinyada Technology Co ltd
Original Assignee
Sunyard System Engineering Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sunyard System Engineering Co ltd filed Critical Sunyard System Engineering Co ltd
Priority to CN201110194674.6A priority Critical patent/CN102289416B/en
Publication of CN102289416A publication Critical patent/CN102289416A/en
Application granted granted Critical
Publication of CN102289416B publication Critical patent/CN102289416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimiles In General (AREA)

Abstract

The invention relates to an image acquisition method based on virtual hardware equipment, which comprises the following steps: creating an interface protocol encapsulation module; loading image acquisition hardware equipment; configuring the attribute of image acquisition hardware equipment; the application program calls the interface protocol in the interface protocol encapsulation module to drive the image acquisition hardware equipment and performs scanning action. The invention shields the difference of hardware interfaces at the bottom layer in the image acquisition process, provides a uniform processing mode and interfaces for users, uniformly manages various acquisition equipment of different types, brands and models, realizes the dynamic switching among the acquisition equipment in application, realizes the memory function of a virtual hardware packaging layer, and truly realizes that the acquired hardware equipment is irrelevant to software.

Description

基于虚拟硬件设备的影像采集方法Image Acquisition Method Based on Virtual Hardware Device

技术领域 technical field

本发明涉及图像通信技术领域,尤其涉及一种基于虚拟硬件设备的影像采集方法。The invention relates to the technical field of image communication, in particular to an image acquisition method based on virtual hardware equipment.

背景技术 Background technique

影像采集是在影像业务应用系统的控制下,通过影像录入设备获取影像数据的图像采集过程。常用的影像采集设备一般包括扫描仪、摄像头和数码相机,此类影像采集设备一般具有不同的类型、型号和品牌,并且使用的接口方式各不相同。国际上通用的影像采集标准接口技术主要包括TWAIN接口技术、KOFAX接口技术、ISIS接口技术和DirectShow技术。TWAIN接口技术是用于从静态图像设备中提取图像,绝大部分的扫描仪和数码相机都提供了TWAIN驱动程序,利用统一的TWAIN接口,应用程序可以非常方便地从这些设备中获取图像;KOFAX接口技术是基于ISIS标准的驱动,除了基本的图像获取、显示等之外,还提供图像去黑边、去阴影、条码识别、补码识别等图像处理功能;ISIS接口技术是图像与扫描仪接口标准,由Pixel公司开发的图形软件标准,属输入软件范畴,是一个软件模块系统。其中每部分执行一项具体的图像处理功能,ISIS模块也可控制扫描仪和打印机,协助处理图像、压缩和图像文件格式的转换,读写数据文件;DirectShow技术是一种由微软公司开发的能够让软件开发者对媒体文件执行各种不同处理的应用程序设计接口,基于微软公司Windows构成物件模型框架,DirectShow为大部份微软公司程序设计语言提供了一个媒体的普遍接口,而且是一个可扩展的,能在使用者或开发者的命令下播放或记录媒体文件的,以Filter为基础的框架,采用DirectShow技术可以控制视频设备的输出。Image acquisition is an image acquisition process of obtaining image data through image recording equipment under the control of the image business application system. Commonly used image acquisition devices generally include scanners, cameras, and digital cameras. Such image acquisition devices generally have different types, models, and brands, and use different interface methods. The internationally common image acquisition standard interface technologies mainly include TWAIN interface technology, KOFAX interface technology, ISIS interface technology and DirectShow technology. TWAIN interface technology is used to extract images from static image devices. Most scanners and digital cameras provide TWAIN drivers. Using a unified TWAIN interface, applications can easily obtain images from these devices; KOFAX The interface technology is driven by the ISIS standard. In addition to basic image acquisition and display, it also provides image processing functions such as image removal of black borders, shadow removal, barcode recognition, and complementary code recognition; ISIS interface technology is the interface between images and scanners. Standard, a graphics software standard developed by Pixel, belongs to the category of input software and is a software module system. Each part performs a specific image processing function. The ISIS module can also control scanners and printers, assist in processing images, compress and convert image file formats, and read and write data files; DirectShow technology is a technology developed by Microsoft that can An application programming interface that allows software developers to perform various processing on media files. Based on the Microsoft Windows composition object model framework, DirectShow provides a common media interface for most Microsoft programming languages, and is an extensible It is a framework based on Filter that can play or record media files under the command of users or developers, and can control the output of video devices by using DirectShow technology.

影像采集设备在扫描录入过程中,由于其不同的接口定义,使影像采集设备在控制方式和驱动程序上存在着很大的差异,一般的影像采集设备支持上述接口标准技术中的一种或几种。用户在使用上述影像采集设备时,必须配备有符合影像采集设备接口标准的驱动程序才能正常工作,一般设备驱动程序是特定为影像采集设备配置的,它们在连接和数据通信上具有速度快、数据传输准确的优点,但此驱动程序只能驱动此类型的影像采集设备,当使用多台在类型、型号、品牌和接口方式上各不相同的影像采集设备时,就必须配置相应的多个驱动程序,给用户带来使用上的麻烦。During the scanning and recording process of image acquisition equipment, due to its different interface definitions, there are great differences in control methods and drivers of image acquisition equipment. Generally, image acquisition equipment supports one or more of the above-mentioned interface standard technologies. kind. When users use the above-mentioned image acquisition devices, they must be equipped with drivers that meet the interface standards of image acquisition devices in order to work normally. Generally, device drivers are specially configured for image acquisition devices, and they have fast connection and data communication. The advantage of accurate transmission, but this driver can only drive this type of image acquisition device. When using multiple image acquisition devices with different types, models, brands and interface methods, it is necessary to configure multiple corresponding drivers. program, which brings troubles to users.

发明内容 Contents of the invention

本发明所要解决的技术问题是针对现有影像采集过程中存在的上述问题,提供了一种兼容不同类型、不同品牌、不同型号、不同接口方式的基于虚拟硬件设备的影像采集方法。The technical problem to be solved by the present invention is to provide an image acquisition method based on virtual hardware devices compatible with different types, different brands, different models, and different interface modes for the above-mentioned problems existing in the existing image acquisition process.

为解决上述问题,本发明的技术方案是:For solving the problems referred to above, technical scheme of the present invention is:

一种基于虚拟硬件设备的影像采集方法,包括以下步骤:An image acquisition method based on a virtual hardware device, comprising the following steps:

(1)创建接口协议封装模块,并向应用程序提供与接口协议对应的调用函数;(1) Create an interface protocol encapsulation module, and provide the calling function corresponding to the interface protocol to the application program;

(2)加载影像采集硬件设备,根据加载到的影像采集硬件设备属性创建对应的虚拟硬件封装层;(2) Load the image acquisition hardware device, and create a corresponding virtual hardware encapsulation layer according to the attributes of the loaded image acquisition hardware device;

(3)配置影像采集硬件设备属性,并获取影像采集硬件设备的接口协议配置信息,根据接口协议配置信息配置虚拟硬件封装层的接口协议,并向虚拟硬件封装层传入硬件设备接口协议对应的调用函数;(3) Configure the properties of the image acquisition hardware device, and obtain the interface protocol configuration information of the image acquisition hardware device, configure the interface protocol of the virtual hardware encapsulation layer according to the interface protocol configuration information, and pass the interface protocol corresponding to the hardware device interface protocol to the virtual hardware encapsulation layer Call functions;

(4)应用程序通过调用函数调用接口协议封装模块中的接口协议驱动影像采集硬件设备,并进行扫描动作。(4) The application program calls the interface protocol in the interface protocol encapsulation module to drive the image acquisition hardware device by calling the function, and performs the scanning action.

优选地,所述步骤(1)中的创建接口协议封装模块是将Kofax接口协议、TWAI N接口协议、Folder接口协议、基于DirectShow技术的接口协议、ISIS接口协议和API接口协议封装在接口协议封装模块中;所述接口协议由应用程序中与接口协议对应的调用函数调用。Preferably, creating interface protocol encapsulation module in described step (1) is to encapsulate Kofax interface protocol, TWAIN interface protocol, Folder interface protocol, interface protocol based on DirectShow technology, ISIS interface protocol and API interface protocol in interface protocol encapsulation In the module; the interface protocol is invoked by the calling function corresponding to the interface protocol in the application program.

优选地,所述步骤(2)还包括虚拟硬件封装层的检测,虚拟硬件封装层的检测在加载影像采集硬件设备之后执行,所述虚拟硬件封装层的检测是检测处于连接状态影像采集硬件设备对应的虚拟封装层是否已经存在并正确配置,若配置完成,则加载影像采集硬件对应的虚拟硬件封装层,并跳转至步骤(4);若不存在则进行创建虚拟硬件封装层和后续的步骤(3)和步骤(4)。Preferably, the step (2) also includes the detection of a virtual hardware encapsulation layer, the detection of the virtual hardware encapsulation layer is performed after the image acquisition hardware device is loaded, and the detection of the virtual hardware encapsulation layer is to detect the image acquisition hardware device in a connected state Whether the corresponding virtual encapsulation layer already exists and is correctly configured. If the configuration is complete, load the virtual hardware encapsulation layer corresponding to the image acquisition hardware and jump to step (4); if it does not exist, create a virtual hardware encapsulation layer and follow-up Step (3) and step (4).

优选地,所述步骤(3)中的配置虚拟硬件封装层还包括配置封装层加载接口、封装层卸载接口、封装层查询接口、封装层别名管理接口、封装层调整接口和封装层状态接口。Preferably, configuring the virtual hardware encapsulation layer in the step (3) also includes configuring an encapsulation layer loading interface, an encapsulation layer unloading interface, an encapsulation layer query interface, an encapsulation layer alias management interface, an encapsulation layer adjustment interface and an encapsulation layer status interface.

优选地,所述步骤(2)中创建影像采集硬件设备对应的虚拟硬件封装层是将加载到的影像采集硬件设备的属性传入虚拟硬件封装层中。Preferably, creating the virtual hardware encapsulation layer corresponding to the image acquisition hardware device in the step (2) is to transfer the attributes of the loaded image acquisition hardware device into the virtual hardware encapsulation layer.

本发明的基于虚拟硬件设备的影像采集方法,实现了集成各种文档以及影像资料数字化采集,创建了与硬件设备对应的虚拟硬件封装层,提供了多种常用的接口协议标准,包含了对ISIS、TWAIN、KOFAX接口协议的支持,可以适用于市场上几乎任何一款扫描仪,既支持高速扫描仪,也支持普通的平板式扫描仪;包含了对DirectShow的支持,可以适用与市场上任何一款视频头设备;同时,该方法支持API接口的访问,方便于一些非标准协议接口的通信。本发明在影像采集过程中屏蔽底层的硬件接口差异,为用户提供统一处理方式和接口,统一管理了各种不同类型、不同品牌、不同型号的采集设备,在应用中实现各种采集设备之间的动态切换,并实现虚拟硬件封装层记忆功能,真正做到采集的硬件设备与软件无关;再者,用户可根据自己的业务需求,配置适合的模板和扫描结构,进行影像采集工作。The image collection method based on the virtual hardware device of the present invention realizes the integration of various documents and digital collection of image data, creates a virtual hardware encapsulation layer corresponding to the hardware device, provides a variety of commonly used interface protocol standards, and includes support for ISIS , TWAIN, KOFAX interface protocol support, can be applied to almost any scanner on the market, not only supports high-speed scanners, but also supports ordinary flatbed scanners; includes support for DirectShow, can be applied to any scanner on the market A video head device; at the same time, this method supports the access of the API interface, which is convenient for the communication of some non-standard protocol interfaces. The present invention shields the underlying hardware interface differences during the image collection process, provides users with a unified processing method and interface, and uniformly manages various collection devices of different types, brands, and models, and realizes the connection between various collection devices in the application. It realizes the dynamic switching of the virtual hardware encapsulation layer memory function, and truly achieves that the acquisition hardware device has nothing to do with the software; moreover, users can configure suitable templates and scanning structures according to their own business needs to carry out image acquisition work.

附图说明 Description of drawings

图1是本发明基于虚拟硬件设备的影像采集方法的影像采集流程图。FIG. 1 is an image acquisition flow chart of the image acquisition method based on a virtual hardware device in the present invention.

具体实施方式 Detailed ways

下面结合附图和实施例进一步详细说明本发明,但本发明的保护范围并不限于此。The present invention will be further described in detail below in conjunction with the accompanying drawings and examples, but the protection scope of the present invention is not limited thereto.

本发明的基于虚拟硬件设备的影像采集方法,在影像采集过程中屏蔽底层的硬件接口差异,提供了统一处理方式和接口,统一管理了各种不同类型、不同品牌、不同型号的采集设备,在应用中实现虚拟硬件封装层记忆功能,下面通过具体的实施例来说明。The image acquisition method based on the virtual hardware device of the present invention shields the difference of the underlying hardware interface during the image acquisition process, provides a unified processing method and interface, and uniformly manages various acquisition devices of different types, brands, and models. The memory function of the virtual hardware encapsulation layer is realized in the application, which will be described through specific embodiments below.

实施例1:本发明的影像采集硬件设备是名称为KODAK i4600的扫描仪,支持TWAIN接口协议,与硬件设备对应的虚拟封装层的名称为SV_KODAK4600。Embodiment 1: The image acquisition hardware device of the present invention is a scanner called KODAK i4600, which supports the TWAIN interface protocol, and the name of the virtual encapsulation layer corresponding to the hardware device is SV_KODAK4600.

参照图1,本发明的基于虚拟硬件设备的影像采集方法,包括以下步骤:With reference to Fig. 1, the image collection method based on virtual hardware device of the present invention, comprises the following steps:

将Kofax接口协议、TWAIN接口协议、Folder接口协议、基于DirectShow技术的接口协议、ISIS接口协议和API接口协议封装在接口协议封装模块中;根据接口协议封装模块封装的接口协议信息,向应用程序提供与各个接口协议对应的调用函数;Encapsulate Kofax interface protocol, TWAIN interface protocol, Folder interface protocol, interface protocol based on DirectShow technology, ISIS interface protocol and API interface protocol in the interface protocol encapsulation module; provide the application program with the interface protocol information encapsulated by the interface protocol encapsulation module Call functions corresponding to each interface protocol;

加载影像采集硬件设备,并进行虚拟硬件封装层的检测;所述虚拟硬件封装层的检测是检测处于连接状态的扫描仪KODAK i4600对应的虚拟封装层SV_KODAK4600是否已经存在并正确配置,配置文件信息存储目录中寻找,根据寻找的情况分两步进行:Load the image acquisition hardware device, and carry out the detection of virtual hardware encapsulation layer; The detection of described virtual hardware encapsulation layer is to detect whether the virtual encapsulation layer SV_KODAK4600 corresponding to the scanner KODAK i4600 in connected state exists and is configured correctly, and configuration file information storage Search in the directory, and proceed in two steps according to the situation of the search:

第一种情况:扫描仪KODAK i4600对应的虚拟封装层SV_KODAK4600不存在,需按下述步骤进行:Case 1: The virtual encapsulation layer SV_KODAK4600 corresponding to the scanner KODAK i4600 does not exist, and the following steps are required:

1.调用新建封装层程序,传入封装层名SV_KODAK4600,创建对应的虚拟硬件封装层SV_KODAK4600,并将加载到的扫描仪KODAK i4600的属性传入虚拟硬件封装层中;1. Call the new encapsulation layer program, pass in the encapsulation layer name SV_KODAK4600, create the corresponding virtual hardware encapsulation layer SV_KODAK4600, and pass the attributes of the loaded scanner KODAK i4600 into the virtual hardware encapsulation layer;

2.使用者通过硬件设备属性界面,配置扫描仪KODAK i4600的属性,可以设置扫描参数为默认扫描参数,也可设置KODAK i4600专用扫描属性;获取扫描仪的接口协议配置信息为TWAIN接口协议,选择封装层SV_KODAK4600,配置封装层的标准协议接口为TWAIN接口协议,并向封装层SV_KODAK4600传入TWAIN接口的调用函数;配置虚拟硬件封装层还包括对封装层加载接口LoadWrapper()、封装层卸载接口UnloadWrapper()、封装层查询接口QueryWrapper()、封装层别名管理接口NewWrapperAlias()、封装层调整接口ConfigAttribute()和封装层状态接口CheckDeviceConnect()的配置;2. The user configures the properties of the scanner KODAK i4600 through the hardware device property interface, and can set the scanning parameters as the default scanning parameters, or set the special scanning properties of KODAK i4600; the interface protocol configuration information of the scanner is TWAIN interface protocol, select Encapsulation layer SV_KODAK4600, the standard protocol interface of the configuration encapsulation layer is the TWAIN interface protocol, and the calling function of the TWAIN interface is passed to the encapsulation layer SV_KODAK4600; the configuration of the virtual hardware encapsulation layer also includes the encapsulation layer loading interface LoadWrapper(), encapsulation layer unloading interface UnloadWrapper (), encapsulation layer query interface QueryWrapper (), encapsulation layer alias management interface NewWrapperAlias (), encapsulation layer adjustment interface ConfigAttribute () and encapsulation layer state interface CheckDeviceConnect () configuration;

3.应用程序调用扫描接口函数和接口协议封装模块中的TWAIN接口调用函数,驱动扫描仪KODAK i4600,并进行扫描动作。3. The application calls the scanning interface function and the TWAIN interface calling function in the interface protocol encapsulation module, drives the scanner KODAK i4600, and performs the scanning action.

第二种情况:扫描仪KODAK i4600对应的虚拟封装层SV_KODAK4600已经存在并正确配置,需按下述步骤进行:The second case: the virtual encapsulation layer SV_KODAK4600 corresponding to the scanner KODAK i4600 already exists and is correctly configured, and the following steps are required:

1.应用程序调用封装层加载接口LoadWrapper(),加载虚拟硬件封装层,传入封装层名SV_KODAK4600,虚拟封装层自动读取KODAK i4600的配置信息,通过TWAIN协议加载硬件设备,并设置扫描参数;1. The application program calls the encapsulation layer loading interface LoadWrapper(), loads the virtual hardware encapsulation layer, and passes in the encapsulation layer name SV_KODAK4600, the virtual encapsulation layer automatically reads the configuration information of KODAK i4600, loads the hardware device through the TWAIN protocol, and sets the scanning parameters;

2.应用程序调用扫描接口函数和接口协议封装模块中的TWAIN接口调用函数,驱动扫描仪KODAK i4600,并进行扫描动作。2. The application program calls the scanning interface function and the TWAIN interface calling function in the interface protocol encapsulation module, drives the scanner KODAK i4600, and performs scanning actions.

通过上述步骤,完成扫描仪KODAKi4600对应的虚拟硬件封装层SV_KODAK4600的建立,通过虚拟硬件封装层驱动扫描仪KODAK i4600进行扫描动作;使用者就无需担心软件驱动与影像采集硬件设备在传输通信上不兼容的问题。Through the above steps, the establishment of the virtual hardware encapsulation layer SV_KODAK4600 corresponding to the scanner KODAKi4600 is completed, and the scanner KODAK i4600 is driven to scan through the virtual hardware encapsulation layer; users do not need to worry about the incompatibility between the software driver and the image acquisition hardware device in terms of transmission and communication The problem.

实施例2:本发明的影像采集硬件设备是名称为BANTEC S-185的扫描仪,不支持TWAI N接口协议,属于非标准协议接口,与硬件设备对应的虚拟封装层的名称为SV_BANTEC。BANTEC系列扫描仪可以通过ISIS接口协议进行扫描,为了说明非标准方式,本实施例中采用直接调用设备API接口驱动提供的接口封装。通过虚拟封装层驱动扫描仪BANTEC S-185设备进行采集的过程与通过TWAIN协议方式类似,只是虚拟封装层提供的接口不同。Embodiment 2: the image acquisition hardware device of the present invention is a scanner named BANTEC S-185, which does not support the TWAIN interface protocol and belongs to a non-standard protocol interface, and the name of the virtual encapsulation layer corresponding to the hardware device is SV_BANTEC. BANTEC series scanners can scan through the ISIS interface protocol. In order to illustrate the non-standard method, this embodiment adopts the interface encapsulation provided by directly calling the device API interface driver. The process of driving the scanner BANTEC S-185 through the virtual encapsulation layer is similar to that through the TWAIN protocol, except that the interface provided by the virtual encapsulation layer is different.

参照图1,本发明的基于虚拟硬件设备的影像采集方法,包括以下步骤:With reference to Fig. 1, the image collection method based on virtual hardware device of the present invention, comprises the following steps:

将Kofax接口协议、TWAIN接口协议、Folder接口协议、基于DirectShow技术的接口协议、ISIS接口协议和API接口协议封装在接口协议封装模块中;根据接口协议封装模块封装的接口协议信息,向应用程序提供与各个接口协议对应的调用函数;Encapsulate Kofax interface protocol, TWAIN interface protocol, Folder interface protocol, interface protocol based on DirectShow technology, ISIS interface protocol and API interface protocol in the interface protocol encapsulation module; provide the application program with the interface protocol information encapsulated by the interface protocol encapsulation module Call functions corresponding to each interface protocol;

加载影像采集硬件设备,并进行虚拟硬件封装层的检测;所述虚拟硬件封装层的检测是检测处于连接状态的扫描仪BANTEC S-185对应的虚拟封装层SV_BANTEC是否已经存在并正确配置,配置文件信息存储目录中寻找,根据寻找的情况分两步进行:Load the image acquisition hardware device, and carry out the detection of the virtual hardware encapsulation layer; the detection of the virtual hardware encapsulation layer is to detect whether the virtual encapsulation layer SV_BANTEC corresponding to the scanner BANTEC S-185 in the connected state already exists and is correctly configured, and the configuration file Search in the information storage directory, and proceed in two steps according to the situation of the search:

第一种情况:扫描仪BANTEC S-185对应的虚拟封装层SV_BANTEC不存在,需按下述步骤进行:The first case: the virtual encapsulation layer SV_BANTEC corresponding to the scanner BANTEC S-185 does not exist, and the following steps are required:

1.调用新建封装层程序,传入封装层名SV_BANTEC,创建对应的虚拟硬件封装层SV_BANTEC,并将加载到的扫描仪BANTEC S-185的属性传入虚拟硬件封装层中;1. Call the new encapsulation layer program, pass in the encapsulation layer name SV_BANTEC, create the corresponding virtual hardware encapsulation layer SV_BANTEC, and transfer the attributes of the loaded scanner BANTEC S-185 into the virtual hardware encapsulation layer;

2.使用者通过硬件设备属性界面,配置扫描仪BANTEC S-185的属性,可以设置扫描参数为默认扫描参数,也可设置BANTEC S-185专用扫描属性;获取扫描仪的接口协议配置信息为API接口协议,选择封装层SV_BANTEC,配置封装层的非标准协议接口为API接口协议,并向封装层SV_BANTEC传入API接口的调用函数;配置虚拟硬件封装层还包括对封装层加载接口LoadWrapper()、封装层卸载接口UnloadWrapper()、封装层查询接口QueryWrapper()、封装层别名管理接口NewWrapperAlias()、封装层调整接口ConfigAttribute()和封装层状态接口CheckDeviceConnect()的配置;2. The user configures the properties of the scanner BANTEC S-185 through the hardware device property interface, and can set the scanning parameters as the default scanning parameters, or set the special scanning properties of BANTEC S-185; obtain the interface protocol configuration information of the scanner as API Interface protocol, select encapsulation layer SV_BANTEC, configure the non-standard protocol interface of the encapsulation layer as the API interface protocol, and transfer the calling function of the API interface to the encapsulation layer SV_BANTEC; configure the virtual hardware encapsulation layer also includes loading the encapsulation layer interface LoadWrapper(), Configuration of the encapsulation layer unloading interface UnloadWrapper(), encapsulation layer query interface QueryWrapper(), encapsulation layer alias management interface NewWrapperAlias(), encapsulation layer adjustment interface ConfigAttribute() and encapsulation layer status interface CheckDeviceConnect();

3.应用程序调用扫描接口函数和接口协议封装模块中的API接口调用函数,驱动扫描仪BANTEC S-185,并进行扫描动作。3. The application program calls the scanning interface function and the API interface calling function in the interface protocol encapsulation module, drives the scanner BANTEC S-185, and performs scanning actions.

第二种情况:扫描仪BANTEC S-185对应的虚拟封装层SV_BANTEC已经存在并正确配置,需按下述步骤进行:The second case: the virtual encapsulation layer SV_BANTEC corresponding to the scanner BANTEC S-185 already exists and is correctly configured, and the following steps are required:

1.应用程序调用封装层加载接口LoadWrapper(),加载虚拟硬件封装层,传入封装层名SV_BANTEC,虚拟封装层自动读取BANTEC S-185的配置信息,通过API接口协议加载硬件设备,并设置扫描参数;1. The application calls the encapsulation layer loading interface LoadWrapper(), loads the virtual hardware encapsulation layer, and passes in the encapsulation layer name SV_BANTEC. The virtual encapsulation layer automatically reads the configuration information of BANTEC S-185, loads the hardware device through the API interface protocol, and sets scan parameters;

2.应用程序调用扫描接口函数和接口协议封装模块中的API接口调用函数,驱动扫描仪BANTEC S-185,并进行扫描动作。2. The application program calls the scanning interface function and the API interface calling function in the interface protocol encapsulation module, drives the scanner BANTEC S-185, and performs scanning actions.

通过上述步骤,完成扫描仪BANTEC S-185对应的虚拟硬件封装层SV_BANTEC的建立,通过虚拟硬件封装层驱动扫描仪BANTEC S-185进行扫描动作;对于一些不支持标准协议接口但设有API接口的影像采集硬件设备,同样可以使用上述方式进行驱动。Through the above steps, the establishment of the virtual hardware encapsulation layer SV_BANTEC corresponding to the scanner BANTEC S-185 is completed, and the scanner BANTEC S-185 is driven to scan through the virtual hardware encapsulation layer; for some devices that do not support standard protocol interfaces but have API interfaces The image acquisition hardware device can also be driven in the above manner.

Claims (5)

1.一种基于虚拟硬件设备的影像采集方法,其特征在于,包括以下步骤:1. an image collection method based on virtual hardware equipment, is characterized in that, comprises the following steps: (1)创建接口协议封装模块,并向应用程序提供与接口协议对应的调用函数;(1) Create an interface protocol encapsulation module, and provide the calling function corresponding to the interface protocol to the application program; (2)加载影像采集硬件设备,根据加载到的影像采集硬件设备属性创建对应的虚拟硬件封装层;(2) Load the image acquisition hardware device, and create a corresponding virtual hardware encapsulation layer according to the attributes of the loaded image acquisition hardware device; (3)配置影像采集硬件设备属性,并获取影像采集硬件设备的接口协议配置信息,根据接口协议配置信息配置虚拟硬件封装层的接口协议,并向虚拟硬件封装层传入硬件设备接口协议对应的调用函数;(3) Configure the properties of the image acquisition hardware device, and obtain the interface protocol configuration information of the image acquisition hardware device, configure the interface protocol of the virtual hardware encapsulation layer according to the interface protocol configuration information, and pass the interface protocol corresponding to the hardware device interface protocol to the virtual hardware encapsulation layer Call functions; (4)应用程序通过调用函数调用接口协议封装模块中的接口协议驱动影像采集硬件设备,并进行扫描动作。(4) The application program calls the interface protocol in the interface protocol encapsulation module to drive the image acquisition hardware device by calling the function, and performs the scanning action. 2.根据权利要求1所述的基于虚拟硬件设备的影像采集方法,其特征在于,所述步骤(1)中的创建接口协议封装模块是将Kofax接口协议、TWAIN接口协议、Folder接口协议、基于DirectShow技术的接口协议、ISIS接口协议和API接口协议封装在接口协议封装模块中;所述接口协议由应用程序中与接口协议对应的调用函数调用。2. the image collection method based on virtual hardware device according to claim 1, it is characterized in that, the creation interface agreement encapsulation module in the described step (1) is Kofax interface agreement, TWAIN interface agreement, Folder interface agreement, based on The interface protocol of DirectShow technology, the ISIS interface protocol and the API interface protocol are encapsulated in the interface protocol encapsulation module; the interface protocol is invoked by the calling function corresponding to the interface protocol in the application program. 3.根据权利要求1所述的基于虚拟硬件设备的影像采集方法,其特征在于,所述步骤(2)还包括虚拟硬件封装层的检测,虚拟硬件封装层的检测在加载影像采集硬件设备之后执行,所述虚拟硬件封装层的检测是检测处于连接状态影像采集硬件设备对应的虚拟封装层是否已经存在并正确配置,若配置完成,则加载影像采集硬件对应的虚拟硬件封装层,并跳转至步骤(4);若不存在则进行创建虚拟硬件封装层和后续的步骤(3)和步骤(4)。3. the image acquisition method based on virtual hardware device according to claim 1, is characterized in that, described step (2) also comprises the detection of virtual hardware encapsulation layer, and the detection of virtual hardware encapsulation layer is after loading image acquisition hardware device Execution, the detection of the virtual hardware encapsulation layer is to detect whether the virtual encapsulation layer corresponding to the image acquisition hardware device in the connected state already exists and is configured correctly. If the configuration is completed, load the virtual hardware encapsulation layer corresponding to the image acquisition hardware and jump to Go to step (4); if it does not exist, create a virtual hardware encapsulation layer and the subsequent steps (3) and (4). 4.根据权利要求1所述的基于虚拟硬件设备的影像采集方法,其特征在于,所述步骤(3)中的配置虚拟硬件封装层还包括配置封装层加载接口、封装层卸载接口、封装层查询接口、封装层别名管理接口、封装层调整接口和封装层状态接口。4. The image acquisition method based on virtual hardware device according to claim 1, characterized in that, configuring the virtual hardware encapsulation layer in the step (3) also includes configuring encapsulation layer loading interface, encapsulation layer unloading interface, encapsulation layer Query interface, encapsulation layer alias management interface, encapsulation layer adjustment interface and encapsulation layer status interface. 5.根据权利要求1所述的基于虚拟硬件设备的影像采集方法,其特征在于,所述步骤(2)中创建影像采集硬件设备对应的虚拟硬件封装层是将加载到的影像采集硬件设备的属性传入虚拟硬件封装层中。5. The image acquisition method based on a virtual hardware device according to claim 1, wherein the virtual hardware encapsulation layer corresponding to the image acquisition hardware device created in the step (2) is to be loaded into the image acquisition hardware device Attributes are passed into the virtual hardware encapsulation layer.
CN201110194674.6A 2011-07-12 2011-07-12 Image acquisition method based on virtual hardware equipment Active CN102289416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110194674.6A CN102289416B (en) 2011-07-12 2011-07-12 Image acquisition method based on virtual hardware equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110194674.6A CN102289416B (en) 2011-07-12 2011-07-12 Image acquisition method based on virtual hardware equipment

Publications (2)

Publication Number Publication Date
CN102289416A true CN102289416A (en) 2011-12-21
CN102289416B CN102289416B (en) 2015-03-04

Family

ID=45335857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110194674.6A Active CN102289416B (en) 2011-07-12 2011-07-12 Image acquisition method based on virtual hardware equipment

Country Status (1)

Country Link
CN (1) CN102289416B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108662981A (en) * 2018-06-14 2018-10-16 苏州富莱智能科技有限公司 Customize micrometering system and measurement method
CN108830914A (en) * 2018-06-12 2018-11-16 苏州富莱智能科技有限公司 Multi-platform micrometering system based on straight line measurement
CN109029247A (en) * 2018-06-12 2018-12-18 苏州富莱智能科技有限公司 Efficient multi-platform microscopic measuring method
CN109460244A (en) * 2018-10-26 2019-03-12 苏州浪潮智能软件有限公司 A kind of software approach shielding hardware differences
CN110995486A (en) * 2019-11-28 2020-04-10 广州助蜂网络科技有限公司 Intelligent hardware equipment monitoring system based on Internet of things
CN112394714A (en) * 2020-12-09 2021-02-23 中国船舶工业系统工程研究院 Unmanned ship software system based on equipment virtualization

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6275869B1 (en) * 1994-11-22 2001-08-14 Eastman Kodak Company System for network communication of image information between imaging devices according to multiple protocols
CN1417680A (en) * 2002-12-30 2003-05-14 北京北大方正电子有限公司 Function expanding method for hung image capture equipment
CN1737779A (en) * 2005-09-08 2006-02-22 中国工商银行 Method and system for expanding peripherals
US20060133878A1 (en) * 2000-03-17 2006-06-22 Microsoft Corporation Simplified Device Drivers For Hardware Devices of a Computer System
CN101944033A (en) * 2009-07-09 2011-01-12 中兴通讯股份有限公司 Device and method for dynamically supporting multiple protocols in embedded system
CN102111597A (en) * 2009-12-24 2011-06-29 上海威乾视频技术有限公司 Common packaging system compatible with digital video record (DVR) hardware

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6275869B1 (en) * 1994-11-22 2001-08-14 Eastman Kodak Company System for network communication of image information between imaging devices according to multiple protocols
US20060133878A1 (en) * 2000-03-17 2006-06-22 Microsoft Corporation Simplified Device Drivers For Hardware Devices of a Computer System
US20060147234A1 (en) * 2000-03-17 2006-07-06 Microsoft Corporation Simplified Device Drivers for Hardware Devices of a Computer System
CN1417680A (en) * 2002-12-30 2003-05-14 北京北大方正电子有限公司 Function expanding method for hung image capture equipment
CN1737779A (en) * 2005-09-08 2006-02-22 中国工商银行 Method and system for expanding peripherals
CN101944033A (en) * 2009-07-09 2011-01-12 中兴通讯股份有限公司 Device and method for dynamically supporting multiple protocols in embedded system
CN102111597A (en) * 2009-12-24 2011-06-29 上海威乾视频技术有限公司 Common packaging system compatible with digital video record (DVR) hardware

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108830914A (en) * 2018-06-12 2018-11-16 苏州富莱智能科技有限公司 Multi-platform micrometering system based on straight line measurement
CN109029247A (en) * 2018-06-12 2018-12-18 苏州富莱智能科技有限公司 Efficient multi-platform microscopic measuring method
CN108662981A (en) * 2018-06-14 2018-10-16 苏州富莱智能科技有限公司 Customize micrometering system and measurement method
CN109460244A (en) * 2018-10-26 2019-03-12 苏州浪潮智能软件有限公司 A kind of software approach shielding hardware differences
CN110995486A (en) * 2019-11-28 2020-04-10 广州助蜂网络科技有限公司 Intelligent hardware equipment monitoring system based on Internet of things
CN112394714A (en) * 2020-12-09 2021-02-23 中国船舶工业系统工程研究院 Unmanned ship software system based on equipment virtualization

Also Published As

Publication number Publication date
CN102289416B (en) 2015-03-04

Similar Documents

Publication Publication Date Title
CN102289416B (en) Image acquisition method based on virtual hardware equipment
WO2021139768A1 (en) Interaction method for cross-device task processing, and electronic device and storage medium
US8704914B2 (en) Apparatus to automatically tag image and method thereof
CN106104476B (en) Image forming apparatus and image forming method
US11921995B2 (en) Data sharing method, graphical user interface, related device, and system
CN103327182A (en) Method for rapidly sending pictures and mobile terminal thereof
WO2023130921A1 (en) Method for page layout adapted to multiple devices, and electronic device
CN102404633A (en) Monitoring module, smart television system and television
WO2019071618A1 (en) Image processing method and device
CN106919391A (en) Towards the embedded system of the customizable operating system component of smart mobile phone
WO2021254167A1 (en) Application development platform, application development method, and electronic device
CN116074623B (en) A camera resolution selection method and device
EP4517517A1 (en) Component preview method and electronic device
EP4336339A1 (en) Data transmission method and apparatus, and conference system, wireless screen transmitter and storage medium
CN1828665B (en) Method and system for information processing in a communication apparatus
EP4206898A1 (en) Mirroring method, apparatus and system
US8588851B2 (en) Android mobile telephone comprising a content supply chain
US20050062850A1 (en) Av device having an optimization program and method for optimizing av signals
CN111736887A (en) Access system, method, device and storage medium of waste equipment
CN116991302B (en) Applications and gesture navigation bars are compatible with operating methods, graphical interfaces and related devices
CN117061266B (en) Control method and control device for smart home equipment
CN118227026B (en) Application and gesture navigation bar compatible operation method, graphical interface and related devices
CN114501389B (en) Mobile terminal, network sharing method and storage medium
CN111353320B (en) A kind of scanning code identification method and device
WO2025020687A1 (en) Shooting method and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Xinyada technology building, 3888 Jiangnan Avenue, Binjiang District, Hangzhou City, Zhejiang Province 310051

Patentee after: Sinyada Technology Co.,Ltd.

Address before: Sunyard Technology Building No. 3888 Hangzhou City, Zhejiang province Binjiang District Jiangnan Road 310053

Patentee before: SUNYARD SYSTEM ENGINEERING Co.,Ltd.