Note: Descriptions are shown in the official language in which they were submitted.
METHOD FOR RESTORING UNDERGROUND IMAGE ON
BASIS OF RAY REVERSE TRACING TECHNOLOGY
FIELD OF THE INVENTION
[0001] The present invention belongs to the field of underground image
restoration, and
particularly relates to a method for restoring an underground image on the
basis of a
ray reverse tracing technology.
DESCRIPTION OF RELATED ART
[0002] A ray tracing technology is a method for showing a three-dimensional
(3D)
image on a two-dimensional (2D) screen, is widely applied to games and
computer
graphics at present, and brings a more vivid effect to people. A light source
is supposed
as a point light source capable of randomly emitting tens of thousands of rays
to
surroundings, and those rays are reflected, refracted or absorbed (attenuated)
or
generate fluorescence after touching different objects. Ray tracing is a
general
technology from geometrical optics, and a ray passing path model is obtained
by tracing
rays generating interaction effects with an optical surface. However, tens of
thousands
of rays exist, and the rays after reflection, refraction, absorption and
fluorescence
generation are countless, so that the calculation amount of ray positive
tracing is great.
Therefore, a ray reverse tracing method gradually comes into people's sight.
The
calculation amount is greatly reduced if a camera lens is used as a light
source emitting
point and only the part of rays entering a view plane are calculated.
[0003] Due to a fact that most explosion-proof cameras used underground at
present
are black and white cameras, special underground environment of a coal mine,
all-
weather artificial illumination, and influence by factors such as dust and
dampness, an
underground video has the characteristics of low image illuminance and
nonuniform
illumination distribution, and this special conditions cause low quality of
the collected
video and poor resolution of the video. When a strong light source such as a
safety mine
lamp occurs in a view filed of a mine camera, a collected image will have a
dazzle light
phenomenon, so that the quality of the video image is greatly reduced, and
occurrence
of safety accidents may be caused. Therefore, application of the ray reverse
tracing
technology to underground image restoration for image readability improvement
is of
great importance.
1
Date Recue/Date Received 2020-04-27
SUMMARY OF THE INVENTION
Technical Problem
[0004] Aiming at the above problems, the present invention provides a method
for
restoring an underground image on the basis of a ray reverse tracing
technology. By
aiming at a phenomenon that under the conditions of low illuminance and much
dust in
a coal mine, a suddenly occurring strong light source may interfere an
original video
image, so that black and white level contrast of the monitoring image is too
great, and
information in the video image cannot be recognized, a ray reverse tracing
method is
used, and a pixel value of the strong light source in a view plane is
eliminated, so that
interference of the strong light source to the original video image is
eliminated.
Technical Solution
[0005] In order to achieve a goal of the present invention, the present
invention adopts
a technical solution that a method for restoring an underground image on the
basis of a
ray reverse tracing technology includes the following steps:
[0006] step 1: supposing an underground camera as a light source emitting
point, i.e., a
view point, and emitting rays into an underground scene;
[0007] step 2: recording all intersection points of all rays and underground
objects, and
calculating one intersection point closest to the view point in the
intersection points;
[0008] step 3: according to illumination, object materials and a normal
direction,
calculating light intensity of reflection rays or refraction rays in the
closest intersection
point determined in the step 2;
[0009] step 4: calculating a direction of rays newly generated after the rays
are reflected
and refracted by the objects in a position of the intersection point;
[0010] step 5: tracing the rays newly generated in the step 4, and judging
whether the
third time reflection or refraction rays are emitted onto a view plane right
in front of a
safety mine lamp or not; if so, calculating the third time reflection light
intensity and/or
refraction light intensity; and otherwise, returning to the step 2 to
redetermine the
closest intersection point, and repeating the step 3 to the step 5;
[0011] step 6: converting the light intensity in the step 5 into a pixel value
through a
camera CCD photosensitive element, emitting rays obtained after the third time
reflection and/or refraction of the rays emitted from the camera onto the view
plane,
2
Date Recue/Date Received 2020-04-27
and performing imaging on the view plane; and
[0012] step 7: eliminating the pixel value of strong light emitted from the
camera in an
image finally shown on the view plane to obtain an image after strong light
source
influence elimination.
[0013] In the step 3, the light intensity of the reflection rays or refraction
rays in the
closest intersection point determined in the step 2 is calculated according to
the
following method:
[0014] calculating the light intensity of the reflection rays in the position
of the
intersection point through a formula (1):
1, = 'a', + li(N = Odth(lciRd +Rs) (1)
[0015] wherein L. represents the light intensity of the reflection rays; IX,
represents an
influence value of environment light in the position of the intersection
point; L
represents the light intensity of incident light; Ka represents a specular
reflectivity
coefficient; Ks represents a diffuse reflectivity coefficient; Rd represents
specular
reflectivity; Rs represents diffuse reflectivity; and N, L and chTv
respectively represent
an object surface normal vector, a ray direction unit vector and a solid
angle;
[0016] or calculating the light intensity of the refraction rays in the
position of the
intersection point through a formula (2):
It = (cos 02/cos 01)(/i ¨ 1,) (2)
[0017] wherein it represents the light intensity of the refraction rays, and
0/ and 02 are
an incidence angle and a refraction angle.
[0018] In the step 5, the rays newly generated in the step 4 are traced
according to the
following methods:
[0019] (1) if the rays do not intersect with any object, giving up the
tracing; if the
intersection point is on a nontransparent object, only calculating the light
intensity of
the reflection rays; if the intersection point is on a transparent object,
calculating the
light intensity of the reflection rays and the light intensity of the
refraction rays, and
tracing the rays obtained by reflecting or refracting the initial rays for
three times; if the
rays obtained by reflecting or refracting the initial rays for three times are
emitted onto
the view plane right in front of the safety mine lamp, calculating the light
intensity of
the rays; and if not, giving up the tracing, and entering the step (2); and
3
Date Recue/Date Received 2020-04-27
[0020] (2) if all reflection and refraction rays generated by the initial rays
are not
emitted onto the view plane right in front of the safety mine lamp,
determining an
intersection point second closest to the view point in the intersection points
of the initial
rays and the objects; repeating the step (1); if the second closest
intersection point does
not meet conditions, sequentially calculating the next closest intersection
point until the
intersection point found meets the conditions.
[0021] In the step 7, the pixel value of the strong light emitted from the
camera is
eliminated in the image finally shown on the view plane to obtain the image
after the
strong light source influence elimination according to the following methods:
[0022] besides light of the safety mine lamp simulated by light emitted from
the camera
underground, i.e., a light source A, other artificial lamp light, i.e., a
light source B also
exists, and meanwhile, the environment light, i.e., an artificial light source
C also exists.
[0023] When the third time reflection rays and/or refraction rays are
irradiated onto the
view plane, the image on the view plane is shown as the following formula:
P (x, y) = R(x, y) = S(x, y) = L(x,y) (3)
[0024] wherein P(x,y) represents the image finally shown on the view plane;
R(x,y)
represents an image shown on the view plane when the camera does not emit
light, i.e.,
the image shown on the view plane when the light source B and the light source
C are
overlapped; S(x,y) represents an image on the view plane when only the camera
emits
light; and L(x,y) represents an image of the environment light, i.e., the
light source C,
on the view plane.
[0025] 1(x, y) = R (x , y) = S (x , y) (4) is set,
[0026] the logarithm is taken at both sides to
obtain
In P (x, y) = In I (x , y) + In L(x , y) (5),
[0027] and the environment light L(x,y) is shown as follows through P(x,y) and
Gaussian kernel convolution of a Gaussian function G(x,y):
L (x, y) = P (x, y) * G (x, y) (6)
_ (x2+y2)
[0028] wherein G (x, y) -- Ae c2 '
[0029] C represents a Gaussian surrounding scale, and .1 is one scale, and
enables
f f G (x , y) dx dy = 1 to be always true. Through the formulas (4), (5) and
(6), it can
4
Date Recue/Date Received 2020-04-27
be obtained:
In R (x , y) = In y) ¨ In(P (x , y) * G(x, y)) ¨ in S(x , y)
[0030] wherein S'(x, y) = e InR(x,y) is set,
[0031] and S'(x,y) is the image after the strong light source influence
elimination.
Advantageous Effect
[0032] Compared with the prior art, the technical solution of the present
invention has
the following beneficial technical effects:
[0033] the present invention changes a conventional thought on image
processing by
utilizing the ray reverse tracing. Conventional methods mostly use methods of
linear
conversion, gamma correction, histogram equalization, anti-sharpening mask,
homomorphic filtering, tone mapping, dark channel algorithm and the like for
the
condition of sudden occurrence of a strong light source, and a processing
effect is not
obvious. The ray reverse tracing technology can effectively eliminate the
interference
of the strong light source, restore the original underground image, and ensure
smooth
proceeding of underground work and life safety of operators.
BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Fig. 1 is a schematic diagram of an opened solid included angle civT I
of a unit
area towards a light source;
[0035] Fig. 2 is a schematic diagram of reflection and refraction receiving of
ray reverse
tracing of the present invention; and
[0036] Fig. 3 is a process of eliminating strong light source interference by
ray reverse
tracing of the present invention.
DETAILED DESCRIPTION OF THE INVENTION
The technical solutions of the present invention are further described below
with
reference to the accompanying drawings and embodiments.
[0037] According to a method for restoring an underground image on the basis
of a ray
reverse tracing technology of the present invention, by aiming at a phenomenon
that
under the conditions of low illuminance, much dust and high dampness in a coal
mine,
a suddenly occurring strong light source may interfere an original video
image, so that
Date Recue/Date Received 2020-04-27
black and white level contrast of the monitoring image is too great, and
information in
the video image cannot be recognized, a ray reverse tracing method is used,
and a pixel
value of the strong light source in a view plane is eliminated, so that
interference of the
strong light source to the original video image is eliminated. As shown in
Fig. 3, a
process of eliminating strong light source interference by ray reverse tracing
of the
present invention concretely includes steps as follows.
[0038] Step 1: an underground camera is supposed as a light source emitting
point, i.e.,
a view point, and rays are emitted into an underground scene. Intensity of the
rays is
equal to light intensity of rays emitted from a safety mine lamp.
[0039] Step 2: all intersection points of all rays and underground objects are
recorded,
and an intersection point closest to the view point in the intersection points
is calculated.
[0040] Step 3: according to illumination, object materials and a normal
direction, light
intensity of reflection rays or refraction rays in the closest intersection
point determined
in the step 2 is calculated.
[0041] The light intensity of the reflection rays in the position of the
intersection point
is calculated through a formula (1):
= + I i(N = L)dc5(KdR(j + K,R5) (1).
[0042] Jr represents the light intensity of the reflection rays. I,K,
represents an influence
value of environment light in the position of the intersection point. /,
represents the light
intensity of incident light. Ka represents a specular reflectivity
coefficient. IC, represents
a diffuse reflectivity coefficient. &represents specular reflectivity. R.,
represents diffuse
reflectivity. N, L and dVv respectively represent an object surface normal
vector, a ray
direction unit vector and a solid angle. As shown in Fig. 1, a horizontal axis
direction
represents an object surface; a longitudinal axis direction represents a
normal vector
direction of the object surface; and the solid angle is defined as an angle of
a projection
area of an underground object on a spherical surface to an observation point
after the
three-dimensional spherical surface is formed by using the camera as the
observation
point.
[0043] Or, the light intensity of the refraction rays in the position of the
intersection
point is calculated through a formula (2):
it = (cos 02/cos 01) (ii ¨ 1,) (2).
6
Date Recue/Date Received 2020-04-27
[0044] it represents the light intensity of the refraction rays, and 0/ and 02
are an
incidence angle and a refraction angle.
[0045] A light and shade effect is only determined jointly by a first
intersected object
surface normal direction, a material, a view point and an illumination
direction, and
illumination intensity, and the second layer and deeper layer rays are not
considered for
ray projection, so that shade, reflection, refraction and fluorescence effects
do not exist.
[0046] Step 4: a direction of rays newly generated after the rays are
reflected and
refracted by the objects in a position of the intersection point is
calculated. The direction
of the rays newly generated is jointly determined by an incidence light
direction, an
object surface normal direction and media.
[0047] Step 5: the rays newly generated in the step 4 is traced, and whether
the third
time reflection or refraction rays are emitted onto the view plane right in
front of a
safety mine lamp or not is judged; if so, the third time reflection light
intensity and/or
refraction light intensity is calculated; and otherwise, flow returns to the
step 2 to
redetermine the closest intersection point, and the step 3 to the step 5 are
repeated.
[0048] After the rays are emitted from the camera, ray tracing is performed as
follows:
the rays may intersect with transparent objects and nontransparent objects or
may not
intersect with any object in the scene after being emitted from the camera.
[0049] (1) If the rays do not intersect with any object, tracing is given up.
If the
intersection point is on the nontransparent object, only the light intensity
of the
reflection rays is calculated. If the intersection point is on the transparent
object, the
light intensity of the reflection rays and the light intensity of refraction
rays are
calculated, and the rays obtained by reflecting or refracting the initial rays
for three
times are traced. If the rays obtained by reflecting or refracting the initial
rays for three
times are emitted onto the view plane right in front of the safety mine lamp,
the light
intensity of the rays is calculated. If not, the tracing is given up, and flow
enters the step
(2).
[0050] (2) If all reflection and refraction rays generated by the initial rays
are not
emitted onto the view plane right in front of the safety mine lamp, an
intersection point
second closest to the view point in the intersection points of the initial
rays and the
objects. The step (1) is repeated. If the second closest intersection point
does not meet
conditions, the next closest intersection point is sequentially calculated
until the
7
Date Recue/Date Received 2020-04-27
intersection point found meets the conditions.
[0051] As shown in Fig. 2, an example for calculating the light intensity of
the reflection
rays and the light intensity of refraction are given concretely as follows.
[0052] It is supposed that in the underground scene, the camera is positioned
in the
position of the view point; light is emitted from the camera; and a
transparent object 01
and a nontransparent object 02 exist. Firstly, an initial ray E is emitted
from the view
point and intersects with the 01 at P1, and a reflection ray R1 and a
refraction ray T1 are
generated. Light intensity of the R1 conforms to a formula
= 1,,,1ai Ii(N1 = Li)dct7(If diRdi IciRs,),
and since the Ri no longer intersect
with other objects, tracing is ended. Light intensity of the Ti conforms to a
formula
= (COsevecos Doi - - The Ti
intersects inside the 01 at Pz, and a reflection
ray R2 and a refraction ray T2 are generated. Light intensity of the R2
conforms to a
formula ir2 = 1a2 1<a2 In (N2 = 1.2)d (.4)2(K R + Ks2 Rs2 ), and light
intensity of the
T2 conforms to a formula It2 = (COS 04/COS 0)(1t1 4.2) - Recursion may be
continuously performed to trace the R2 and the T2. For example, the T2 and 03
intersect
at P3, and since the 03 is nontransparent, only a reflection ray R3 is
generated. Light
intensity of the R3 conforms to a formula
fr3 = la31a3 42(N3 =
L3)dc(3(Kd3Rd3 K53 Rs3 . The R3 finally enters the view
plane.
[0053] 8/ and 02 are an incidence angle and a reflection angle at the position
Pi. 03 and
04 are an incidence angle and a reflection angle at the position P2. IctiKa,
represents
an influence value of the environment light at the position Pi. a2Ka2
represents an
influence value of the environment light at the position Pz. a,Ka3 represents
an
influence value of the environment light at the position P3. I, represents
light intensity
of the ray E, i.e., the light intensity of incidence light of the initial ray.
lf,11, Kd2, and
Kci, respectively represent specular reflectivity coefficients at the
positions Pi. P2 and
P3. Kci, K52, and Ks, respectively represent diffuse reflectivity coefficients
at the
positions Pi. P2 and P3. Rdi Rd2 and Rd3
respectively represent specular
reflectivity at the positions Pi, P2 and P3. R51, Rs2, and Rs3 respectively
represent
diffuse reflectivity at the positions Pi,P2 and P3. N1, Nz, and N3
respectively represent
normal vectors of the object surface at the positions Pi. P2 and P3. Li, L2
and L3
respectively represent unit vectors of ray directions of the initial ray E,
the refraction
8
Date Recue/Date Received 2020-04-27
ray T1 and the refraction ray T2. dodTh, and daT3 respectively represent solid
angles generated at the positions P1, P2 and P3.
[0054] Step 6: the light intensity in the step 5 is converted into a pixel
value through a
camera CCD photosensitive element. The rays obtained after the third time
reflection
and/or refraction of the rays emitted from the camera are emitted onto the
view plane.
Imaging is performed on the view plane.
[0055] Step 7: the pixel value of strong light emitted from the camera is
eliminated in
an image finally shown on the view plane to obtain an image after strong light
source
influence elimination according to the methods as follows.
[0056] Besides light of the safety mine lamp simulated by light emitted from
the camera
underground, i.e., a light source A, other artificial lamp light, i.e., a
light source B also
exists, and meanwhile, environment light, i.e., an artificial light source C
also exists.
[0057] When the third time reflection rays and/or refraction rays are
irradiated onto the
view plane, the image on the view plane may be shown as the following formula:
P (x, y) = R(x , y) = S (x,y) = L(x,y)
(3)-
[0058] P(x,y) represents the image finally shown on the view plane. R(x,y)
represents
an image shown on the view plane when the camera does not emit light, i.e.,
the image
shown on the view plane when the light source B and the light source C are
overlapped.
S(x,y) represents an image on the view plane when only the camera emits light.
L(x,y)
represents an image of the environment light, i.e., the light source C, on the
view plane.
[0059] (x, Y) = R(x,Y) = S(x,Y) (4) is set,
[0060] the logarithm is taken at both sides to
obtain
ln P (x, y) = ln I (x, y) + in L(x, y) (5),
[0061] and the environment light L(x,y) may be shown as follows through P(x,y)
and
Gaussian kernel convolution of a Gaussian function G(x,y):
L(x, y) = P (x y) * G (x, y) (6)
_(x2+3,2)
[0062] wherein G (x, y") = Ae c2
[0063] C represents a Gaussian surrounding scale, and .1 is one scale, and
enables
J f G (x y) dx dy = 1 to be always true. Through the formulas (4), (5) and
(6), it can
9
Date Recue/Date Received 2020-04-27
be obtained:
in R(x , y) = In P (x,y) ¨ In(P (x , y) * G(x, y)) ¨ In S(x, y)
elnR(x,y)
[0064] wherein S'(x, y) = is set,
[0065] and S'(x,y) is the image after the strong light source influence
elimination.
[0066] The present invention utilizes the ray reverse tracing technology.
Under the
condition of greatly reducing the calculation amount of the ray tracing, the
dazzle light
phenomenon of the strong light source on the low-illuminance underground video
image is effectively reduced, so that the effect of restoring the video image
is achieved.
Date Recue/Date Received 2020-04-27