CN109213961A - The sampling point calculating method and computer readable storage medium of friendship are asked based on vector - Google Patents
The sampling point calculating method and computer readable storage medium of friendship are asked based on vector Download PDFInfo
- Publication number
- CN109213961A CN109213961A CN201710547470.3A CN201710547470A CN109213961A CN 109213961 A CN109213961 A CN 109213961A CN 201710547470 A CN201710547470 A CN 201710547470A CN 109213961 A CN109213961 A CN 109213961A
- Authority
- CN
- China
- Prior art keywords
- coordinate
- point
- sampling
- sampled point
- vector
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Computational Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Analysing Materials By The Use Of Radiation (AREA)
- Processing Or Creating Images (AREA)
Abstract
The present invention discloses a kind of sampling point calculating method and computer readable storage medium that friendship is asked based on vector, method includes the following steps: step 1: establishing image space coordinate system, the throw light for passing through volume data is determined in image space coordinate system;Step 2: selecting first sampled point on throw light, determine the coordinate of first sampled point;Step 3: determining sampling step length △ L, the coordinate shift amount between neighbouring sample point is calculated based on sampling step length △ L;Step 4: being directed to all sampled points, coordinate and coordinate shift amount based on first sampled point calculate the coordinate of each sampled point.Sampled point computation rate can be significantly improved by this method, greatly reduces the expense of system resource, improves user experience.
Description
Technical field
The present invention relates to data visualization technique field, more particularly, to it is a kind of the sampled point of friendship asked by vector based on
Calculation method.
Background technique
With the development of virtual reality (VR) visualization technique, the volume visualization technology based on light projection method is in
Existing explosive growth, it is higher and higher to the performance requirement of light projection method, how in the base for guaranteeing volume visualization quality
On plinth, as far as possible promotion light projection method in sampled point computational efficiency, become influence volume visualization experience it is important because
Element.
Most common sampling point calculating method is Tri linear interpolation resampling, it is divided into 7 sublinear interpolation, is needed altogether
Want 7 sub-addition operations and 14 multiplyings.Sampled point is calculated by a large amount of Tri linear interpolation makes computing cost huge,
Influence interactive experience.Therefore, expect to develop a kind of higher sampling point calculating method of computational efficiency.
Summary of the invention
The purpose of the present invention is to propose to a kind of sampling point calculating methods that friendship is asked based on vector, can overcome existing sampling
The defect that point calculating method is computationally intensive, occupying system resources are high, computational efficiency is low.
The invention proposes a kind of sampling point calculating methods that friendship is asked based on vector, comprising the following steps:
Step 1: establishing image space coordinate system, the throwing for passing through volume data is determined in described image space coordinates
Penetrate light;
Step 2: selecting first sampled point on the throw light, determine the coordinate of first sampled point;
Step 3: determining sampling step length △ L, the coordinate shift between neighbouring sample point is calculated based on the sampling step length △ L
Amount;
Step 4: being directed to all sampled points, coordinate and the coordinate shift amount based on first sampled point calculate every
The coordinate of a sampled point.
Preferably, the direction vector of the throw light isWherein a, b, c respectively indicate the direction to
Measure x coordinate, y-coordinate and z coordinate in described image space coordinates.
Preferably, first sampled point is C0(x0,y0,z0), wherein x0、y0、z0Described first is respectively indicated to adopt
X coordinate, y-coordinate and z coordinate of the sampling point in described image space coordinates.
Preferably, the coordinate shift amount between neighbouring sample point are as follows:
Wherein, Δ x, Δ y, Δ z respectively indicate x-axis, y-axis, the coordinate shift amount of z-axis between neighbouring sample point.
Preferably, it is calculated by the following formula the coordinate of each sampled point:
xi+1=xi+Δx
yi+1=yi+Δy
zi+1=zi+Δz
That is:
Wherein, xi、yi、ziRespectively indicate the x coordinate, y-coordinate, z coordinate of ith sample point, i=0 ... N-1, N expression
The quantity of sampled point.
Another aspect of the present invention provides a kind of computer readable storage medium, is stored thereon with computer program, wherein institute
It states when program is executed by processor and performs the steps of
Step 1: establishing image space coordinate system, the throwing for passing through volume data is determined in described image space coordinates
Penetrate light;
Step 2: selecting first sampled point on the throw light, determine the coordinate of first sampled point;
Step 3: determining sampling step length △ L, the coordinate shift between neighbouring sample point is calculated based on the sampling step length △ L
Amount;
Step 4: being directed to all sampled points, coordinate and the coordinate shift amount based on first sampled point calculate every
The coordinate of a sampled point.
Preferably, the direction vector of the throw light isWherein a, b, c respectively indicate the direction to
Measure x coordinate, y-coordinate and z coordinate in described image space coordinates.
Preferably, first sampled point is C0(x0,y0,z0), wherein x0、y0、z0Described first is respectively indicated to adopt
X coordinate, y-coordinate and z coordinate of the sampling point in described image space coordinates.
Preferably, the coordinate shift amount between neighbouring sample point are as follows:
Wherein, Δ x, Δ y, Δ z respectively indicate x-axis, y-axis, the coordinate shift amount of z-axis between neighbouring sample point.
Preferably, it is calculated by the following formula the coordinate of each sampled point:
xi+1=xi+Δx
yi+1=yi+Δy
zi+1=zi+Δz
That is:
Wherein, xi、yi、ziRespectively indicate the x coordinate, y-coordinate, z coordinate of ith sample point, i=0 ... N-1, N expression
The quantity of sampled point.
The beneficial effects of the present invention are: using throw light object space hereditary property, by means of space vector
Orthogonal Decomposition and extension seek friendship method, calculate the parametric equation of equidistant sampled point, to reduce operation times.Pass through this method
Sampled point computation rate can be significantly improved, the expense of system resource is greatly reduced, improves user experience.
Methods and apparatus of the present invention has other characteristics and advantages, these characteristics and advantages are attached from what is be incorporated herein
It will be apparent in figure and subsequent specific embodiment, or will be in the attached drawing being incorporated herein and subsequent specific reality
It applies in mode and is stated in detail, the drawings and the detailed description together serve to explain specific principles of the invention.
Detailed description of the invention
Exemplary embodiment of the present is described in more detail in conjunction with the accompanying drawings, of the invention is above-mentioned and other
Purpose, feature and advantage will be apparent, wherein in exemplary embodiments of the present invention, identical appended drawing reference is usual
Represent same parts.
Fig. 1 shows the flow chart of the sampling point calculating method according to an embodiment of the present invention that friendship is asked based on vector;
Fig. 2 and Fig. 3 show the schematic diagrams of the sampling point calculating method according to an embodiment of the present invention that friendship is asked based on vector.
Specific embodiment
The present invention will be described in more detail below with reference to accompanying drawings.Although showing the preferred embodiment of the present invention in attached drawing,
However, it is to be appreciated that may be realized in various forms the present invention and should not be limited by the embodiments set forth herein.On the contrary, providing
These embodiments are of the invention more thorough and complete in order to make, and can will fully convey the scope of the invention to ability
The technical staff in domain.
Fig. 1 shows the flow chart for seeking the sampling point calculating method of friendship based on vector according to embodiments of the present invention.Such as Fig. 1 institute
Show, according to embodiments of the present invention based on vector ask friendship sampling point calculating method the following steps are included:
Step 1: establishing image space coordinate system, the projection light for passing through volume data is determined in image space coordinate system
Line.
Image space coordinate system is established, the origin of image space coordinate system is O, and three reference axis are respectively X-axis, Y-axis and Z
Axis.The throw light for passing through volume data is determined in image space coordinate systemIts direction vector isIts
Middle a, b, c respectively indicate x coordinate, y-coordinate and z coordinate of the direction vector in image space coordinate system.
Step 2: selecting first sampled point on throw light, determine the coordinate of first sampled point.
First sampled point C is selected on throw light0(x0,y0,z0), wherein x0、y0、z0Respectively indicate first sampling
X coordinate, y-coordinate and z coordinate of the point in image space coordinate system.Determining throw light in step 1Be by viewpoint and
What a point on volume data surface determined, select point different on surface that can determine different throw lights.Implementing this
During method, it can choose for determining throw lightVolume data surface on one o'clock as first sample
Point.
Step 3: determining sampling step length △ L, the coordinate shift amount between neighbouring sample point is calculated based on sampling step length △ L.
In this step, the seat between neighbouring sample point is calculated by carrying out projection and Orthogonal Decomposition in XOZ plane
Mark offset.Below with reference to the principle of Fig. 2 and Fig. 3 detailed description step 3.
Assuming that the length of volume data model is respectively L Δ x ', M Δ y ', N Δ z ', wherein Δ x ', Δ y ',
Δ z ' is respectively the length of a voxel of volume data.Volume data is defined on grid node, 8 adjacent grid nodes
Constitute a voxel.For voxel f (l, m, n), the coordinate of corresponding grid node is (l Δ x ', m Δ y ', n Δ
z’)。
With CiAnd Ci+1Indicate throw lightOn two neighbouring sample points, willIt projects in XOZ plane, obtains
It is projected asIt, will in XOZ planeOrthogonal Decomposition is carried out along x-axis and z-axis direction, is obtained:And each vector meets following formula:
Wherein, α indicates throw lightWith the angle between XOZ plane, β is indicatedWith the folder between YOZ plane
Angle.According to above formula, neighbouring sample point C can be determinediAnd Ci+1Along x-axis, y-axis, the coordinate shift amount of z-axis:
Δ y=Δ Lsin α
Wherein,
Step 4: being directed to all sampled points, coordinate and each sampled point of coordinate shift amount calculating based on first sampled point
Coordinate.
After obtaining the coordinate shift amount between neighbouring sample point by step 3, it can be calculated by the following formula every
The coordinate of a sampled point:
xi+1=xi+Δx
yi+1=yi+Δy
zi+1=zi+Δz
That is:
Wherein, xi、yi、ziRespectively indicate the x coordinate, y-coordinate, z coordinate of ith sample point, i=0 ... N-1, N expression
The quantity of sampled point.The coordinate of a sampled point often has been calculated, it can be determined that whether the sampled point is comprised in volume data, such as
Fruit is no, then sampling terminates, and otherwise continues to sample.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored thereon with computer program, wherein institute
It states when program is executed by processor and performs the steps of
Step 1: establishing image space coordinate system, the projection light for passing through volume data is determined in image space coordinate system
Line;
Step 2: selecting first sampled point on throw light, determine the coordinate of first sampled point;
Step 3: determining sampling step length △ L, the coordinate shift amount between neighbouring sample point is calculated based on sampling step length △ L;
Step 4: being directed to all sampled points, coordinate and each sampled point of coordinate shift amount calculating based on first sampled point
Coordinate.
In one example, the direction vector of throw light isWherein a, b, c respectively indicate direction vector
X coordinate, y-coordinate and z coordinate in image space coordinate system.
In one example, first sampled point is C0(x0,y0,z0), wherein x0、y0、z0Respectively indicate first sampling
X coordinate, y-coordinate and z coordinate of the point in image space coordinate system.
In one example, the coordinate shift amount between neighbouring sample point are as follows:
Wherein, Δ x, Δ y, Δ z respectively indicate x-axis, y-axis, the coordinate shift amount of z-axis between neighbouring sample point.
In one example, it is calculated by the following formula the coordinate of each sampled point:
xi+1=xi+Δx
yi+1=yi+Δy
zi+1=zi+Δz
That is:
Wherein, xi、yi、ziRespectively indicate the x coordinate, y-coordinate, z coordinate of ith sample point, i=0 ... N-1, N expression
The quantity of sampled point.
Various embodiments of the present invention are described above, above description is exemplary, and non-exclusive, and
It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes are obvious for the those of ordinary skill in art field.
Claims (10)
1. a kind of sampling point calculating method for asking friendship based on vector, comprising the following steps:
Step 1: establishing image space coordinate system, the projection light for passing through volume data is determined in described image space coordinates
Line;
Step 2: selecting first sampled point on the throw light, determine the coordinate of first sampled point;
Step 3: determining sampling step length △ L, the coordinate shift amount between neighbouring sample point is calculated based on the sampling step length △ L;
Step 4: being directed to all sampled points, coordinate and coordinate shift amount calculating based on first sampled point are each adopted
The coordinate of sampling point.
2. the sampling point calculating method according to claim 1 for asking friendship based on vector, wherein the direction of the throw light
Vector isWherein a, b, c respectively indicate x coordinate, y of the direction vector in described image space coordinates
Coordinate and z coordinate.
3. the sampling point calculating method according to claim 2 for asking friendship based on vector, wherein first sampled point be
C0(x0,y0,z0), wherein x0、y0、z0Respectively indicate x coordinate of first sampled point in described image space coordinates,
Y-coordinate and z coordinate.
4. the sampling point calculating method according to claim 3 for asking friendship based on vector, wherein the seat between neighbouring sample point
Mark offset are as follows:
Wherein, Δ x, Δ y, Δ z respectively indicate x-axis, y-axis, the coordinate shift amount of z-axis between neighbouring sample point.
5. the sampling point calculating method according to claim 4 for asking friendship based on vector, wherein be calculated by the following formula every
The coordinate of a sampled point:
xi+1=xi+Δx
yi+1=yi+Δy
zi+1=zi+Δz
That is:
Wherein, xi、yi、ziThe x coordinate, y-coordinate, z coordinate of ith sample point are respectively indicated, i=0 ... N-1, N indicate sampling
The quantity of point.
6. a kind of computer readable storage medium, is stored thereon with computer program, wherein when described program is executed by processor
It performs the steps of
Step 1: establishing image space coordinate system, the projection light for passing through volume data is determined in described image space coordinates
Line;
Step 2: selecting first sampled point on the throw light, determine the coordinate of first sampled point;
Step 3: determining sampling step length △ L, the coordinate shift amount between neighbouring sample point is calculated based on the sampling step length △ L;
Step 4: being directed to all sampled points, coordinate and coordinate shift amount calculating based on first sampled point are each adopted
The coordinate of sampling point.
7. computer readable storage medium according to claim 6, wherein the direction vector of the throw light isWherein a, b, c respectively indicate x coordinate, y-coordinate and z of the direction vector in described image space coordinates
Coordinate.
8. computer readable storage medium according to claim 7, wherein first sampled point is C0(x0,y0,
z0), wherein x0、y0、z0Respectively indicate x coordinate, y-coordinate and z of first sampled point in described image space coordinates
Coordinate.
9. computer readable storage medium according to claim 8, wherein the coordinate shift amount between neighbouring sample point
Are as follows:
Wherein, Δ x, Δ y, Δ z respectively indicate x-axis, y-axis, the coordinate shift amount of z-axis between neighbouring sample point.
10. computer readable storage medium according to claim 9, wherein be calculated by the following formula each sampled point
Coordinate:
xi+1=xi+Δx
yi+1=yi+Δy
zi+1=zi+Δz
That is:
Wherein, xi、yi、ziThe x coordinate, y-coordinate, z coordinate of ith sample point are respectively indicated, i=0 ... N-1, N indicate sampling
The quantity of point.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710547470.3A CN109213961B (en) | 2017-07-06 | 2017-07-06 | Vector intersection-based sampling point calculation method and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710547470.3A CN109213961B (en) | 2017-07-06 | 2017-07-06 | Vector intersection-based sampling point calculation method and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109213961A true CN109213961A (en) | 2019-01-15 |
CN109213961B CN109213961B (en) | 2022-11-25 |
Family
ID=64993154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710547470.3A Active CN109213961B (en) | 2017-07-06 | 2017-07-06 | Vector intersection-based sampling point calculation method and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109213961B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1967595A (en) * | 2006-10-26 | 2007-05-23 | 上海交通大学 | Monte Carlo volume rendering method based on partitioned |
US20080262355A1 (en) * | 2007-04-23 | 2008-10-23 | Shenzhen Mindray Bio-Medical Electronics Co., Ltd. | Method and apparatus for fast 3d ultrasound imaging |
CN102142128A (en) * | 2010-10-12 | 2011-08-03 | 华为技术有限公司 | Method and device for computing description vectors of interest points of image |
-
2017
- 2017-07-06 CN CN201710547470.3A patent/CN109213961B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1967595A (en) * | 2006-10-26 | 2007-05-23 | 上海交通大学 | Monte Carlo volume rendering method based on partitioned |
US20080262355A1 (en) * | 2007-04-23 | 2008-10-23 | Shenzhen Mindray Bio-Medical Electronics Co., Ltd. | Method and apparatus for fast 3d ultrasound imaging |
CN102142128A (en) * | 2010-10-12 | 2011-08-03 | 华为技术有限公司 | Method and device for computing description vectors of interest points of image |
Non-Patent Citations (1)
Title |
---|
袁非牛等: "基于多重增量递推和采样点分解的求交算法", 《北京生物医学工程》 * |
Also Published As
Publication number | Publication date |
---|---|
CN109213961B (en) | 2022-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110163903B (en) | Three-dimensional image acquisition and image positioning method, device, equipment and storage medium | |
CN103157281B (en) | Display method and display equipment of two-dimension game scene | |
CN111127623B (en) | Model rendering method and device, storage medium and terminal | |
CN109448137B (en) | Interaction method, interaction device, electronic equipment and storage medium | |
CN111868738B (en) | Cross-device monitoring computer vision system | |
US10318102B2 (en) | 3D model generation from 2D images | |
US8466919B1 (en) | Re-rendering a portion of an image | |
Tasse et al. | Enhanced texture‐based terrain synthesis on graphics hardware | |
US9723204B2 (en) | Dynamic motion path blur kernel | |
US8854392B2 (en) | Circular scratch shader | |
CN108882025B (en) | Video frame processing method and device | |
US9955065B2 (en) | Dynamic motion path blur user interface | |
CN109324796A (en) | Quick interface arrangement method and device | |
CN111709965A (en) | Map optimization method and device for sweeping robot | |
CN108230434B (en) | Image texture processing method and device, storage medium and electronic device | |
US9779484B2 (en) | Dynamic motion path blur techniques | |
CN109542574B (en) | Pop-up window background blurring method and device based on OpenGL | |
CN113034582A (en) | Pose optimization device and method, electronic device and computer readable storage medium | |
CN110378948B (en) | 3D model reconstruction method and device and electronic equipment | |
CN114924822B (en) | Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium | |
CN109213961A (en) | The sampling point calculating method and computer readable storage medium of friendship are asked based on vector | |
US20190244403A1 (en) | Paint reflection around a curvilinear path | |
CN109410304B (en) | Projection determination method, device and equipment | |
WO2023179091A1 (en) | Three-dimensional model rendering method and apparatus, and device, storage medium and program product | |
US8010330B1 (en) | Extracting temporally coherent surfaces from particle systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |