Summary of the invention
Therefore, to the problems referred to above, the purpose of this invention is to provide and a kind ofly can edit image reference mark interactive editor's method and system of checking simultaneously the image reference mark with data.Input equipment be not only input information with move, the convergent-divergent image, also can accept to make self response after the instruction that application software sends.
For realizing above-mentioned purpose, the present invention takes following technical scheme: a kind of image reference mark interactive editor's method, it is characterized in that, and mainly comprise following operation steps:
(1) hardware connects: computing machine is connected with display device, mouse, keyboard, general force feedback handle; Wherein, The handle drives program is housed in the said computing machine; And the application software system that is made up of central processing module, data processing module, information command module, graphical interfaces module under the operating system support is housed, in system, comprise at least and browse and edit two kinds of operational modes; Including in the said handle can be by the register of computing machine modification, and said register is through level control motor rotary speed realizable force feedback; The appearance of said handle has two rocking bars and 14 buttons at least, and the function of rocking bar and keypress function are self-defined in advance by the user;
(2) open computing machine, the operating software system detects the connection status of handle by the information command module of system, if the handle good connection, then opens the data communication interface with handle, and constantly safeguards this interface; Then send the program halt instruction to central processing module if handle connects unusually, the prompting user correctly connects handle, and is good up to connecting;
(3) user is provided with initial displaying ratio and display location information;
(4) central processing module receives the instruction that the user opens image data or reference mark data, sends it to data processing module, is written into data by data processing module; When comprising existing reference mark in the data, data processing module carries out parameter calculation according to the geometric model relation that the user selectes, and calculates the residual error of each reference mark under selected funtcional relationship;
(5) the central processing module instruction that will add displaying ratio and display location information is sent to the graphical interfaces module; The graphical interfaces module from data processing module, obtain video data block and should the zone in the reference mark that comprises, the control display device displays it; The graphical interfaces module is obtained the reference mark data from data processing module simultaneously, and it is shown in data list;
(6) after handle got into duty, the information command module detected the connection status of handle in real time, real-time update button and the residing state of rocking bar in the handle register, and this state is obtained through hardware interface by computing machine at any time; When information was unusual, register was through level control motor rotary speed realizable force feedback;
(7) after data are written into, the information command module begins to detect with certain frequency the mode of operation of handle button and rocking bar, and it is deposited in the module; With reference to predefined keypress function allocation table; Through the handle state between the comparison time sheet, judge whether specific button has accomplished double-click or single-click operation on the handle, perhaps whether is in the state that continues to press; And be corresponding function command with this information translation, send to central processing module;
(8) central processing module, is responded by data processing module if data modification information then passes to data processing module with it accepting instruction back decision instruction content; If instruction comprises the graphic presentation modification information, then upgrade the inner view information of central processing module, and it is passed to the graphical interfaces module; If when instruction was judged as operation exception, processing module was not then transmitted this instruction, and, produce vibrations with the prompting user by information command module controls handle according to the force feedback instruction that the classification of predefined operation exception is sent respective intensities to the information command module;
(9) when central processing module receives current reference mark switching command, then current display position is adjusted to the place, current reference mark after the renewal, notice graphical interfaces module update displayed; From data processing module, obtain this reference mark residual information simultaneously; If judging the reference mark residual error transfinites; Then the information command module is sent respective strengths force feedback instruction, produce vibrations with the prompting user by information command module controls handle according to the degree that transfinites of residual error;
Execute instruction when (10) data processing module is received the reference mark edit instruction, and upgrade the reference mark data presentation through central processing module notice graphical interfaces module;
(11) when editing is accomplished, send the data out code by the user, central processing module then initiates a message to data processing module, is saved in the peripheral storage device by the reference mark data of data processing module with calculator memory; Send instruction to the graphical interfaces module simultaneously, make it empty image and show and the reference mark tabulation, and the entering suspended state stops to refresh demonstration.
Said browse mode is meant to browse checks image data, and can carry out the interpolation and the deletion at reference mark; Said edit pattern is meant carries out edit-modify to the image reference mark.
Acting on of left and right two rocking bars all is set to moving of left and right image on the said handle under browse mode and the edit pattern.
Said universal mouse and keyboard also is connected with computing machine through hardware interface, when handle breaks down, by mouse-keyboard replacement work.
A kind of interactive editing system of realizing said image reference mark interactive editor's method; It comprises universal PC computing machine, display device, mouse, keyboard; It is characterized in that: also comprise the force feedback handle, the software processing module under the computer operating system support that are connected with computing machine, said software processing module comprises central processing module, data processing module, information command module, graphical interfaces module; Said central processing module links to each other with data processing module and carries out data command and pass mutually, links to each other with the information command module to carry out the input information instruction and pass mutually, links to each other with the graphical interfaces module and carries out the transmission of view data idsplay order; Said information command module links to each other with handle with computer operating system, obtains the support of computer operating system, and handle interface information is transformed; Said graphical interfaces module links to each other with display device, carries out image output; Said force feedback handle links to each other with said information command module through hardware interface, and including in the handle can be by the register of computing machine modification, and said register is through level control motor rotary speed realizable force feedback; The appearance of said handle has two rocking bars and 14 buttons at least, and the function of rocking bar and keypress function are self-defined in advance by the user.
Said force feedback handle is connected through 1394 interfaces, USB interface, com interface, printer interface or blue tooth interface with computing machine.
Two rocking bars of said force feedback handle are controlled moving of two images respectively.
Said graphical interfaces module display navigation pattern and two kinds of interfaces of edit pattern.
Said mouse-keyboard also is connected with computing machine through hardware interface.
The present invention is owing to take above technical scheme; It has the following advantages: 1, interactive editor's method of the present invention; Can browse simultaneously the image reference mark, editor and data check, can not stop switching between state with checking editor, method than before has much improvement.2, the general force feedback handle hardware that uses of the present invention, market price is less than 100 yuans, and special hardware is owing to be special equipment, the volume production small scale, and price is at thousands of yuans; Simultaneously, it can move pending image of convergent-divergent and reference data at the image reference mark during editor simultaneously; Simultaneously it can also be accepted the instruction that application software sends and do self response, has reduced the chance that occurs human error among the editor.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is carried out detailed description.
For realizing above purpose, the present invention should be equipped with following hardware:
1, main frame, universal display equipment (comprising compatible display or projector etc.), general mouse (comprising compatible mouse, numerical digit plotting sheet, touch pad etc.), and the keyboard of system compatible;
2, link to each other with computer hardware interface (as 1394, wave point such as USB, COM, printer interface or bluetooth) general force feedback handle: be used for the reference mark editing operation as input equipment.
Under the support of computer operating system, also should comprise following software processing system:
1, central processing module is used to coordinate data transmission and the function scheduling between each module;
2, data processing module is used to manage image data and reference mark data, and the realization of responsible main algorithm;
3, information command module with above-mentioned game paddle compatibility work, is used to obtain the hardware state parameter, converts user instruction into, makes cooperative work of software and hardware;
4, graphical interfaces module is used to check image data, reference mark data and monitoring user operation response.
Said structure and data or instruction transmission direction are as shown in Figure 1.
In order to cooperate and hardware effort, software module involved in the present invention should comprise following function respectively:
(1) central processing module is safeguarded real-time user's operational status information, and is responsible for the format conversion and the forwarding of the director data between other software modules.Simultaneously, this module user's operation exception (as move, the convergent-divergent instruction crosses the border) or when detecting the present image reference mark and comprising unusually (transfiniting), the information command module is sent instruction like the reference mark residual error, make handle generation force-feedback response.
(2) install when in running order when this, data processing module is safeguarded image data and existing reference mark data message, can accept edit instruction and tackle the reference mark editor mutually, comprises interpolation, deletion and modification etc.This module comprises the geometric function model and resolves function simultaneously, can estimate the model parameter of selected geometric model through existing reference mark, and provide the residual values at each reference mark.
(3) the information command module is obtained the current state of the rocking bar and the button of game paddle according to certain frequency; And through analyzing; And the handle state of comparing its last timeslice, but be converted into the instruction message of central processing module Direct Recognition, and it is mail to central processing module.It also obtains the instruction of universal input devices such as mouse or keyboard from operating system simultaneously, transfers unified order format to and sends to central processing module.Simultaneously, this module also can be obtained the force feedback instruction from central processing module, send it to the handle rocking bar.
(4) the graphical interfaces module safeguards that the show state data (comprise current viewing area; Scaling); Module is sent idsplay order with certain refresh rate to computer display apparatus, makes show state display image data and the reference mark mark of display device according to its maintenance.This module is obtained instruction from central processing module, changes its display status information, and interface layout is as shown in Figure 2; Among the figure, the A district is the display window of left side image, and the B district is the display window of right image; The C district is the reference mark data list, and D is a current location cross directrix.
Operational mode supporting in the software module should comprise browse mode and edit pattern at least, in display device, demonstrates two kinds of duties of browser interface and editing interface, and browse mode is used to browse checks image data, and can carry out the interpolation and the deletion at reference mark; Edit pattern is used for edit-modify is carried out at the image reference mark.
Having the general force feedback handle of hardware interface, is a kind of common game paddle, and including in the handle can be by the register of computing machine modification, and handle is through level in this register, and the control motor rotary speed is with the realizable force feedback function.The appearance of handle has two rocking bars and 14 buttons at least.The function of left and right two rocking bars all is set to left and right image and moves on the handle under browse mode and edit pattern; The function of 14 buttons can be by User Defined, and the function of its acquiescence keypress function under two kinds of patterns is as shown in the table, and the button chronological order is as shown in Figure 3.
The keypress function table:
Image reference mark interactive editor's method flow is as shown in Figure 4, comprises mainly that hardware connection, system initialization, data are written into, data presentation refreshes, step such as input state detection, instruction transformation and transmission, data modification.
(1) main frame is connected with display device, mouse, keyboard, general force feedback handle; In computer operating system in advance or the driver that provides of current handle installation manufacturer;
(2) operation software kit program on operating system detects the connection status of handle by the information command module of system, if the handle good connection, then opens the data communication interface with handle, and constantly safeguards this interface; If then send the program halt instruction to central processing module unusually in initial (comprising in the program run) handle connection, the prompting user correctly connects handle, and is good up to connecting;
(3) user is provided with initial displaying ratio and display location information;
(4) central processing module receives the instruction that the user opens image data or reference mark data, sends it to data processing module, is written into data by data processing module; When comprising existing reference mark in the data, data processing module carries out parameter calculation according to the geometric model relation that the user selectes, and calculates the residual error of each reference mark under selected funtcional relationship;
(5) the central processing module instruction that will add displaying ratio and display location information (initial information can be provided with by the user) is sent to the graphical interfaces module; The graphical interfaces module from data processing module, obtain video data block and should the zone in the reference mark that comprises, the control display device displays it; The graphical interfaces module is obtained the reference mark data from data processing module simultaneously, and it is shown in data list;
(6) after handle got into duty, the information command module detected the connection status of handle in real time, real-time update button and the residing state of rocking bar in the handle register, and this state can be obtained through hardware interface by computing machine at any time; Simultaneously, register can be revised by computer system in the handle, and handle can be through level control motor rotary speed in this register with the realizable force feedback function;
(7) after data are written into, the information command module begins to detect with certain frequency the mode of operation of handle button and rocking bar, and it is deposited in the module; With reference to predefined keypress function allocation table; Through the handle state between the comparison time sheet, judge whether specific button has accomplished double-click or single-click operation on the handle, perhaps whether is in the state that continues to press; And be corresponding function command with this information translation, send to central processing module;
(8) central processing module, is responded by data processing module if data modification information then passes to data processing module with it accepting instruction back decision instruction content; If instruction comprises the graphic presentation modification information, then upgrade the inner view information of central processing module, and it is passed to the graphical interfaces module; If when instruction was judged as operation exception, processing module was not then transmitted this instruction, and, produce vibrations with the prompting user by information command module controls handle according to the force feedback instruction that the classification of predefined operation exception is sent respective intensities to the information command module;
(9) when central processing module receives current reference mark switching command, then current display position is adjusted to the place, current reference mark after the renewal, notice graphical interfaces module update displayed; From data processing module, obtain this reference mark residual information simultaneously; If judging the reference mark residual error transfinites; Then the information command module is sent respective strengths force feedback instruction, produce vibrations with the prompting user by information command module controls handle according to the degree that transfinites of residual error;
Execute instruction when (10) data processing module is received the reference mark edit instruction, and upgrade the reference mark data presentation through central processing module notice graphical interfaces module;
(11) when editing is accomplished, send the data out code by the user, central processing module then initiates a message to data processing module, is saved in the peripheral storage device by the reference mark data of data processing module with calculator memory; Send instruction to the graphical interfaces module simultaneously, make it empty image and show and the reference mark tabulation, and the entering suspended state stops to refresh demonstration.
The system and the software interface that make up with Microsoft Windows 7 32-bit operating systems below are that example is explained the specific embodiment of the invention:
(1) select the general force feedback game paddle of USB interface for use, key arrangement is as shown in Figure 3, is connected to the corresponding hardware interface of computing machine, and the driver that provides of handle installation manufacturer on computers;
(2) the DirectInput initialization game paddle equipment that in software interface, provides through the operating system expanded function;
(3) timer is set in software interface, sends request to DirectInput, obtain the button and the rocking bar of current game paddle and control state with set time frequency (per 20 milliseconds once);
(4) the handle state that obtains is made an explanation through the interpreter in the software interface, convert key command into message instruction (click like button, button is double-clicked, and presses by the bond distance etc.);
(5) the message instruction is sent to upper strata software for editing instruction interface,, and be reflected on the graphical interfaces by upper strata software for editing instruction interface response user instruction;
(6) software for editing detects user operation and mistake occurs, or currently checks that the image reference mark occurs sending feedback command when unusual, produces one group of force-feedback response by the DirectInput joystick according to fixed mode;
Software for editing instruction interface in the step (5) is a general-purpose interface, and the operation that can compatible response universal keyboard mouse and the operation of handle are broken down or during functional defect, finished the work by keyboard and mouse at handle interface.
The foregoing description only is used to explain the present invention; Wherein local structure, connected mode, operation steps etc. all can change to some extent; Every equivalents of on the basis of technical scheme of the present invention, carrying out or improvement all should not got rid of outside protection scope of the present invention.