CN109213961B - Vector intersection-based sampling point calculation method and computer readable storage medium - Google Patents

Vector intersection-based sampling point calculation method and computer readable storage medium Download PDF

Info

Publication number
CN109213961B
CN109213961B CN201710547470.3A CN201710547470A CN109213961B CN 109213961 B CN109213961 B CN 109213961B CN 201710547470 A CN201710547470 A CN 201710547470A CN 109213961 B CN109213961 B CN 109213961B
Authority
CN
China
Prior art keywords
sampling
coordinate
coordinates
point
sampling point
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.)
Active
Application number
CN201710547470.3A
Other languages
Chinese (zh)
Other versions
CN109213961A (en
Inventor
嵇杰
王昀
陈浩
庞世明
陈楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Petroleum and Chemical Corp
Sinopec Geophysical Research Institute
Original Assignee
China Petroleum and Chemical Corp
Sinopec Geophysical Research Institute
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Petroleum and Chemical Corp, Sinopec Geophysical Research Institute filed Critical China Petroleum and Chemical Corp
Priority to CN201710547470.3A priority Critical patent/CN109213961B/en
Publication of CN109213961A publication Critical patent/CN109213961A/en
Application granted granted Critical
Publication of CN109213961B publication Critical patent/CN109213961B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization

Abstract

The invention discloses a sampling point calculation method based on vector intersection and a computer readable storage medium, wherein the method comprises the following steps: step 1: establishing an image space coordinate system, and determining a projection ray passing through volume data in the image space coordinate system; step 2: selecting a first sampling point on the projection light line, and determining the coordinates of the first sampling point; and step 3: determining a sampling step length delta L, and calculating coordinate offset between adjacent sampling points based on the sampling step length delta L; and 4, step 4: for all the sample points, the coordinates of each sample point are calculated based on the coordinates of the first sample point and the coordinate offset. By the method, the calculation rate of the sampling point can be obviously improved, the expenditure of system resources is greatly reduced, and the user experience is improved.

Description

Vector intersection-based sampling point calculation method and computer-readable storage medium
Technical Field
The invention relates to the technical field of data visualization, in particular to a sampling point calculation method based on vector intersection.
Background
With the development of Virtual Reality (VR) visualization technology, volume data visualization technology based on a ray casting method shows explosive growth, the performance requirement on the ray casting method is higher and higher, how to improve the calculation efficiency of sampling points in the ray casting method on the basis of ensuring the visualization quality of volume data is the important factor influencing the visualization experience of volume data.
The most common sampling point calculation method at present is trilinear interpolation resampling, which is divided into 7 linear interpolations, and 7 addition operations and 14 multiplication operations are required in total. The sampling points are calculated through a large number of trilinear interpolation, so that the calculation cost is huge, and the interactive experience is influenced. Therefore, it is desirable to develop a sampling point calculation method with higher calculation efficiency.
Disclosure of Invention
The invention aims to provide a sampling point calculation method based on vector intersection, which can overcome the defects of large calculation amount, high occupied system resources and low calculation efficiency of the conventional sampling point calculation method.
The invention provides a sampling point calculation method based on vector intersection, which comprises the following steps:
step 1: establishing an image space coordinate system, and determining a projection ray passing through volume data in the image space coordinate system;
step 2: selecting a first sampling point on the projection light line, and determining the coordinates of the first sampling point;
and step 3: determining a sampling step length delta L, and calculating coordinate offset between adjacent sampling points based on the sampling step length delta L;
and 4, step 4: for all sampling points, calculating the coordinates of each sampling point based on the coordinates of the first sampling point and the coordinate offset.
Preferably, the direction vector of the projection light is
Figure BDA0001343532560000021
Wherein a, b, c represent the x-coordinate, y-coordinate and z-coordinate of the direction vector within the image space coordinate system, respectively.
Preferably, the first sample point is C 0 (x 0 ,y 0 ,z 0 ) Wherein x is 0 、y 0 、z 0 Respectively representing the x coordinate, the y coordinate and the z coordinate of the first sampling point in the image space coordinate system.
Preferably, the coordinate offset between adjacent sample points is:
Figure BDA0001343532560000022
Figure BDA0001343532560000023
Figure BDA0001343532560000024
wherein Δ x, Δ y, Δ z represent x-axis, y-axis, z-axis coordinate offsets between adjacent sample points, respectively.
Preferably, the coordinates of each sample point are calculated by the following formula:
x i+1 =x i +Δx
y i+1 =y i +Δy
z i+1 =z i +Δz
namely:
Figure BDA0001343532560000025
Figure BDA0001343532560000026
Figure BDA0001343532560000027
wherein x is i 、y i 、z i X, y and z coordinates of the ith sample point are respectively represented, i =0 \ 8230 \ 8230; N-1, N represents the number of sample points.
Another aspect of the invention provides a computer readable storage medium having a computer program stored thereon, wherein the program when executed by a processor performs the steps of:
step 1: establishing an image space coordinate system, and determining a projection ray passing through volume data in the image space coordinate system;
and 2, step: selecting a first sampling point on the projection light line, and determining the coordinates of the first sampling point;
and step 3: determining a sampling step length delta L, and calculating coordinate offset between adjacent sampling points based on the sampling step length delta L;
and 4, step 4: for all sampling points, calculating the coordinates of each sampling point based on the coordinates of the first sampling point and the coordinate offset.
Preferably, the direction vector of the projection light is
Figure BDA0001343532560000034
Wherein a, b, c represent the x-coordinate, y-coordinate and z-coordinate of the direction vector within the image space coordinate system, respectively.
Preferably, the first sampling point is C 0 (x 0 ,y 0 ,z 0 ) Wherein x is 0 、y 0 、z 0 Respectively representing the x coordinate, the y coordinate and the z coordinate of the first sampling point in the image space coordinate system.
Preferably, the coordinate offset between adjacent sample points is:
Figure BDA0001343532560000031
Figure BDA0001343532560000032
Figure BDA0001343532560000033
wherein Δ x, Δ y, Δ z represent x-axis, y-axis, z-axis coordinate offsets between adjacent sample points, respectively.
Preferably, the coordinates of each sample point are calculated by the following formula:
x i+1 =x i +Δx
y i+1 =y i +Δy
z i+1 =z i +Δz
namely:
Figure BDA0001343532560000041
Figure BDA0001343532560000042
Figure BDA0001343532560000043
wherein x is i 、y i 、z i X, y and z coordinates of the ith sample point are respectively represented, i =0 \ 8230 \ 8230; N-1, N represents the number of sample points.
The invention has the beneficial effects that: the parameter equation of equidistant sampling points is calculated by utilizing the transfer property of the projection light in the object space and by means of the orthogonal decomposition of the space vector and the epitaxial intersection method, so that the operation times are reduced. By the method, the calculation rate of the sampling point can be obviously improved, the expenditure of system resources is greatly reduced, and the user experience is improved.
The method and apparatus of the present invention have other features and advantages which will be apparent from or are set forth in detail in the accompanying drawings and the following detailed description, which are incorporated herein, and which together serve to explain certain principles of the invention.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts.
FIG. 1 shows a flow diagram of a method for sample point computation based on vector intersection according to an embodiment of the invention;
fig. 2 and 3 are schematic diagrams illustrating a sampling point calculation method based on vector intersection according to an embodiment of the present invention.
Detailed Description
The invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 shows a flow chart of a sample point calculation method based on vector intersection according to an embodiment of the present invention. As shown in fig. 1, the method for calculating the sampling point based on vector intersection according to the embodiment of the present invention includes the following steps:
step 1: and establishing an image space coordinate system, and determining a projection ray passing through the volume data in the image space coordinate system.
And establishing an image space coordinate system, wherein the origin of the image space coordinate system is O, and the three coordinate axes are respectively an X axis, a Y axis and a Z axis. Determining a projection ray through the volume data in the image space coordinate system
Figure BDA0001343532560000051
Having a direction vector of
Figure BDA0001343532560000052
Where a, b, c represent the x, y and z coordinates of the direction vector in the image space coordinate system, respectively.
And 2, step: a first sample point is selected on the projected light line, and coordinates of the first sample point are determined.
Selecting a first sample point C on the projected light line 0 (x 0 ,y 0 ,z 0 ) Wherein x is 0 、y 0 、z 0 Respectively representing the x-coordinate, the y-coordinate and the z-coordinate of the first sample point in the image space coordinate system. Projection ray determined in step 1
Figure BDA0001343532560000053
Is determined by the viewpoint and one point on the volumetric data surface, and selecting different points on the surface may determine different projection rays. In the course of carrying out the method, it is optionally possible to determine the projection light
Figure BDA0001343532560000054
One point on the surface of the volume data of (1) is taken as a first sampling point.
And step 3: and determining a sampling step length delta L, and calculating the coordinate offset between adjacent sampling points based on the sampling step length delta L.
In the present step, the coordinate shift amount between adjacent sample points is calculated by performing projection and orthogonal decomposition on the XOZ plane. The principle of step 3 is described in detail below with reference to fig. 2 and 3.
Let the length, width and height of the volume data model be L · Δ x ', M · Δ y' and N · Δ z ', respectively, where Δ x', Δ y 'and Δ z' are the length, width and height of one voxel of the volume data, respectively. The volume data is defined on grid nodes, and the adjacent 8 grid nodes constitute one voxel. For voxel f (l, m, n), the coordinates of the corresponding grid node are (l · Δ x ', m · Δ y ', n · Δ z ').
With C i And C i+1 Representing projected light
Figure BDA0001343532560000061
Two adjacent sampling points of
Figure BDA0001343532560000062
Projected onto the XOZ plane to obtain a projection
Figure BDA0001343532560000063
In the XOZ plane, will
Figure BDA0001343532560000064
Orthogonal decomposition is carried out along the directions of the x axis and the z axis to obtain:
Figure BDA0001343532560000065
and each vector satisfies the following formula:
Figure BDA0001343532560000066
Figure BDA0001343532560000067
Figure BDA0001343532560000068
wherein α represents a projection ray
Figure BDA0001343532560000069
Angle to the XOZ plane, beta being
Figure BDA00013435325600000610
The included angle with the YOZ plane. From the above formula, the adjacent sampling point C can be determined i And C i+1 Coordinate offset along x, y, z axes:
Figure BDA00013435325600000611
Δy=ΔL·sinα
Figure BDA00013435325600000612
wherein the content of the first and second substances,
Figure BDA00013435325600000613
Figure BDA00013435325600000614
Figure BDA00013435325600000615
Figure BDA00013435325600000616
and 4, step 4: for all sample points, the coordinates of each sample point are calculated based on the coordinates of the first sample point and the coordinate offset.
After obtaining the coordinate offset between adjacent sampling points through step 3, the coordinates of each sampling point can be calculated by the following formula:
x i+1 =x i +Δx
y i+1 =y i +Δy
z i+1 =z i +Δz
namely:
Figure BDA0001343532560000071
Figure BDA0001343532560000072
Figure BDA0001343532560000073
wherein x is i 、y i 、z i X, y and z coordinates of the ith sample point are respectively represented, i =0 \ 8230 \ 8230; N-1, N represents the number of sample points. And each time the coordinates of one sampling point are calculated, judging whether the sampling point is contained in the volume data, if not, finishing the sampling, and otherwise, continuing the sampling.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the program, when executed by a processor, implements the following steps:
step 1: establishing an image space coordinate system, and determining a projection ray passing through volume data in the image space coordinate system;
step 2: selecting a first sampling point on the projection light line, and determining the coordinates of the first sampling point;
and 3, step 3: determining a sampling step length delta L, and calculating coordinate offset between adjacent sampling points based on the sampling step length delta L;
and 4, step 4: for all sample points, the coordinates of each sample point are calculated based on the coordinates of the first sample point and the coordinate offset.
In one example, the direction vector of the projected light is
Figure BDA0001343532560000074
Where a, b, c represent the x, y and z coordinates of the direction vector in the image space coordinate system, respectively.
In one example, the first sample point is C 0 (x 0 ,y 0 ,z 0 ) Wherein x is 0 、y 0 、z 0 Respectively representing the x-coordinate, the y-coordinate and the z-coordinate of the first sample point in the image space coordinate system.
In one example, the coordinate offset between adjacent sample points is:
Figure BDA0001343532560000081
Figure BDA0001343532560000082
Figure BDA0001343532560000083
wherein Δ x, Δ y, Δ z represent x-axis, y-axis, z-axis coordinate offsets between adjacent sample points, respectively.
In one example, the coordinates of each sample point are calculated by the following formula:
x i+1 =x i +Δx
y i+1 =y i +Δy
z i+1 =z i +Δz
namely:
Figure BDA0001343532560000084
Figure BDA0001343532560000085
Figure BDA0001343532560000086
wherein x is i 、y i 、z i X, y and z coordinates of the ith sampling point are respectively represented, i =0 \ 8230, and N-1, N represents the number of the sampling points.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.

Claims (4)

1. A sampling point calculation method based on vector intersection comprises the following steps:
step 1: establishing an image space coordinate system, and determining a projection ray passing through volume data in the image space coordinate system;
step 2: selecting a first sampling point on the projection light line, and determining the coordinates of the first sampling point;
and step 3: determining a sampling step length delta L, and calculating coordinate offset between adjacent sampling points based on the sampling step length delta L;
and 4, step 4: calculating coordinates of each sampling point based on the coordinates of the first sampling point and the coordinate offset for all sampling points;
wherein the direction vector of the projection light is
Figure FDA0003789775010000011
Wherein a, b, c represent the x, y and z coordinates of the direction vector within the image space coordinate system, respectively;
the coordinate offset between adjacent sample points is:
Figure FDA0003789775010000012
Figure FDA0003789775010000013
Figure FDA0003789775010000014
wherein, Δ x, Δ y, Δ z respectively represent coordinate offset of x-axis, y-axis, z-axis between adjacent sampling points;
wherein the coordinates of each sample point are calculated by the following formula:
x i+1 =x i +Δx
y i+1 =y i +Δy
z i+1 =z i +Δz
namely:
Figure FDA0003789775010000021
Figure FDA0003789775010000022
Figure FDA0003789775010000023
wherein x is i 、y i 、z i X, y and z coordinates of the ith sample point are respectively represented, i =0 \ 8230 \ 8230; N-1, N represents the number of sample points.
2. A method of calculating sample points based on vector intersection as claimed in claim 1 wherein the first sample point is C 0 (x 0 ,y 0 ,z 0 ) Wherein x is 0 、y 0 、z 0 Respectively representing the x coordinate, the y coordinate and the z coordinate of the first sampling point in the image space coordinate system.
3. A computer-readable storage medium, on which a computer program is stored, wherein the program realizes the following steps when executed by a processor:
step 1: establishing an image space coordinate system, and determining a projection ray passing through volume data in the image space coordinate system;
step 2: selecting a first sampling point on the projection light line, and determining the coordinates of the first sampling point;
and step 3: determining a sampling step length delta L, and calculating coordinate offset between adjacent sampling points based on the sampling step length delta L;
and 4, step 4: calculating coordinates of each sampling point based on the coordinates of the first sampling point and the coordinate offset for all sampling points;
wherein the direction vector of the projection light is
Figure FDA0003789775010000024
Wherein a, b, c represent the x-coordinate, y-coordinate and z-coordinate of the direction vector within the image space coordinate system, respectively;
the coordinate offset between adjacent sample points is:
Figure FDA0003789775010000031
Figure FDA0003789775010000032
Figure FDA0003789775010000033
wherein, Δ x, Δ y, Δ z respectively represent coordinate offset of x-axis, y-axis, z-axis between adjacent sampling points;
wherein the coordinates of each sample point are calculated by the following formula:
x i+1 =x i +Δx
y i+1 =y i +Δy
z i+1 =z i +Δz
namely:
Figure FDA0003789775010000034
Figure FDA0003789775010000035
Figure FDA0003789775010000036
wherein x is i 、y i 、z i X, y and z coordinates of the ith sample point are respectively represented, i =0 \ 8230 \ 8230; N-1, N represents the number of sample points.
4. The computer-readable storage medium of claim 3, wherein the first sample point is C 0 (x 0 ,y 0 ,z 0 ) Wherein x is 0 、y 0 、z 0 Respectively representing the x coordinate, the y coordinate and the z coordinate of the first sampling point in the image space coordinate system.
CN201710547470.3A 2017-07-06 2017-07-06 Vector intersection-based sampling point calculation method and computer readable storage medium Active CN109213961B (en)

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 CN109213961A (en) 2019-01-15
CN109213961B true 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1967595A (en) * 2006-10-26 2007-05-23 上海交通大学 Monte Carlo volume rendering method based on partitioned
CN102142128A (en) * 2010-10-12 2011-08-03 华为技术有限公司 Method and device for computing description vectors of interest points of image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101292883B (en) * 2007-04-23 2012-07-04 深圳迈瑞生物医疗电子股份有限公司 Ultrasonic three-dimensional quick imaging method and apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1967595A (en) * 2006-10-26 2007-05-23 上海交通大学 Monte Carlo volume rendering method based on partitioned
CN102142128A (en) * 2010-10-12 2011-08-03 华为技术有限公司 Method and device for computing description vectors of interest points of image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于多重增量递推和采样点分解的求交算法;袁非牛等;《北京生物医学工程》;20040325(第01期);全文 *

Also Published As

Publication number Publication date
CN109213961A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
US9881417B2 (en) Multi-view drawing apparatus of three-dimensional objects, and method
JP2008033940A (en) Run time/computer graphic animation/conversion in engine from deformation data for mesh to animation data for skeleton, skinning, and shading
US20180165860A1 (en) Motion edit method and apparatus for articulated object
US9723204B2 (en) Dynamic motion path blur kernel
US9965843B2 (en) Methods and systems for characterizing concept drawings and estimating three-dimensional information therefrom
WO2018205493A1 (en) Graphic drawing method, apparatus and device
US9955065B2 (en) Dynamic motion path blur user interface
CN111868738B (en) Cross-device monitoring computer vision system
CN105894551A (en) Image drawing method and device
US9053581B2 (en) Hidden line grids in a browser environment
US9779484B2 (en) Dynamic motion path blur techniques
US20190051044A1 (en) Automated mesh generation
CN106445445B (en) Vector data processing method and device
CN113034582A (en) Pose optimization device and method, electronic device and computer readable storage medium
CN109213961B (en) Vector intersection-based sampling point calculation method and computer readable storage medium
CN108553900A (en) A method of the stackable storage Reusability based on UE engines
JP5290138B2 (en) Mesh changing device, mesh changing method, and program
US7330183B1 (en) Techniques for projecting data maps
CN114170367A (en) Method, apparatus, storage medium, and device for infinite-line-of-sight pyramidal heatmap rendering
CN109410304B (en) Projection determination method, device and equipment
WO2023179091A1 (en) Three-dimensional model rendering method and apparatus, and device, storage medium and program product
CN108499109A (en) A method of it unilateral in real time can be scaled based on UE engine implementations article
JP4986835B2 (en) Collective display image output device, collective display image output method, computer program, and recording medium
JP4834642B2 (en) Graphic change device, graphic change method, computer program, and recording medium
CN116880693A (en) Three-dimensional hand model display method and device, electronic equipment and readable storage medium

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