Summary of the invention
Problem and shortage at prior art exists the object of the present invention is to provide a kind of multi-view X ray stereoscopic imaging method and system.It provides can specify viewpoint position, direction of visual lines, the multi-view X ray three-dimensional imaging demonstration of scalable parallax effect, thus make the supervisory personnel can carry out mutual three-dimensional ray image check, better understand the space structure of tested object.
To achieve these goals,, provide a kind of multi-view X ray stereoscopic imaging method, comprise the steps: according to a scheme of the present invention
1) obtains the imaging system parameter by the mode of measuring or demarcate;
2) projected image sampling, rotation digital imagery deriving means or be placed on wherein object makes digital imagery deriving means and object that relative circumference or helical motion take place, and every θ degree is gathered a width of cloth projected image (Gk (θ)), and θ is an any number;
3) set up image index, the view data of gathering is carried out data compression as required and stored calculator memory into, all images pixel basis imaging system parameter is set up angle and distance two-stage ranking index;
4) viewpoint parameter is set, the user is by interactive interface, and needs according to the observation are provided with the right viewpoint parameter of stereo-picture, and is right with the stereo-picture that obtains the different angles observing effect;
5) calculate the sight line parameter, described viewpoint parameter has determined that current stereo-picture is right, calculates the parameter of its corresponding sight line for each pixel on the image;
6) image index is searched: according to the described sight line parameter that calculates in the step 5), in the image index table of setting up in step 3), search and the adjacent beam of described sight line parameter;
7) pixel is synthetic: according to Computing performance and the user needs to the precision of images, adopt various filtering interpolation methods that adjacent beam is carried out the synthetic calculating of interpolation, the corresponding image pixel of synthetic described sight line (L ' ij) (p ' (i, j)), repeating step 3) finish the calculating of stereo-picture to step 5) to last all pixels;
8) Flame Image Process:, image is carried out enhancement process by interactive interface according to user's needs;
9) stereo display: finish the right demonstration of stereo-picture by 3 d display device, make user's left eye see the image at corresponding left eye visual angle, right eye is seen the image at corresponding right eye visual angle, forms stereopsis.
According to another aspect of the present invention, a kind of multi-view X ray stereo imaging system is provided, comprise by x-ray source (1) and dull and stereotyped X-ray detector (3) but objective table (2), scan control and data capture unit (4), multiple degrees of freedom control module (5), stereo display graphics card (7), image analysis processing unit (6), display (8) and the anaglyph spectacles (9) of the X ray digital imagery deriving means multiple degrees of freedom of forming rotation is characterized in that:
Described X ray digital imagery deriving means can be realized circular path or helical trajectory scanning;
Described scan control and data capture unit are used for by measuring or scaling method acquisition imaging system parameter; Rotation digital imagery deriving means or be placed on wherein object makes digital imagery deriving means and object that relative circular motion take place, and every θ degree is gathered a width of cloth projected image Gk (θ), and θ is an any number;
Described image analysis processing unit (6) is used to set up image index, and the view data of gathering is carried out data compression as required and stored calculator memory into, and all images pixel basis imaging system parameter is set up the two-stage ranking index; Viewpoint parameter is set, and the user is by interactive interface, and needs according to the observation are provided with the right viewpoint parameter of stereo-picture, and is right with the stereo-picture that obtains the different angles observing effect; Calculate the sight line parameter, calculate the parameter of its corresponding sight line for each pixel on the image, viewpoint parameter has determined that current stereo-picture is right; Image index is searched: and according to the described described sight line parameter that calculates of step in described image index table, search and the adjacent beam of described sight line parameter; Pixel is synthetic, according to Computing performance and user needs to the precision of images, adopt various filtering interpolation methods that adjacent beam is carried out the synthetic calculating of interpolation, the corresponding image pixel of synthetic described sight line (L ' ij) (p ' (i, j)), thus finish the calculating of stereo-picture to last all pixels; Flame Image Process according to user's needs, is carried out enhancement process by interactive interface to image; Stereo display is finished the right demonstration of stereo-picture by 3 d display device, makes user's left eye see the image at corresponding left eye visual angle, and right eye is seen the image at corresponding right eye visual angle, forms stereopsis.
Embodiment
Multi-view X ray stereoscopic imaging method of the present invention, at first according to x-ray imaging system parameter and data acquisition parameters, pixel column along a series of projecting image datas of circumference and helical trajectory collection is set up the angle and distance index, and index is sorted storage so that search fast; According to observation viewpoint, direction of visual lines and the parallax effect selected, calculating needs synthetic stereo-picture to last pixel angle and distance parameter then, searches storage index and respective image data thus and carry out image synthetic.Multi-view X ray stereo imaging system among the present invention comprises having X ray digital imagery deriving means, computer installation and the 3 d display device that can realize circumference and helical trajectory scanning.X ray digital imagery deriving means is imported computer installation with radioscopic image, described computer installation shows stereo-picture according to various visual angles stereoscopic imaging method synthetic stereo image of the present invention and by 3 d display device, its design feature is that described computer installation comprises scan control and data capture unit and image analysis processing unit.
The imaging synoptic diagram of X ray digital imagery deriving means as shown in Figure 1.X-ray source produces cone beam, and the radiographic source target spot is arranged in figure S place.Radiant image radiographic source commonly used has X-ray machine, accelerator, isotope source or the like, can select to use according to the concrete condition of inspected object.Digital X ray surface array detector is converted to light signal with the X ray of transmission inspected object by scintillation crystal conversion screen or video screen, obtains the accessible Digital Image Data of computing machine through opto-electronic conversion and analog digital conversion again.Digital X ray surface array detector commonly used has area array CCD detector, digital flat panel detector etc.
Object to be detected places in the middle of x-ray source and the planar array detector, in X ray digital imagery deriving means described in the invention, the distance of x-ray source and planar array detector is L, and the distance of x-ray source and object rotation center O is D, and the pel spacing of planar array detector is d
0(this parameter is provided by planar array detector producer usually).The imaging deriving means adjust and calibration in, adjust x-ray source perpendicular to the ray of planar array detector by the object turning axle, and demarcate this perpendicular ray on planar array detector pixel position corresponding P0 (i0, j0).Demarcate P0 (i0, method j0) is different according to the concrete parameter of equipment, the geometric relationship of the multiple image by demarcating thing is calculated and is finished usually, can be with reference to relevant professional technique data.In imaging data scanning acquisition process, the pel spacing d of the distance L of x-ray source and planar array detector, x-ray source and object rotation center distance D, planar array detector
0, perpendicular ray on planar array detector pixel position corresponding P0 (i0 j0) all remains unchanged.
The workflow of described scan control and data capture unit is: 1) by measuring or scaling method acquisition imaging system parameter; 2) rotation digital imagery deriving means or be placed on wherein object makes digital imagery deriving means and object that relative circumference and helical motion take place, and gathers a series of projecting image datas with certain angle intervals.
The workflow of described image analysis processing unit is: 1) set up the pixel index of images acquired, calculate secondary ranking index storage list; 2) viewpoint parameter setting; 3) sight line calculation of parameter; 4) the image index table is searched; 5) picture element interpolation is synthetic; 6) Flame Image Process; 7) stereo display.
Multi-view X ray stereoscopic imaging method of the present invention, geometric relationship that related image data acquisition sampling is calculated and the synthetic resampling of stereo-picture is calculated and correlation parameter are as shown in Figure 2.Because the resampling viewpoint track of the synthetic multi-view X ray stereo-picture of the present invention is positioned at the Plane of rotation perpendicular to turning axle at radiographic source place, Fig. 2 describes is that calculative beam vertical projection marks each angle and all refers to Plane Angle in Plane of rotation to the interior geometric relationship of Plane of rotation in sampled images and the resampling image among the figure.
Multi-view X ray stereoscopic imaging method of the present invention is at first set up the image pixel index to the projection image sequence of being obtained by scan control and data capture unit, calculates secondary ranking index storage list.Among Fig. 2, rotating object or imaging deriving means, when relative rotation angle θ station acquisition k width of cloth projected image, the residing position of definition x-ray source is sampling viewpoint P
kDefinition projected image pixel P0 (i0, j0) Dui Ying beam is the sampling center line, and this sampling center line is by object rotation center and vertical with planar array detector, and definition anglec of rotation θ is sampling center line and the horizontal sextant angle that is positioned at the reference coordinate axle of Plane of rotation.Sampling radius of a circle shown in the figure is the distance D of x-ray source to the object rotation center.
K width of cloth projected image G in anglec of rotation θ station acquisition
k(θ), (i, j) Dui Ying X-ray beam is L to establish pixel p
IjTo projected image G
k(θ) set up the image pixel index, just each pixel p (i, j) Dui Ying X-ray beam L on the computed image
IjHorizontal sextant angle α with the reference coordinate axle
i, and ray L
IjHorizontal range d to the object rotary middle spindle
i, as shown in Figure 2.
For calculating α
iAnd d
i, need to calculate earlier beam L
IjWith the horizontal sextant angle β of sampling central ray in Plane of rotation
iBecause the sampling central ray is perpendicular to the planar array detector plane, so sample center line, beam L
IjTwo intersection points of projection line in Plane of rotation and planar array detector and the viewpoint P that samples
kConstitute leg-of-mutton three summits of flat square.According to the corner geometric relationship of right-angle triangle, angle β
iThe length of side of right right-angle side be (i-i
0) * d
0, the length of side of another right-angle side be x-ray source to the planar array detector distance L, so have:
I wherein
0Be the sequence number of the pixel column of corresponding rotation central shaft in the projected image, d
0Be the planar array detector pel spacing, L is that x-ray source is to the planar array detector distance.β
iThe positive negative indication beam of symbol L
IjLeft side or right side at the sampling central ray.In present case, work as β
i<0 o'clock, L
IjIn the left side of sampling central ray, work as β
i>0 o'clock, L
IjRight side at the sampling central ray.
The over-sampling viewpoint is done the parallel lines that are parallel to the reference coordinate axle, then X-ray beam L
IjEqual α with the angle of these parallel lines
i, and by the geometric angle of parallel lines relation, α
iCan be by angle beta
iθ calculates with the sampling viewpoint anglec of rotation.For the ease of setting up concordance list, regulation index ray L
IjAngle [alpha]
iSpan be α
i∈ [0,2 π] is according to θ and angle beta
iMagnitude relationship, α
iCan calculate by following formula:
X ray L
IjRestraint the object rotary middle spindle apart from d
iBe L for crossing rotation center
IjThe perpendicular line gained, this perpendicular line and L
IjAnd sampling center line form right angle triangle, according to the geometric relationship of right-angle triangle, d
iCan calculate by following formula:
d
i=D×sin(β
i) (3)
Wherein, D is the distance of radiographic source to the object turning axle, and the viewpoint of promptly sampling is to the distance of object turning axle, the just hypotenuse in the right-angle triangle.With β
iSimilar, d
iThe positive negative indication of symbol at ray L
IjLeft side or right side at rotary middle spindle.In present case, work as d
i<0 o'clock, L
IjAt the left side of sampling central ray, d at that time
i>0, L
IjRight side at the sampling central ray.
Through above calculating, the beam of each the row pixel correspondence on the sample projection image can be by projectional angle α
iWith centre distance d
iCome index.For can be to the searching fast of index when the composograph, the present invention sets up apart from d
iPreferential secondary is searched concordance list, in index table stores secondary index structure as shown in Figure 3.Wherein, in the first order concordance list storage beam to rotary middle spindle apart from d
i, pixel column numbering and corresponding second level concordance list pointer; Storage is apart from d in each second level concordance list
iIdentical projected angle angle [alpha]
iNumber with projected image.First order index is according to d
iOrdering, second level index is according to projection angle α
iOrdering is beneficial to adopt the binary search algorithm to search index fast when composograph resamples calculating, improves the image combined coefficient.
When observing viewpoint, direction of visual lines and parallax for given one, at first according to stereo vision imaging geometrical calculation stereo-picture to last right and left eyes viewpoint and the direction of visual lines at the place relevant textbook of stereoscopic vision of reference (can) separately, respectively all pixels on the right and left eyes image are obtained its corresponding beam L ' then
IjAngle α ' with the reference coordinate axle
i, and L '
IjTo the object rotary middle spindle apart from d '
i, and choose and have near α '
i, d '
iThe sampling beam of value comes interpolation to synthesize ray L '
IjCorresponding image pixel.Fig. 2 has illustrated resampling viewpoint R when synthetic stereo image resamples
lThe synthetic geometric relationship of calculating institute's basis of the resampling at place, calculate stereo-picture to the time need do identical calculating to the right and left eyes viewpoint respectively.The synthetic viewpoint R that resamples of image
lThe Plane of rotation at sampling viewpoint place when being positioned at data and obtaining is by R
lGyrobearing angle ω, R with the reference coordinate axle
lRepresenting of object rotary middle spindle when obtaining apart from r with data; Direction of visual lines then by with viewpoint R
l, the object turning axle line resampling central ray that departs from the angle represents.
Similar with the index that calculates projected image, at first need according to imaging system parameter and the synthetic resampling calculation of parameter beam L ' of image
IjAngle β ' with resampling sight line center
i, the derivation with reference to formula (1) has
β ' in the formula
iThe positive negative indication beam of symbol L '
IjLeft side or right side at the resampling central ray.In present case, as β '
i<0 o'clock, L '
IjAt the left side of resampling central ray, β ' at that time
i>0, L '
IjRight side at the resampling central ray.The visual field when herein, having supposed the visual field that resamples and having sampled is identical.
According to geometric angle relation, sight line L '
IjAngle α ' with the reference coordinate axle
iCalculate by following formula:
α′
i=ω-(+β′
i) (5)
Wherein ω is viewpoint gyrobearing angle, needs α ' according to result of calculation
iStandard is to span α '
i∈ [0,2 π].
The derivation of similar formula (3), L '
IjTo the object rotation center apart from d '
iComputing formula be:
d′
i=r×sin(+β′
i) (6)
Obtain the corresponding beam L ' of image pixel to be synthesized
IjProjection angle α '
iWith distance d '
iAfter the parameter, need in the secondary index table, search and have near α '
i, d '
iThe index of the image pixel row of value, and, choose suitable interpolation algorithm composograph according to image aggregate velocity and picture quality requirement.
When emphasis is considered the image aggregate velocity of algorithm, can select neighbor interpolation algorithm, only need in the two-stage index table, find out α ' successively
i, d '
iBe worth that an immediate row view data is synthetic to get final product.
When emphasis is considered the picture quality of algorithm, can use bilinear interpolation to obtain more accurate image.At first in first order look-up table, use binary search and distance parameter d '
iTwo the most close second level concordance list pointers, the distance parameter of remembering these two index correspondences is d
1And d
2(d
1<d '
i<d
2); In two second level concordance lists, search separately with the projected angle parameter alpha '
iImmediate two index, the projected angle parameter of remembering these four index correspondences is α
11, α
12And α
21, α
22,, establish α
11<α '
i<α
12, α
21<α '
i<α
22To searching the four row nearest pixel P that concordance list obtains
11, P
12, P
21, P
22With weight factor r
1, r
2, r
3, r
4It is synthetic to carry out interpolation:
P
ij=r
1P
11+r
2P
12+r
3P
21+r
3P
22 (7)
Wherein, weight factor r
1, r
2, r
3, r
4For
, ask for so directly carry out interpolation, lacking the parallax of short transverse based on the synthetic stereo-picture of circle sampling with the size unanimity of maintenance composograph in the height and the width direction with synthetic same row video beam in short transverse.Suppose that the sight line degree of depth arrives radiogenic distance D for the object rotation center, calculates its sight line L '
IjThe image line j of middle j ' correspondence:
J wherein
0Pixel column sequence number for sampling central ray correspondence.Usually in the synthetic pixel of these row, directly select the capable pixel of j to get final product as the j ' row pixel of final composograph.
Described multi-view X ray stereoscopic imaging method can represent that each technical finesse step specifies as follows in the workflow with flow process Fig. 4:
1) systematic parameter is measured and is demarcated: obtain imaging system parameter: L by measurement or scaling method, and D, P0 (i0, j0), d0.
2) circumference and helical trajectory projected image sampling: rotation digital imagery deriving means or be placed on wherein object, make digital imagery deriving means and object that relative circumference and helical motion take place, every θ degree is gathered a width of cloth projected image G
k(θ), θ is an any number.
3) calculate secondary ranking index table: the view data of gathering is loaded into calculator memory, can carries out data compression as required.In computing machine, all images pixel basis imaging system parameter is set up the angle and distance index.Concrete grammar is: k width of cloth projected image sampling optimization is in P
k, its anglec of rotation θ is sampling central ray (being the ray of corresponding object rotation center) and the angle that is positioned at the reference coordinate axle of Plane of rotation, D is the sampling radius of a circle.Projected image G
k(i, j) Dui Ying beam is L to pixel p (θ)
Ij, can calculate L according to the imaging system parameter
IjAngle β with the sampling central ray
i, L
IjAngle α with the reference coordinate axle
i, and L
IjTo the object rotation center apart from d
iWith the corresponding α of each row of each image
iAnd d
iBe kept in the secondary ranking index table.
4) viewpoint parameter setting: the user is by interactive interface, and needs according to the observation are provided with the right viewpoint parameter of stereo-picture, and is right with the stereo-picture that obtains the different angles observing effect.By interactive operation, the parameter that the user can be provided with comprises viewpoint position, observes the parallax parameter of direction of visual lines, what comes into a driver's body and stereo display etc.
5) sight line calculation of parameter: viewpoint parameter has determined that current stereo-picture is right, calculates the parameter of its corresponding sight line for each pixel on the image.(i, j) Dui Ying sight line is L ' to pixel p '
Ij, calculate sight line L '
IjAngle α ' with the reference coordinate axle
i, L '
IjTo the object rotation center apart from d '
i, and with the object rotation center to spacing from calculating its sight line L '
IjDui Ying image line j highly.The stereo-picture that calculates the right and left eyes correspondence according to viewpoint parameter is right, all can adopt to use the same method, and just two viewpoints are in vertical coverage center position deviation tc distance.
6) concordance list is searched: according to the sight line L ' that calculates in the step
IjAngle α ' with the reference coordinate axle
i, L '
IjTo the object rotation center apart from d '
i, in the image index table of setting up, search and L '
IjThe beam that parameter is adjacent.The quantity of adjacent beam is relevant with the image pixel synthetic filtering method that selection mode and step 7) are selected for use.
7) picture element interpolation is synthetic: can be according to Computing performance and user needs to the precision of images, and adopt various filtering interpolation methods adjacent beam to be carried out interpolation is synthetic to be calculated, synthetic sight line L '
IjCorresponding image slices vegetarian refreshments p ' (i, j).Filtering interpolation method commonly used has the field interpolation, and bilinearity is inserted it, quadratic interpolation etc.Repeating step 5) finishes the calculating of stereo-picture to step 7) to last all pixels.
8) Flame Image Process: according to user's needs, provide the image enhancement processing function,, strengthen the effect of stereo display as greyscale transformation, pseudo-colours, edge enhancing etc. by interactive interface.
9) stereo display: finish the right demonstration of stereo-picture by 3 d display device, make user's left eye see the image at corresponding left eye visual angle, right eye is seen the image at corresponding right eye visual angle, forms stereopsis.Repeating step 3) to step 9), the user can constantly change the observation viewpoint position, observe direction of visual lines, parallax, reaches the inspection effect of multi-angle stereo display.
Described multi-view X ray stereo imaging system as shown in Figure 5, but comprise objective table 2, scan control and data capture unit 4, multiple degrees of freedom control module 5, stereo display graphics card 7, image analysis processing unit 6, display 8 and the anaglyph spectacles 9 of the x-ray imaging device multiple degrees of freedom rotation of forming by x-ray source 1 and dull and stereotyped X-ray detector 3.Described objective table 2 places between described x-ray source 1 and the dull and stereotyped X-ray detector 3.Described scan control and data capture unit 4 obtain the view data that X-ray plane detector 3 sends by data collecting card, and scan control and data capture unit 4 obtain the scanning position information of the objective table 2 of multiple degrees of freedom control module 5 transmissions by communication port.Flame Image Process and synthetic stereo image are finished according to the data of scan control and data capture unit 4 transmissions in described image analysis processing unit 6, described image analysis processing unit 6 by stereo display graphics card 7 with stereo-picture to flip displays on display 8, and drive anaglyph spectacles 9.Scan control and data capture unit 4 and image analysis processing unit 6 can be installed on same the PC, also can be installed on two different PC by the network connection.Wherein work according to described multi-view X ray stereoscopic imaging method in scan control and data capture unit, image analysis processing unit.
The present invention is by the projected image G of computer installation according to imaging system parameter and the collection of digital imagery deriving means
k(θ) carry out Flame Image Process and synthetic stereo image.Therefore, the invention provides and can specify viewpoint position, direction of visual lines, the multi-view X ray three-dimensional imaging demonstration of scalable parallax effect, thus make the supervisory personnel can carry out mutual three-dimensional ray image check, better understand the space structure of tested object.The present invention can realize on top-grade computer that stereo-picture is synthetic fast, and the smooth variation that changes the view stereo-picture of energy strengthens the stereoeffect that motion parallax brings.
Though, below invention has been described in conjunction with the embodiments, but those having ordinary skill in the art will appreciate that, the present invention is except can adopting the sampling of circumference or helical trajectory, can also adopt other sample mode, objective table, stereoscopic display device, the computer installation of the x-ray source in the system of the present invention, X-ray detector, multiple degrees of freedom rotation can be made up of the equipment of any amount or specification simultaneously.So protection scope of the present invention is not limited to described specific implementation system.