Displacement transducer based on digital picture Fast Match Algorithm
Technical field
The present invention relates to a kind of displacement transducer, be based especially on the displacement transducer of digital picture Fast Match Algorithm.
Background technology
At present, market is mainly used in engineering high accuracy, the displacement meter product of wide range has type variable linear differential to become
Depressor (LVDT), capacitance-grid type displacement meter, grating displacement meter and swept resistance displacement meter.The said goods is respectively arranged with own characteristic and lacks
Fall into, Linear displacement meter is applicable to inclement condition environment, but the linearity is the highest, time drift and temperature drift the biggest, poor stability;Hold grid
Formula displacement meter precision is higher, and temperature drift is little, but moisture resistance is poor;Grating displacement meter precision is higher, good stability, but anti-interference impact
Difference;There is temperature drift and Long Term Contact wear problem in swept resistance displacement meter.It addition, described above displacement meter only allows to measure one
Direction displacement, use occasion is restricted.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of displacement transducer based on digital picture Fast Match Algorithm.
The present invention is achieved through the following technical solutions.
A kind of displacement transducer based on digital picture Fast Match Algorithm, including:
House the housing of each parts;
Image capturing system, receives light and picture signal is converted into digital signal, and based on hardware description language figure
As processor, use digital picture Fast Match Algorithm, calculate continuous two image shift amounts;
Illumination apparatus, be arranged on described image capturing system and described can continuous moving image acquisition interface reflection light
Approach at, emit beam, form effective optical path through optical lens;
Can the image acquisition interface of continuous moving, receive light that described illumination apparatus launches and reflex to described image
Acquisition system;
Control processing system, connect with described image capturing system, illumination apparatus respectively.
Further, above-mentioned illumination apparatus and described between the image acquisition interface of continuous moving, transparent firmware can be set.
Further, above-mentioned image capturing system includes image processor and imaging system, and above-mentioned imaging system receives light
Line, above-mentioned image processor calculates picture displacement side-play amount.
Further, above-mentioned image processor is the image based on hardware description language realizing picture position mapping algorithm
Processor CPLD or FPGA or ASIC.
Further, above-mentioned imaging system includes optical electrical conversion equipment, above-mentioned optical electrical conversion equipment receive to described can
The image acquisition interface reflection light of continuous moving carries out opto-electronic conversion.
Further, above-mentioned imaging system includes A/D conversion equipment, and above-mentioned A/D conversion equipment is by above-mentioned optical electrical conversion dress
The signal of telecommunication putting output is converted into digital signal output.
Further, above-mentioned imaging system includes synchronizer, above-mentioned synchronizer can by described optical electrical conversion equipment,
A/D conversion equipment, scanning means action synchronize.
Further, above-mentioned imaging system includes scanning means, and above-mentioned scanning means can be by the scanning to entire image
By discrete for collected object space coordinate, and obtain the light intensity value of each sampled point.
Further, above-mentioned illumination apparatus includes light source and one group of optical lens, if measured object photosensitive surface material is one
As rough grain, the most above-mentioned light source use visible or infrared light light source;If measured object photosensitive surface material is glass or metal
Deng relatively smooth surface, the most above-mentioned light source uses LASER Light Source.
Further, above-mentioned control processing system includes controller, storage circuit, display circuit and telecommunication circuit, described
Controller is connected with described image capturing system and illumination apparatus by connector.
A kind of displacement measurement method using described displacement transducer based on digital picture Fast Match Algorithm, step bag
Include:
(1) controller is initialized;
(2) illumination apparatus is opened;
(3) reading image processor memory element, the lateral displacement that acquisition present image compares with previous frame image is inclined
Shifting amount x, length travel side-play amount y;
(4) judge whether x, y change;
(5) if it is not, then abandon recording this x, y;
(6) value of now x and y is if so, recorded;
(7) displacement with last bin record carries out correlation computations, obtains current lateral displacement amount and longitudinal position
Shifting amount.
Further, shown in being calculated as follows of above-mentioned shift offset:
If f is (n1,n2) represent a M × N real image, g (n1,n2) represent a M × N reference picture, | x | and |
Y | represent real image relative to reference picture in X-axis and Y-axis side-play amount, R (x, y) represent intersection graph as matching degree value, (i,
J) it is that real time imaging and reference picture intersection graph are as pixel coordinate.Real time imaging is relative to the displacement the most corresponding four of reference picture
The expression formula of individual quadrant is as follows:
First quartile:
Second quadrant:
Third quadrant:
Fourth quadrant:
When above-mentioned intersection graph, as matching degree value R, (x, when y) reaching maximum, corresponding x, y is that present image is with previous
Two field picture shift offset.
Beneficial effects of the present invention:
Utilize picture position shift theory, the displacement transducer of two-dimensional measurement can be designed;The present invention is shone for measurand
The medium requirements of reflective surface is the highest, so the material that available processing uses is a lot;Simultaneously because employing non-contact measurement
Method, it is to avoid the measurement error brought because of mechanical wear;Picture position conversion process algorithm uses based on hardware description language
Image processor, improve algorithm process speed, it is ensured that the stability worked long hours and the real-time of data;And be satisfied
Measuring accuracy requirement, selects visible ray, infrared light or laser as light source for different measured surfaces so that optical sensor obtains
To image be easier to distinguish, improve positioning accurate parasexuality.
Accompanying drawing explanation
Fig. 1 is case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm front view;
Fig. 2 is the sectional view of case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm;
Fig. 3 is the enlarged partial sectional view of case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm;
Fig. 4 is case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm operation principle schematic diagram;
Fig. 5 is the image image-forming principle signal of case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm
Figure;
Fig. 6 is the displacement measurement method that case study on implementation 2 uses displacement transducer based on digital picture Fast Match Algorithm
Schematic flow sheet;
Fig. 7 is case study on implementation 2 real time imaging four-quadrant shift offset explanatory diagram relative to reference picture;
Fig. 8 is the position relationship schematic diagram of two width images front and back in case study on implementation 2 image sensing X-direction.
Detailed description of the invention
Below according to drawings and Examples, the present invention is described in further detail.
Case study on implementation 1:
Fig. 1 is the front view of case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm, and Fig. 2 is for implementing
The sectional view of case 1 displacement transducer based on digital picture Fast Match Algorithm, with reference to Fig. 1, Fig. 2, the present invention, based on numeral
The displacement transducer of image Fast Match Algorithm, including:
House the housing 1 of each parts;
Image capturing system 5, receives light and picture signal is converted into digital signal, and based on hardware description language figure
As processor 53, use digital picture Fast Match Algorithm, calculate previous digital pictures and the skew of a rear digital pictures
Amount;
Illumination apparatus 51, is arranged on described image capturing system 5 and described can the image acquisition interface 2 of continuous moving reflect
At the approach of light, emit beam, form effective optical path through optical lens;
Can the image acquisition interface 2 of continuous moving, receive light that described illumination apparatus 51 launches and reflex to described
Image capturing system 5;
Control processing system 50, connect with described image capturing system 5 and illumination apparatus 51 respectively.
Fig. 3 is the enlarged partial sectional view of case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm, ginseng
According to Fig. 3, and combine Fig. 1, Fig. 2, wherein, above-mentioned illumination apparatus 51 and above-mentioned can set between the image acquisition interface 2 of continuous moving
It is equipped with transparent firmware 9.The setting of transparent firmware 9 makes under the conditions of identical light-sensitive medium, keep illumination apparatus 51 with can be continuous
The coverage at the image acquisition interface 2 of movement, can make Optical Resolution of Imaging System keep constant, can not only reduce laser
Scattering, reduces sensor test trueness error, concentrates laser energy, and ensure that laser-bounce optical path distance requirement, protects
Card image definition.
Fig. 4 is case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm operation principle schematic diagram, reference
Fig. 4, and combine Fig. 1, Fig. 2, about image capturing system 5, above-mentioned image capturing system 5 includes imaging system 52 and image procossing
Device 53.Imaging system 52 receives light and picture signal is converted into digital signal, and image processor 53 uses to be retouched based on hardware
Predicate speech image processor CPLD or FPGA or ASIC, it is achieved digital picture Fast Match Algorithm, calculates continuous two images
Side-play amount.Image processor 53 has powerful data-handling capacity and the high speed of service, and time in fact, the speed of service is up to every number of seconds
With ten million bar complicated order, considerably beyond general purpose microprocessor.
Fig. 5 is the image image-forming principle signal of case study on implementation 1 displacement transducer based on digital picture Fast Match Algorithm
Figure, with reference to Fig. 5, and combines Fig. 1, Fig. 2, and above-mentioned illumination apparatus 51 includes laser lens 41, image lens 42 and light source 40, above-mentioned
Laser lens 41 be arranged on above-mentioned illumination apparatus 51 send to above-mentioned can the approach of image acquisition interface 2 light of continuous moving,
Above-mentioned image lens 42 is arranged on above-mentioned quilt the image acquisition interface 2 of continuous moving can reflex to above-mentioned imaging system 52 light
Approach.If measured object image acquisition interface 2 material is general rough grain, the most above-mentioned light source 40 uses visible light source or infrared light
Source;If measured object image acquisition interface 2 material is the relatively smooth surface such as glass or metal, the most above-mentioned light source 40 uses laser light
Source.
When measuring displacement, mobile measuring staff 3 is contacted with testee, when testee moves, the movement being in contact with it
Measuring staff 3 also moves, the image acquisition interface 2 in the mobile drive housing 1 of mobile measuring staff 3, namely laser illuminated surface
Change.Laser is radiated on image acquisition interface through laser lens 41, then by this surface reflectance-transmittance image lens
42, the light of transmitting is imaged system 52 and receives formation image.Along with the change at irradiation interface, imaging system 52 records continuous difference
Image.
Referring again to Fig. 4, and combine Fig. 1, Fig. 2, concrete, imaging system 52 includes that optical electrical conversion equipment 88, A/D change
Device 84, synchronizer 86 and scanning means 87, described optical electrical conversion equipment 88 receive described can the image acquisition of continuous moving
Interface 2 is reflected light and is carried out opto-electronic conversion.
Imaging system 52 also includes A/D conversion equipment 84, and above-mentioned A/D conversion equipment 84 is by above-mentioned optical electrical conversion equipment 88
The signal of telecommunication of output is converted into digital signal output.
Imaging system 52 also includes synchronizer 86, and above-mentioned synchronizer 86 can be by above-mentioned optical electrical conversion equipment 88, A/D
Conversion equipment 84, scanning means 87 action synchronize.
Further, imaging system 52 also includes scanning means 87, and above-mentioned scanning means 87 can be by the scanning to entire image
By discrete for collected object space coordinate, and obtain the light intensity value of each sampled point.
The simulation drawing that optical electrical conversion equipment 88, A/D conversion equipment 84, synchronizer 86 and scanning means 87 will receive
As digitized, will represent with the form of digital signal by piece image.Synchronizer 86 provide whole image capturing system 5 time
Clock synchronizing signal, so that all parts synchronization actions in system;Scanning means 87 is the intrinsic part of image capturing system 5,
It by realizing the discretization of collected object space coordinate to the scanning of entire image, and obtains the light intensity of each sampled point
Angle value;Optical electrical conversion equipment 88 is responsible for the corresponding optical signal that belongs to sampled point of scanning system output to be converted to the signal of telecommunication,
And provide necessary amplifying circuit to process, to match with A/D conversion equipment 84.Telecommunications from optical electrical conversion equipment 88 output
Number enter A/D conversion equipment 84, through over-sampling/holding, after A/D conversion, be converted into digital signal output.A/D conversion equipment 84
Including gate circuit, delay circuit, sample/hold circuit, A/D conversion circuit part (not shown).At a certain synchronization point,
The signal of telecommunication that optical electrical converting system is exported by sample/hold circuit is sampled, it is thus achieved that instantaneous voltage value carries out A/D conversion.As
Fruit is in transformation process, and magnitude of voltage there occurs change, then explaining the puzzle of producing will be disorderly and unsystematic.Therefore, sample/hold circuit exists
The instantaneous voltage keeping moment acquisition in one sampling interval is constant, and A/D change-over circuit is electric by this within a sampling interval
Pressure value is converted into digital signal and exports.
Refer again to Fig. 4, and combine Fig. 1, Fig. 2, about controlling processing system 50, control processing system 50 and include controller
82, storage circuit 83, telecommunication circuit 81 and display circuit 80, controller 82 described above is by connector and described image acquisition
System 5 and illumination apparatus 51 are connected.
Case study on implementation 2:
Fig. 6 is the displacement measurement method that case study on implementation 2 uses displacement transducer based on digital picture Fast Match Algorithm
Schematic flow sheet, with reference to Fig. 6, use the displacement measurement method of displacement transducer based on digital picture Fast Match Algorithm,
Step includes:
(1) controller is initialized;
(2) illumination apparatus is opened;
(3) reading image processor memory element, the lateral displacement that acquisition present image compares with previous frame image is inclined
Shifting amount x, length travel side-play amount y;
(4) judge whether x, y change;
(5) if it is not, then abandon recording this x, y;
(6) value of now x and y is if so, recorded;
(7) displacement with last bin record carries out correlation computations, obtains current lateral displacement amount and longitudinal position
Shifting amount.
The present invention is based on digital picture Fast Match Algorithm, it is simply that seek the displacement of the similar or identical part of two width images
Side-play amount;Cross-correlation is basic registration method, and many algorithms all use relevant as basic similarity measure instrument.
If F is (n1,n2) represent a M × N real image, G (n1,n2) represent a M × N reference picture.| x | and |
Y | expression real image is relative to reference picture in X-axis and Y-axis side-play amount, and (x y) represents that intersection graph is as matching degree value to R.(i,
J) be real time imaging and reference picture intersection graph as pixel coordinate, real time imaging relative to reference picture displacement correspondence respectively such as
Four-quadrant situation shown in Fig. 1-4, then (i, j) relative to the expression way of pixel in real time imaging and reference picture such as
Under:
First quartile:
Second quadrant:
Third quadrant:
Fourth quadrant:
According to above-mentioned principle, images match uses and calculates in X-direction and Y direction, it is possible to achieve the image of bidimensional
Join, design a kind of Two-dimensional Position measurement sensor.
The operand of images match is very big, generally searching N × N number of in the optical reference figure of known M × M pixel
The matched position of the real time imaging of pixel.Use maximum cross correlation algorithm to carry out full search images match, its operand about with
(M-N+1)2×N2It is directly proportional, then uses FFT algorithm that this algorithm is quickly calculated, the complexity of algorithm is reduced, from
And greatly reduce operand, it is achieved calculate in real time.The maximum cross correlation algorithm key factor of images match is convolution algorithm, one
As single chip computer architecture be difficult to even cannot meet calculating requirement, therefore use special hardware convolutional circuit to greatly speed up
Images match arithmetic speed, i.e. has the image processor of hardware description language.
Affect a lot, including sensor resolution, sensor translational speed and sensor because have of images match result
Image exposure rate etc..
Images match precision is affected by first analyte sensors movement velocity, if v is sensor movement speed, Δ t is figure
As the time interval of sensor double sampling, then before and after imageing sensor, the situation of two width images is as follows:
1. Δ t v < M has common factor image to produce, if Fig. 8 is the position of two width images before and after case study on implementation 2 imageing sensor
Put in relation schematic diagram shown in (1);
2. the Δ t v=M image that do not occurs simultaneously produces, if Fig. 8 is the position of two width images before and after case study on implementation 2 imageing sensor
Put in relation schematic diagram shown in (2);
3. the Δ t v > M image that do not occurs simultaneously produces, if Fig. 8 is two width images before and after case study on implementation 2 imageing sensor
In position relationship schematic diagram shown in (3).
From above-mentioned formula it is found that only intersection graph picture the most just can be produced when meeting condition, and according to calculating
Images match measure R (x, time y) maximum, draw real image relative to reference picture in X-axis and the side-play amount of Y direction.Can
See, the impact on displacement measurement of the image procossing frame per second of the translational speed of sensor and image capturing system design itself.
Secondly, although meeting condition 1., obtaining intersection graph picture, if this intersection graph picture is the least, the skew drawn measures
Wrong probability is very big, also can affect images match precision.There is error probability in image acquisition process, this error probability meets pool
Pine distribution.For the image acquisition of big probability, after number K value of makeing mistakes is more than variance, K is the biggest, and the probability made mistakes is the least,
Thus require that the sample of sampling is the biggest.So, successively two width image intersecting areas are bigger, the skew that images match calculates
It is the most accurate to measure;Front and back two width image intersecting areas are the least, and the displacement errors that images match calculates is the biggest.
Finally, the resolution impact on image measurement.The Parameter units of imageing sensor image resolution ratio is cpi, i.e. phase
When in often moving x displacement and just have the change of an image, in unit are, pixel is the most, represents it and can sense when more
Object detail, thus image is the most clear.Such as, if it is 5000cpi that imaging system 52 uses resolution, be equivalent to
Often move 0.00508mm and just have the change of a state, it is possible to detect that the change of displacement, such resolution meet position
Displacement sensor resolution is the use requirement of 0.01mm.
The present invention, can realize the displacement transducer of two-dimensional measurement, utilizes picture position shift theory to realize displacement measurement;?
In the implementation case, it is only necessary to measure the displacement in a direction, so when utilizing formula to calculate, only X-direction need to be considered
Displacement or the shift offset of Y direction;The medium requirements that the present invention irradiates surface for measurand is the highest, so can
The material that selective processing uses is a lot;Simultaneously because employing contactless measurement, it is to avoid because mechanical wear is brought
Measurement error;Picture position conversion process algorithm uses image processor based on hardware description language, improves algorithm process speed
Degree, it is ensured that the stability worked long hours and the real-time of data;And for meeting measuring accuracy requirement, for different tested tables
Face selects visible ray, infrared light or laser as light source so that the image that optical sensor obtains is easier to distinguish, improves location
Accuracy.
Above-described embodiment only for technology design and the feature of the present invention are described, its object is to allow and is familiar with this art
Personage will appreciate that present invention and is carried out, and can not limit the scope of the invention with this.All according to the present invention
The equivalence that spirit is made changes or modifies, and all should contain within the scope of the present invention.