CN102289416B - Image collection method based on virtual hardware equipment - Google Patents

Image collection method based on virtual hardware equipment Download PDF

Info

Publication number
CN102289416B
CN102289416B CN201110194674.6A CN201110194674A CN102289416B CN 102289416 B CN102289416 B CN 102289416B CN 201110194674 A CN201110194674 A CN 201110194674A CN 102289416 B CN102289416 B CN 102289416B
Authority
CN
China
Prior art keywords
interface protocol
interface
encapsulated layer
image collection
hardware
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.)
Active
Application number
CN201110194674.6A
Other languages
Chinese (zh)
Other versions
CN102289416A (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

Abstract

The invention relates to an image collection method based on virtual hardware equipment, which comprises the following steps of: creating an interface protocol encapsulating module; loading image collection hardware equipment; configuring the attributes of the image collection hardware equipment; using program for driving the image collection hardware equipment through invoking the interface protocol in the interface protocol encapsulating module through invoking functions; and carrying out scanning actions. The method of the invention has the advantages that the hardware interface differences of the bottom layer are shielded in the image collection process, a unified processing mode and interfaces are provided for users, various kinds of collection equipment in different types, different brands and different models are managed in a unified way, the dynamic switching between various kinds of collection equipment is realized in the application, in addition, the virtual hardware encapsulating layer memory function is realized, and the independence between the collection hardware equipment and the software is really realized.

Description

Based on the image collecting method of virtual hardware equipment
Technical field
The present invention relates to image communication technology field, particularly relate to a kind of image collecting method based on virtual hardware equipment.
Background technology
Image collection is under the control of image business application system, is obtained the image acquisition process of image data by image recording device.Conventional image modalities generally comprises scanner, camera and digital camera, and this type of image modalities generally has different types, model and brand, and the interface mode used is different.Image collection standard interface technology general in the world mainly comprises TWAIN interfacing, KOFAX interfacing, ISIS interfacing and DirectShow technology.TWAIN interfacing is for extracting image from still image equipment, and scanner and the digital camera of the overwhelming majority both provide TWAIN driver, and utilize unified TWAIN interface, application program can obtain image easily from these equipment; KOFAX interfacing is the driving based on ISIS standard, except basic Image Acquisition, display etc., also provides image de-black limit, removes shade, bar-code identification, the image processing function such as complement code identification; ISIS interfacing is image and scanner interface standard, the graphic software standard developed by Pixel company, and belonging to Input Software category, is a software module system.Wherein every part performs a concrete image processing function, and ISIS module also can scanner and printer, the conversion of assist process image, compression and image file format, and read and write data file; DirectShow technology is that a kind of software developer that can allow developed by Microsoft performs the application programming interface of various different disposal to media file, object model framework is formed based on Microsoft Windows, DirectShow is the general interface that most Microsoft programming language provides media, and be one extendible, to play under the order of user or developer or recording medium file, framework based on Filter, adopts DirectShow technology can control the output of video equipment.
Image modalities is in scanning record process, and due to the definition of its different interface, make image modalities there is very large difference in control mode and driver, general image modalities supports one or more in above-mentioned interface standard technology.User is when using above-mentioned image modalities, the driver meeting image modalities interface standard must be equipped with normally to work, general device driver configures specifically for image modalities, they have in connection and data communication, and speed is fast, data transmit advantage accurately, but this driver can only drive the image modalities of this type, when the image modalities using multiple stage different on type, model, brand and interface mode, just must configure corresponding multiple driver, bring the trouble in use to user.
Summary of the invention
Technical matters to be solved by this invention is the problems referred to above for existing in existing image collection process, provides that a kind of compatibility is dissimilar, the image collecting method based on virtual hardware equipment of different brands, different model, distinct interface mode.
For solving the problem, technical scheme of the present invention is:
Based on an image collecting method for virtual hardware equipment, comprise the following steps:
(1) create interface protocol package module, and provide the call function corresponding with interface protocol to application program;
(2) load image collection hardware device, create corresponding virtual hardware encapsulated layer according to the image collection hardware device attribute be loaded into;
(3) image collection hardware device attribute is configured, and obtain the interface protocol configuration information of image collection hardware device, according to the interface protocol of interface protocol configuration information configuration virtual hardware enclosure layer, and import call function corresponding to hardware device interface protocol into virtual hardware encapsulated layer;
(4) application program drives image collection hardware device by the interface protocol in call function calling interface protocol encapsulation module, and carries out scanning action.
Preferably, the establishment interface protocol package module in described step (1) be by Kofax interface protocol, TWAI N interface protocol, Folder interface protocol, interface protocol, ISIS interface protocol and api interface protocol encapsulation based on DirectShow technology in interface protocol package module; Described interface protocol is called by call function corresponding with interface protocol in application program.
Preferably, described step (2) also comprises the detection of virtual hardware encapsulated layer, the detection of virtual hardware encapsulated layer performs after loading image collection hardware device, whether the detection of described virtual hardware encapsulated layer detects to be in virtual enclosures layer corresponding to connection status image collection hardware device and to have existed and correctly configured, if configured, then load virtual hardware encapsulated layer corresponding to image collection hardware, and jump to step (4); If do not exist, carry out creating virtual hardware encapsulated layer and follow-up step (3) and step (4).
Preferably, the configuration virtual hardware enclosure layer in described step (3) also comprises configuration packages layer loading interface, encapsulated layer unloading interface, encapsulated layer query interface, encapsulated layer another name management interface, encapsulated layer adjustment interface and encapsulated layer state interface.
Preferably, the virtual hardware encapsulated layer creating image collection hardware device corresponding in described step (2) is imported in virtual hardware encapsulated layer by the attribute of the image collection hardware device be loaded into.
Image collecting method based on virtual hardware equipment of the present invention, achieve integrated various document and image data digital collection, create the virtual hardware encapsulated layer corresponding with hardware device, provide multiple conventional interface protocol standard, contain the support to ISIS, TWAIN, KOFAX interface protocol, to go on market almost any a scanner, both supported high speed scanner, and also supported common flatbed scanner; Contain the support to DirectShow, can be suitable for and any a video heads equipment on market; Meanwhile, the method supports the access of api interface, is convenient to the communication of some nonstandard protocol interfaces.The present invention shields the hardware interface difference of bottom in image collection process, for user provides unified processing mode and interface, the collecting device of unified management various dissimilar, different brands, different model, realize the switching at runtime between various collecting device in the application, and realize virtual hardware encapsulated layer memory function, really accomplish that the hardware device of collection and software have nothing to do; Moreover user can according to the business demand of oneself, and the template that configuration is applicable to and Scan Architecture, carry out image collection work.
Accompanying drawing explanation
Fig. 1 is the image collection process flow diagram of the image collecting method that the present invention is based on virtual hardware equipment.
Embodiment
Further describe the present invention below in conjunction with drawings and Examples, but protection scope of the present invention is not limited to this.
Image collecting method based on virtual hardware equipment of the present invention, the hardware interface difference of bottom is shielded in image collection process, provide unified processing mode and interface, the collecting device of unified management various dissimilar, different brands, different model, realize virtual hardware encapsulated layer memory function in the application, illustrate below by specific embodiment.
Embodiment 1: image collection hardware device of the present invention is the scanner that name is called KODAK i4600, support TWAIN interface protocol, the name of the virtual enclosures layer corresponding with hardware device is called SV_KODAK4600.
With reference to Fig. 1, the image collecting method based on virtual hardware equipment of the present invention, comprises the following steps:
By Kofax interface protocol, TWAIN interface protocol, Folder interface protocol, interface protocol, ISIS interface protocol and api interface protocol encapsulation based on DirectShow technology in interface protocol package module; According to the interface protocol information of interface protocol package module encapsulation, provide the call function corresponding with each interface protocol to application program;
Load image collection hardware device, and carry out the detection of virtual hardware encapsulated layer; The detection of described virtual hardware encapsulated layer is whether the virtual enclosures layer SV_KODAK4600 detecting the scanner KODAK i4600 that is in connection status corresponding has existed and correctly configured, find in profile information storage directory, the situation according to finding is carried out in two steps:
The first situation: the virtual enclosures layer SV_KODAK4600 that scanner KODAK i4600 is corresponding does not exist, and need carry out in the steps below:
1. call newly-built encapsulated layer program, import encapsulated layer name SV_KODAK4600 into, create corresponding virtual hardware encapsulated layer SV_KODAK4600, and the attribute of the scanner KODAK i4600 be loaded into is imported in virtual hardware encapsulated layer;
2. user is by hardware device properties interface, the attribute of configuration scanner KODAK i4600, and can arrange sweep parameter is default scan parameter, also can arrange KODAK i4600 dedicated scan attribute; The interface protocol configuration information obtaining scanner is TWAIN interface protocol, and select encapsulated layer SV_KODAK4600, the standard protocol interface of configuration packages layer is TWAIN interface protocol, and imports the call function of TWAIN interface into encapsulated layer SV_KODAK4600; Configuration virtual hardware enclosure layer also comprises the configuration to encapsulated layer loading interface LoadWrapper (), encapsulated layer unloading interface UnloadWrapper (), encapsulated layer query interface QueryWrapper (), encapsulated layer another name management interface NewWrapperAlias (), encapsulated layer adjustment interface ConfigAttribute () and encapsulated layer state interface CheckDeviceConnect ();
3. the TWAIN interface interchange function in application call scan interface function and interface protocol package module, drives scanner KODAK i4600, and carries out scanning action.
The second situation: the virtual enclosures layer SV_KODAK4600 that scanner KODAK i4600 is corresponding has existed and correctly configured, and need carry out in the steps below:
1. application call encapsulated layer loading interface LoadWrapper (), load virtual hardware encapsulated layer, import encapsulated layer name SV_KODAK4600 into, virtual enclosures layer reads the configuration information of KODAK i4600 automatically, by TWAIN agreement loaded with hardware equipment, and sweep parameter is set;
2. the TWAIN interface interchange function in application call scan interface function and interface protocol package module, drives scanner KODAK i4600, and carries out scanning action.
By above-mentioned steps, complete the foundation of virtual hardware encapsulated layer SV_KODAK4600 corresponding to scanner KODAKi4600, drive scanner KODAK i4600 to carry out scanning motion by virtual hardware encapsulated layer; User is just without the need to worrying software-driven and the problem incompatible on transport communication of image collection hardware device.
Embodiment 2: image collection hardware device of the present invention is the scanner that name is called BANTEC S-185, does not support TWAI N interface protocol, belongs to nonstandard protocol interface, the name of the virtual enclosures layer corresponding with hardware device is called SV_BANTEC.BANTEC series scanner can be scanned by ISIS interface protocol, in order to non-standard ways is described, adopts direct invocation facility api interface to drive the interface encapsulation provided in the present embodiment.The process driving scanner BANTEC S-185 equipment to carry out gathering by virtual enclosures layer, with similar by TWAIN protocol mode, is the interface difference that virtual enclosures layer provides.
With reference to Fig. 1, the image collecting method based on virtual hardware equipment of the present invention, comprises the following steps:
By Kofax interface protocol, TWAIN interface protocol, Folder interface protocol, interface protocol, ISIS interface protocol and api interface protocol encapsulation based on DirectShow technology in interface protocol package module; According to the interface protocol information of interface protocol package module encapsulation, provide the call function corresponding with each interface protocol to application program;
Load image collection hardware device, and carry out the detection of virtual hardware encapsulated layer; The detection of described virtual hardware encapsulated layer is whether the virtual enclosures layer SV_BANTEC detecting the scanner BANTEC S-185 that is in connection status corresponding has existed and correctly configured, find in profile information storage directory, the situation according to finding is carried out in two steps:
The first situation: the virtual enclosures layer SV_BANTEC that scanner BANTEC S-185 is corresponding does not exist, and need carry out in the steps below:
1. call newly-built encapsulated layer program, import encapsulated layer name SV_BANTEC into, create corresponding virtual hardware encapsulated layer SV_BANTEC, and the attribute of the scanner BANTEC S-185 be loaded into is imported in virtual hardware encapsulated layer;
2. user is by hardware device properties interface, the attribute of configuration scanner BANTEC S-185, and can arrange sweep parameter is default scan parameter, also can arrange BANTEC S-185 dedicated scan attribute; The interface protocol configuration information obtaining scanner is api interface agreement, and select encapsulated layer SV_BANTEC, the nonstandard protocol interface of configuration packages layer is api interface agreement, and imports the call function of api interface into encapsulated layer SV_BANTEC; Configuration virtual hardware enclosure layer also comprises the configuration to encapsulated layer loading interface LoadWrapper (), encapsulated layer unloading interface UnloadWrapper (), encapsulated layer query interface QueryWrapper (), encapsulated layer another name management interface NewWrapperAlias (), encapsulated layer adjustment interface ConfigAttribute () and encapsulated layer state interface CheckDeviceConnect ();
3. the api interface call function in application call scan interface function and interface protocol package module, drives scanner BANTEC S-185, and carries out scanning action.
The second situation: the virtual enclosures layer SV_BANTEC that scanner BANTEC S-185 is corresponding has existed and correctly configured, and need carry out in the steps below:
1. application call encapsulated layer loading interface LoadWrapper (), load virtual hardware encapsulated layer, import encapsulated layer name SV_BANTEC into, virtual enclosures layer reads the configuration information of BANTEC S-185 automatically, by api interface agreement loaded with hardware equipment, and sweep parameter is set;
2. the api interface call function in application call scan interface function and interface protocol package module, drives scanner BANTEC S-185, and carries out scanning action.
By above-mentioned steps, complete the foundation of virtual hardware encapsulated layer SV_BANTEC corresponding to scanner BANTEC S-185, drive scanner BANTEC S-185 to carry out scanning motion by virtual hardware encapsulated layer; Standard protocol interface is not supported for some but is provided with the image collection hardware device of api interface, aforesaid way can be used equally to drive.

Claims (3)

1. based on an image collecting method for virtual hardware equipment, it is characterized in that, comprise the following steps:
(1) create interface protocol package module, and provide the call function corresponding with interface protocol to application program; Create interface protocol package module be by Kofax interface protocol, TWAIN interface protocol, Folder interface protocol, interface protocol, ISIS interface protocol and api interface protocol encapsulation based on DirectShow technology in interface protocol package module; Described interface protocol is called by call function corresponding with interface protocol in application program;
(2) load image collection hardware device, create corresponding virtual hardware encapsulated layer according to the image collection hardware device attribute be loaded into; The detection of virtual hardware encapsulated layer, the detection of virtual hardware encapsulated layer performs after loading image collection hardware device, whether the detection of described virtual hardware encapsulated layer detects to be in virtual enclosures layer corresponding to connection status image collection hardware device and to have existed and correctly configured, if configured, then load virtual hardware encapsulated layer corresponding to image collection hardware, and jump to step (4); If do not exist, carry out creating virtual hardware encapsulated layer and follow-up step (3) and step (4);
(3) image collection hardware device attribute is configured, and obtain the interface protocol configuration information of image collection hardware device, according to the interface protocol of interface protocol configuration information configuration virtual hardware enclosure layer, and import call function corresponding to hardware device interface protocol into virtual hardware encapsulated layer;
(4) application program drives image collection hardware device by the interface protocol in call function calling interface protocol encapsulation module, and carries out scanning action.
2. the image collecting method based on virtual hardware equipment according to claim 1, it is characterized in that, the configuration virtual hardware enclosure layer in described step (3) also comprises configuration packages layer loading interface, encapsulated layer unloading interface, encapsulated layer query interface, encapsulated layer another name management interface, encapsulated layer adjustment interface and encapsulated layer state interface.
3. the image collecting method based on virtual hardware equipment according to claim 1, it is characterized in that, the virtual hardware encapsulated layer creating image collection hardware device corresponding in described step (2) is imported in virtual hardware encapsulated layer by the attribute of the image collection hardware device be loaded into.
CN201110194674.6A 2011-07-12 2011-07-12 Image collection 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 collection 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 collection method based on virtual hardware equipment

Publications (2)

Publication Number Publication Date
CN102289416A CN102289416A (en) 2011-12-21
CN102289416B true 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 collection method based on virtual hardware equipment

Country Status (1)

Country Link
CN (1) CN102289416B (en)

Families Citing this family (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
CN110995486B (en) * 2019-11-28 2020-10-23 广州助蜂网络科技有限公司 Intelligent hardware equipment monitoring system based on Internet of things
CN112394714B (en) * 2020-12-09 2022-04-22 中国船舶工业系统工程研究院 Unmanned ship software system based on equipment virtualization

Citations (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7047534B2 (en) * 2000-03-17 2006-05-16 Microsoft Corporation Simplified device drivers for hardware devices of a computer system

Patent Citations (5)

* 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
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

Also Published As

Publication number Publication date
CN102289416A (en) 2011-12-21

Similar Documents

Publication Publication Date Title
CN102289416B (en) Image collection method based on virtual hardware equipment
US20220418014A1 (en) Application function implementation method and electronic device
US20140006921A1 (en) Annotating digital documents using temporal and positional modes
CN110597512A (en) Method for displaying user interface and electronic equipment
CN104798376A (en) Camera command set host command translation
CN104484181B (en) The method, apparatus of Android camera and mobile equipment are controlled under glibc environment
CN102123191A (en) Mobile phone automatic testing method
CN101135966A (en) Graphical interfaces development method and system based on command lines
WO2023130921A1 (en) Method for page layout adapted to multiple devices, and electronic device
CN102404633A (en) Monitoring module, intelligent television system and television
CN111314445A (en) Method and device for controlling recycling machine to open door by mobile phone
WO2023246486A1 (en) Method and apparatus for creating connector
CN105892849A (en) Image Processing Method And Electronic Device For Supporting The Same
CN103902635A (en) Method, browser, multimedia equipment and mobile terminal for obtaining real-time data
CN102833386A (en) Method and system for storing operating record and mobile terminal
CN103136264A (en) Accessory inquiring method and user terminal
CN104182220A (en) Image acquisition method based on domestic CPU and domestic OS
CN107451277A (en) Image file processing method and device
CN116074623B (en) Resolution selecting method and device for camera
US20200334785A1 (en) Methods and devices of picture processing and user interface display
CN112235628B (en) Multi-window opening method, device, equipment and medium for television operating system
CN102438021B (en) Processing method and device for telecommunications service development
CN104902132A (en) Standardized packaging system for microscopic image
CN111736887A (en) Access system, method, device and storage medium of waste equipment
CN204795253U (en) Standardized encapsulation system of microscopy images

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.