Wood internal defect three-D imaging method based on Top-k inverse distance-weighting
Technical field
The present invention relates to a kind of imaging method of wood internal defect, is specifically related to a kind of anti-distances of Top-k that are based on and adds
The wood internal defect three-D imaging method of power.
Background technology
China is the country of a timber resources famine, as economic development and the continuous of living standards of the people carry
Rise, the demand of timber also cumulative year after year therewith.Live body wood largely regularly detect using wood nondestructive testing technology
Timely remedy as the important means of related forest resourceies utilization rate is effectively improved.Wood nondestructive testing technology is used for detecting
Timber growth characteristics, the physical property of timber and its structure, wood internal defect, mechanical property of timber etc., using timber without
Damage detection technique can improve timber utilization rate.
In wood nondestructive testing technology, it will usually use some imaging methods allow wood internal the defects of intuitively
Display, more fast intuitively wood internal defective locations etc. are researched and analysed for researchers, prior art carries
A kind of stress wave tomography technology is supplied, the imaging technique mainly obtains timber two dimension by stress wave tomography technology
Faultage image, then the information such as size, the shape of wood internal defect are obtained by faultage image, but this method is needed to wood
Material carries out the acquisition of multiple cross sectional image, this methods experiment week that three-dimensional research is carried out by obtaining timber two dimension tomograph
Phase is long, realizes that efficiency is low;There is a kind of method by CT scan technical limit spacing wood internal three-dimensional situation in the prior art in addition,
Although this method disposably obtains wood internal three-dimensional situation, cost is higher, is not easy to realize.
The content of the invention
Goal of the invention:In order to overcome the deficiencies in the prior art, present invention offer is a kind of, and based on Top-k, anti-distance adds
The wood internal defect three-D imaging method of power, this method can be accurately positioned wood internal defective locations and the rotten feelings of defect
Condition, substantially increase detection efficiency.
Technical scheme:To achieve the above object, a kind of wood internal defect based on Top-k inverse distance-weighting of the invention
Three-D imaging method, comprise the following steps:
S1 fixes sensor around timber to be measured, makes that sensor is evenly distributed on around timber to be measured and sensor is consolidated
It is scheduled at the different height around timber to be measured;
S2 is tapped successively to sensor, makes stress wave in detected materials internal communication, and record stress wave is in timber
In the propagation time in portion, calculate spread speed of the stress wave between any two sensor;
S3 is obtained to space according to Spreading Velocity of Stress Wave data and is estimated known point speed data collection in vertex neighborhood;
S4 estimates known point speed data collection in vertex neighborhood by space, and it is pre- to calculate the space according to inverse distance-weighting algorithm
Estimate property value a little;
S5 estimates property value drawing three-dimensional spatial point distribution map a little according to space, according to three dimensions point profiling analysis
The rotten situation of wood internal to be measured.
Further, known point in the field estimated the space before property value a little is estimated in space a little is calculated to sieve
Choosing, specifically includes following steps:
The cubic search method based on two dimension in bearing search method is expanded to the space search based on three-dimensional by S21 first
Method, if it is a little p that space, which is estimated,i(xi,yi), point p is estimated in the spacei(xi,yi) around known point q be present in 8 domain level constraintsi
(xi,yi);
Then S22 is scanned for using search radius r to known point in each domain level constraints, wherein rmin< r < R, R are wood
The radius of material, rminRefer to rminThe number of known point must reach threshold value δ set in advance in the domain level constraints searched;
S23 finally estimates point p using based on Top-k inquiring technology search spacesi(xi,yi) in domain level constraints with the space
Estimate k known point of a correlation maximum.
Further, the step S23 specifically includes following steps:
The set T of M tuple is given, each tuple has m'=(u1,u2,...,um.,) individual attribute, set T is stored as arranging
Set S={ the S of file1,S2,...,Sm, each row file is binary combination Si(rid,ui), wherein rid represents the mark of object
Know symbol, uiProperty value of the object at attribute is represented, wherein dullness of the storage mode of each row file for the property value of each tuple
Nonincreasing sequence, defines the score function that F is m' attribute, and F formula are as follows:
(formula 1)
In formula, λiIt is score function F in property value uiOn weight;
Using k subset of each tuple in Top-k inquiring technologies inquiry query set T, by reading m row, descending is arranged
The row file S of row, order are read in sequence, and when tuple rid occurs, the mode of random write is in another m-1 row file
Other property values are obtained, then calculate their score value, if the score value is current maximum k, are tieed up with Priority Queues
K tuple and its relevant information are protected, to each row sequence, if its current read position uiIf threshold tau=F (u1,u2,...,
um'), when the minimum value of k tuple fractional value in Priority Queues is not less than τ, poll-final.
Further, the step S4 comprises the following steps:
S41 makesRepresentation space estimates point pi(xi,yi) to the weight of known point in its field, thenIt is expressed as:
(formula 2)
In formula,It is a little p that representation space, which is estimated,i(xi,yi) and known point qi(xi,yiThe distance between), m is constant;
S42 estimates in space point pi(xi,yi) attribute value table be shown as:
(formula 3)
In formula,Property value a little is estimated for space,For pi(xi,yi) property value of i-th of known point, δ in field
To participate in the number of known point in the neighborhood calculated.
Further, m value is 1.
Further, in the step S1, the maximum height difference scope between the sensor being fixed on timber to be measured is
15cm~30cm.
Beneficial effect:The present invention compared with the prior art, this have the advantage that:
1st, three-dimensional imaging is carried out to wood internal defect using this clearly demarcated method, neighborhood of a point relation is estimated into space and expanded
Three dimensions is opened up, increase, which estimates search radius a little and introduces top-k and inquire about to find out in its neighborhood, to be influenceed known to maximum k
Point, the property value estimated a little is calculated and carries out three-dimensional imaging, there is higher imaging precision;
2nd, wood internal defect is detected using the method for the present invention, rotten position, the rotten order of severity is carried out
Analysis, technology is easy, rapidly and efficiently, accurately can quickly know the rotten situation of wood internal, it is rotten to substantially increase wood internal
The efficiency of detection.
Brief description of the drawings
Fig. 1 is the wood internal defect three-D imaging method flow chart of the invention based on Top-k inverse distance-weighting.
Fig. 2 is 5 kinds of experiment sample figures of the embodiment of the present invention.
Fig. 3 is the wood internal defect imaging design sketch obtained based on inventive algorithm.
Embodiment
The present invention is further described below in conjunction with the accompanying drawings.
Wood internal defect three-D imaging method proposed by the present invention based on Top-k inverse distance-weighting, reference picture 1, bag
Include following steps:
Sensor is fixed around timber to be measured, makes that sensor is evenly distributed on around timber to be measured and sensor is fixed
At the different height around timber to be measured, wherein the maximum height difference scope between the sensor being fixed on timber to be measured is
15cm~30cm, sensor is tapped successively, make stress wave in detected materials internal communication, record stress wave is in timber
In the propagation time in portion, calculate spread speed of the stress wave between any two sensor;
According to Spreading Velocity of Stress Wave data, obtain to space and estimate known point speed data collection in vertex neighborhood;
Known point speed data collection in vertex neighborhood is estimated by space, calculating the space according to inverse distance-weighting algorithm estimates
The property value of point, calculate needs to estimate the space known point in field a little before property value a little is estimated in space sieves
Choosing, specifically includes following steps:
The cubic search method based on two dimension in bearing search method is expanded into the space search method based on three-dimensional first, if
It is a little p that space, which is estimated,i(xi,yi), point p is estimated in the spacei(xi,yi) around known point q be present in 8 domain level constraintsi(xi,yi);
Then known point in each domain level constraints is scanned for using search radius r, wherein rmin< r < R, R are timber
Radius, rminRefer to rminThe number of known point must reach threshold value δ set in advance in the domain level constraints searched;
Finally point p is estimated using based on Top-k inquiring technology search spacesi(xi,yi) estimated with the space in domain level constraints
K known point of point correlation maximum:The set T of M tuple is given, each tuple has m'=(u1,u2,...,um.,) individual category
Property, set T is stored as to the set S={ S of row file1,S2,...,Sm, each row file is binary combination Si(rid,ui), its
Middle rid represents the identifier of object, uiProperty value of the object at attribute is represented, wherein the storage mode of each row file is each member
The dull nonincreasing sequence of the property value of group, defines the score function that F is m' attribute, and F formula are as follows:
(formula 1)
In formula, λiIt is score function F in property value uiOn weight;F is monotonic function, i.e.,It is if right
All 1≤i≤m', a1·u1≤a2·u2, then F (a1)≤F(a2);Inquired about using Top-k inquiring technologies each in query set T
K subset of tuple, by reading the m row row file S that descending arranges, order is read in sequence, when tuple rid occurs
When, then the mode of random write calculates their score value in another m-1 row file acquisition other property value, if
The score value is current maximum k, and k tuple and its relevant information are safeguarded with Priority Queues, to each row sequence, if it is worked as
Preceding reading position uiIf threshold tau=F (u1,u2,...,um'), when the minimum value of k tuple fractional value in Priority Queues is not less than τ
When, poll-final;
The space is calculated according to inverse distance-weighting algorithm and estimates property value a little, is comprised the following steps:
OrderRepresentation space estimates point pi(xi,yi) to the weight of known point in its field, thenIt is expressed as:
(formula 2)
In formula,It is a little p that representation space, which is estimated,i(xi,yi) and known point qi(xi,yiThe distance between), m is constant, m
Value be 1;
Estimate point p in spacei(xi,yi) attribute value table be shown as:
(formula 3)
In formula,Property value a little is estimated for space,For pi(xi,yi) property value of i-th of known point, δ in field
To participate in the number of known point in the neighborhood calculated;
Because m value is 1 in the embodiment of the present invention, point p is estimated in spacei(xi,yi) attribute value table be shown as:
(formula 4)
Property value drawing three-dimensional spatial point distribution map a little is estimated according to space, treated according to three dimensions point profiling analysis
Survey the rotten situation of wood internal, specifically by space estimate a little according to different attribute value progress color assignment, and carry out three-dimensional can
Depending on change.
The embodiment of the present invention:
Timber to be measured chooses 5 kinds of experiment samples in the present invention, and sample tree type is respectively Chinese walnut, paulownia and Chinese parasol tree
Tung oil tree, as shown in Fig. 2 sample sequence number 1 and 3 is paulownia sample in Fig. 2, sample sequence number 2 and 5 is Chinese walnut sample, sample
Sequence number 4 is Chinese parasol tree tree sample, and wherein sample sequence number 1 and 3 is the forced hole of excavated by manual work to simulate the rotten situation of nature, sample sequence number 2,
4 and 5 the defects of is that nature is rotten, the defects of sample is calculated using the product of sample defect point ratio and actual sample volume
Volume, it is 4019.2cm that sample 1, which is calculated, and surveys defect volume3, it is 2601.12cm that sample 2, which surveys defect volume,3, sample 3
It is 1074.84cm to survey defect volume3, it is 2418.39cm that sample 4, which surveys defect volume,3, sample 5 survey defect volume be
2307.9cm3;
By using the portable timber Laminographic device of independent research, the different height around the wood sample of selection
Place fixes 12 sensors and carries out data acquisitions, wherein the maximum height difference of 6 samples be respectively 20cm, 30cm, 15cm,
15cm, 15cm, 20cm, 12 sensors are tapped successively, after each sensor has tapped, extract test data twice, altogether
24 groups of Spreading Velocity of Stress Wave data are calculated, are analyzed for three-dimensional imaging;
Above-mentioned 5 kinds of samples are tested respectively using algorithm proposed by the present invention, experiment effect figure is soft by MATLAB
Part emulates to obtain, and finally obtains the experiment effect figure of 5 kinds of samples, as shown in figure 3, Fig. 3 reactions correspond to different sample sequence numbers respectively
Sample graphics, sample top view, the imaging three-dimensional figure based on Top-k inverse distance-weighting algorithms and based on the anti-distances of Top-k
The imaging top view of weighting algorithm, it is clear that the region of black color dots composition is actual rotten area in sample in figure
Domain, the region of the point composition of other light colours is region healthy in sample;
The present invention using the actual measurement volume of sample defect and the defects of be calculated based on inventive algorithm volume it
Between relative error verify the correctness of testing result, the actual measurement volume of sample defect and calculated based on inventive algorithm
Relative error between the defects of obtaining volume is calculated by formula 5:
Δ t=| v1-v|/v1(formula 5)
In formula, v refers to the actual measurement volume of sample defect, v1The defects of referring to be calculated based on inventive algorithm
Volume, sample defects detection result are as shown in table 1:
Table 1
From table 1 it follows that the relative error Δ t of sample 5 is 16.1%, reason is probably that the upper and lower side of sample 5 is rotten
Rotten degree difference is larger, is to carry out analog sample profile using standard cylindrical type when being imaged using inventive algorithm so that algorithm meter
The defects of calculating gained volume has larger error with actual defects volume, and other samples are using in graphics obtained by inventive algorithm
Defective locations and actual defects position are very close, average detected rate of accuracy reached to 83.9%.
Described above is only the preferred embodiment of the present invention, it should be pointed out that:Come for those skilled in the art
Say, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should be regarded as
Protection scope of the present invention.