[go: up one dir, main page]

CN111008937B - Picture display method, device and equipment - Google Patents

Picture display method, device and equipment Download PDF

Info

Publication number
CN111008937B
CN111008937B CN201911164432.5A CN201911164432A CN111008937B CN 111008937 B CN111008937 B CN 111008937B CN 201911164432 A CN201911164432 A CN 201911164432A CN 111008937 B CN111008937 B CN 111008937B
Authority
CN
China
Prior art keywords
pixel
pixel points
points
pixel point
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
CN201911164432.5A
Other languages
Chinese (zh)
Other versions
CN111008937A (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.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Zhuhai Baoqu Technology Co Ltd
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 Zhuhai Baoqu Technology Co Ltd filed Critical Zhuhai Baoqu Technology Co Ltd
Priority to CN201911164432.5A priority Critical patent/CN111008937B/en
Publication of CN111008937A publication Critical patent/CN111008937A/en
Application granted granted Critical
Publication of CN111008937B publication Critical patent/CN111008937B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a picture display method, a device and equipment, wherein the method comprises the following steps: if the operation at the target position of the target picture is detected, determining a first display area corresponding to the first ripple; acquiring N first original pixel values corresponding to the N first pixel points; for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, and taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point; and acquiring N first reference pixel points corresponding to the N first pixel points, and displaying the N first reference pixel points in the first display area according to N first pixel values corresponding to the N first reference pixel points. According to the technical scheme, the display effect of the picture corresponding to the enhanced water ripple can be achieved.

Description

Picture display method, device and equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for displaying pictures.
Background
The water ripple is a natural phenomenon, when a stone is thrown into water, the water inlet position of the stone is taken as a wave source to generate ripple, the ripple outwards fluctuates in a ring mode and gradually weakens, and when an object exists under the water ripple, the object under the water surface can look to have a twisting effect due to refraction of light. In the prior art, the simulation of the effect in the picture cannot be realized.
Disclosure of Invention
The embodiment of the invention provides a picture display method, a picture display device and picture display equipment, which can simulate the display of picture distortion effect caused by ripple according to the operation of a user, enhance the display effect of pictures, have simple algorithm and improve the operation efficiency.
In a first aspect, a method for displaying a picture is provided, including:
if an operation at a target position of a target picture is detected, determining a first display area corresponding to first ripple, wherein the first display area is a circular area taking the target position as a circle center, the first display area comprises N first pixel points, and N is a positive integer;
acquiring N first original pixel values corresponding to the N first pixel points, wherein one first pixel point corresponds to one first original pixel value;
for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, and taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, wherein one first pixel point corresponds to one first reference pixel point;
And acquiring N first reference pixel points corresponding to the N first pixel points, and displaying the N first reference pixel points in the first display area according to N first pixel values corresponding to the N first reference pixel points.
With reference to the first aspect, in one possible implementation manner, the determining, according to the physical parameter of the first ripple, a first reference pixel point corresponding to the first pixel point from the N first pixel points includes: and determining a first amplitude corresponding to the first pixel point according to the physical parameters of the first ripple, and determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the first amplitude and the position of the first pixel point.
With reference to the first aspect, in a possible implementation manner, the method further includes: obtaining M pixel points contained in the target picture, wherein the M pixel points contain the N first reference pixel points; obtaining M-N third initial pixel values corresponding to M-N third pixel points except the N first reference pixel points in the M pixel points; the displaying the N first reference pixel points in the first display area according to the N first pixel values corresponding to the N first reference pixel points includes: and dynamically displaying the target picture according to M-N third initial pixel values corresponding to the M-N third pixel points, N first pixel values corresponding to the N first reference pixel points and a preset trigonometric function curve, wherein the preset trigonometric function curve is a graph taking time as an abscissa.
With reference to the first aspect, in one possible implementation manner, after the displaying, in the first display area, the N first reference pixel points according to the N first pixel values corresponding to the N first reference pixel points, the method further includes: for each first pixel point in the N first pixel points, determining a second amplitude corresponding to the first pixel point according to a first amplitude and a first attenuation coefficient corresponding to the first pixel point; determining a second reference pixel point corresponding to the first pixel point from the N first pixel points according to the second amplitude, taking a first original pixel value corresponding to the first pixel point as a second pixel value corresponding to the second reference pixel point, and one first pixel point corresponds to one second reference pixel point; and acquiring N second reference pixel points corresponding to the N first pixel points, and updating and displaying the N second reference pixel points in the first display area according to N second pixel values corresponding to the N second reference pixel points.
With reference to the first aspect, in a possible implementation manner, the method further includes: determining a second display area corresponding to second ripple, wherein the second display area is a circular area taking the target position as a circle center, the radius of the second display area is larger than that of the first display area, the second display area comprises X second pixel points, and X is a positive integer; obtaining X second original pixel values corresponding to the X second pixel points, wherein one second pixel point corresponds to one second original pixel value; for each second pixel point in the X second pixel points, determining a third reference pixel point corresponding to the second pixel point from the X second pixel points according to the physical parameters of the second ripple, taking a second original pixel value corresponding to the second pixel point as a third pixel value corresponding to the third reference pixel point, wherein the physical parameters of the second ripple are obtained by carrying out attenuation calculation according to the physical parameters of the first ripple; and obtaining X third reference pixel points corresponding to the X second pixel points, and displaying the X third reference pixel points in the second display area according to X third pixel values corresponding to the X third reference pixel points.
In a second aspect, there is provided a picture display device comprising:
the first region determining module is used for determining a first display region corresponding to first ripple if an operation at a target position of a target picture is detected, wherein the first display region is a circular ring region taking the target position as a circle center, the first display region comprises N first pixel points, and N is a positive integer;
the first numerical value acquisition module is used for acquiring N first original pixel values corresponding to the N first pixel points, wherein one first pixel point corresponds to one first original pixel value;
the first numerical value determining module is used for determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple for each first pixel point in the N first pixel points, taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, and one first pixel point corresponds to one first reference pixel point;
the first display module is used for acquiring N first reference pixel points corresponding to the N first pixel points, and displaying the N first reference pixel points in the first display area according to the N first pixel values corresponding to the N first reference pixel points.
With reference to the second aspect, in one possible implementation manner, the first numerical determining module is configured to determine a first amplitude corresponding to the first pixel point according to the physical parameter of the first ripple, and determine a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the first amplitude and the position of the first pixel point.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: the second value acquisition module is used for acquiring M pixel points contained in the target picture, wherein the M pixel points contain the N first reference pixel points; the second value obtaining module is further configured to obtain M-N third initial pixel values corresponding to M-N third pixel points, except the N first reference pixel points, in the M pixel points; the first display module is further configured to dynamically display the target picture according to M-N third initial pixel values corresponding to the M-N third pixel points, N first pixel values corresponding to the N first reference pixel points, and a preset trigonometric function curve, where the preset trigonometric function curve is a graph with time as an abscissa.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: the second display module is used for determining a second amplitude corresponding to each first pixel point in the N first pixel points according to the first amplitude and the first attenuation coefficient corresponding to the first pixel point; determining a second reference pixel point corresponding to the first pixel point from the N first pixel points according to the second amplitude, taking a first original pixel value corresponding to the first pixel point as a second pixel value corresponding to the second reference pixel point, and one first pixel point corresponds to one second reference pixel point; and acquiring N second reference pixel points corresponding to the N first pixel points, and updating and displaying the N second reference pixel points in the first display area according to N second pixel values corresponding to the N second reference pixel points.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: the third display module is used for determining a second display area corresponding to second ripple, the second display area is a circular area taking the target position as a circle center, the radius of the second display area is larger than that of the first display area, the second display area comprises X second pixel points, and X is a positive integer; obtaining X second original pixel values corresponding to the X second pixel points, wherein one second pixel point corresponds to one second original pixel value; for each second pixel point in the X second pixel points, determining a third reference pixel point corresponding to the second pixel point from the X second pixel points according to the physical parameters of the second ripple, taking a second original pixel value corresponding to the second pixel point as a third pixel value corresponding to the third reference pixel point, wherein the physical parameters of the second ripple are obtained by carrying out attenuation calculation according to the physical parameters of the first ripple; and obtaining X third reference pixel points corresponding to the X second pixel points, and displaying the X third reference pixel points in the second display area according to X third pixel values corresponding to the X third reference pixel points.
In a third aspect, a picture display device is provided, comprising a processor, a memory, and an input-output interface, the processor, the memory, and the input-output interface being interconnected, wherein the input-output interface is for inputting or outputting data, the memory is for storing application program code for the picture display device to perform the above method, and the processor is configured for performing the above method of the first aspect.
In a fourth aspect, there is provided a computer storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
In the embodiment of the invention, if the operation at the target position of the target picture is detected, a first display area corresponding to the first ripple is determined, wherein the first display area is a circular area taking the target position as a circle center, the first display area comprises N first pixel points, and N is a positive integer; acquiring N first original pixel values corresponding to N first pixel points, wherein one first pixel point corresponds to one first original pixel value; for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, and taking one first pixel point as one first reference pixel point; n first reference pixel points corresponding to the N first pixel points are obtained, and the N first reference pixel points are displayed in the first display area according to N first pixel values corresponding to the N first reference pixel points. The reference pixel point corresponding to the first pixel point is searched in the target picture, the first pixel point is moved to the position of the reference pixel point for display, namely, the pixel value corresponding to the reference pixel point is updated to the pixel value corresponding to the first pixel point, so that the display of the picture distortion effect caused by ripple can be simulated according to the operation of a user, the display effect of the picture is enhanced, the algorithm is simple, and the operation efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a picture display method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a first display area according to an embodiment of the present invention;
FIG. 3a is a schematic diagram of a first pixel according to an embodiment of the present invention;
FIG. 3b is a schematic diagram of another first pixel provided in an embodiment of the present invention;
fig. 4 is a schematic diagram of a first reference pixel according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a trigonometric function curve provided by an embodiment of the present invention;
fig. 6 is a schematic diagram of a first amplitude corresponding to a first pixel point in a first area according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a first display area and a second display area according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a second pixel according to an embodiment of the present invention;
Fig. 9 is a schematic diagram of a terminal display interface according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a composition structure of a picture display device according to an embodiment of the present invention;
fig. 11 is a schematic diagram of a composition structure of a picture display device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a picture display method according to an embodiment of the present invention, as shown in the drawing, the method includes:
s101, if an operation at a target position of a target picture is detected, determining a first display area corresponding to first ripple, wherein the first display area is a circular area taking the target position as a circle center, the first display area comprises N first pixel points, and N is a positive integer.
Here, the target picture may be a picture displayed on a display page of the terminal, and the terminal may include a mobile phone, a computer, a tablet computer, a wearable device, and the like, which is not limited in the embodiment of the present invention. The target position is an arbitrary position in the target picture, and for example, may be a center position, an upper left corner, a lower left corner, an upper right corner, a lower right corner, or the like of the picture, and the operation at the target position of the target picture may include a click operation, a slide operation, a press operation, or the like. When the operation of the user at the target position of the target picture is detected, a first display area corresponding to the first ripple is determined. As shown in fig. 2, fig. 2 is a schematic diagram of a first display area provided in an embodiment of the present invention, in fig. 2, 1 is a target picture, 2 is a first display area, for example, when a clicking operation at a target position o of the target picture is detected, the first display area is a circular area with o as a center, that is, a gray circular area 2 in fig. 2, and the first display area includes N first pixels, that is, an area in the target picture covered by the gray circular area includes N first pixels. It can be understood that the pixel points involved in the embodiment of the invention are all the pixel points in the target picture.
S102, N first original pixel values corresponding to N first pixel points are obtained, and one first pixel point corresponds to one first original pixel value.
Here, the first original pixel value corresponding to the first pixel point is the pixel value corresponding to the pixel point in the target picture. Fig. 3a is a target picture without first ripple, wherein C1 is a pixel point in the target picture, and the pixel value of each pixel point (G1, B1, C1) in fig. 3a is an original pixel value; fig. 3B is a target picture including a first ripple centered on o, where 1 is a target picture, 2 is a first display area corresponding to the first ripple, C1 in fig. 3a and fig. 3B are pixels at the same position and with the same pixel value in the target picture, G1 in fig. 3a and fig. 3B are pixels at the same position and with the same pixel value in the target picture, and B1 in fig. 3a and fig. 3B are pixels at the same position and with the same pixel value in the target picture; for example, in fig. 3a, the original pixel values corresponding to G1, B1, and C1 are G1, B1, and C1, respectively, and then the first original pixel values corresponding to the first pixel points G1, B1, and C1 in fig. 3B are G1, B1, and C1, respectively. Since one first pixel corresponds to one first original pixel value, for N first pixel values, N first original pixel values are obtained.
S103, for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, and taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, wherein one first pixel point corresponds to one first reference pixel point.
In the embodiment of the invention, the first amplitude corresponding to the first pixel point can be determined according to the physical parameters of the first ripple, and the first reference pixel point corresponding to the first pixel point can be determined from N first pixel points according to the first amplitude and the position of the first pixel point. The physical parameters of the first corrugation may include, but are not limited to, profile shape parameters of the first corrugation, such as amplitude, period, etc. of the first corrugation.
Wherein a first pixel corresponds to a first amplitude, the first amplitude being determined by the contour shape of the first corrugation. In the following, as illustrated in fig. 6, k, j1, j2, j0, i1, i2, i0 are 7 first pixel points of N first pixel points, and the first amplitude corresponding to each first pixel point of the 7 first pixel points may be different for the same time, and the first amplitude corresponding to each k, j1, j2, j0 is gradually decreased along the direction of the ray arrow in the figure, and the first amplitude corresponding to each k, i1, i2, i0 is gradually decreased along the opposite direction of the ray arrow in the figure. The first amplitude on the center circle where the first pixel point k is located is maximum with o as the center. Where the first amplitude at i0, j0 is 0, the distance k to i0 may be equal to the distance k to j 0. As shown in the figure, the first amplitude corresponding to the first pixel point i2 is i3, the first amplitude corresponding to the first pixel point j2 is j3, and the first amplitude corresponding to the first pixel point k is k 1.
In a specific implementation, a first reference pixel corresponding to each first pixel in the N first pixels can be obtained through a warping operation formula p1=p0-a×3.6, and a first original pixel value corresponding to the first pixel is used as a first pixel value corresponding to the first reference pixel. Wherein a is a first amplitude corresponding to a first pixel point, p0 is a position coordinate of the first pixel point in the target picture, and p1 is a position coordinate of a first reference pixel point corresponding to the first pixel point in the target picture. p0 may be a coordinate, for example (x 1, y 1), and correspondingly, p1 calculated by the warping operation formula p1=p0—a×3.6 is also a coordinate, for example (x 2, y 2). As shown in fig. 4, fig. 4 is a schematic diagram of a first reference pixel provided in an embodiment of the present invention, in fig. 4, 1 is a target picture, 2 is a first display area corresponding to a first ripple, for example, a corresponding first reference pixel of a first pixel G1 calculated by a warping algorithm is G11, a first original pixel value corresponding to G1 is G1, a first pixel value corresponding to G11 is G2, the first original pixel value corresponding to the first pixel is taken as the first pixel value corresponding to the first reference pixel, that is, G1 corresponding to G1 is taken as G2 corresponding to G11, that is, a pixel value corresponding to the first reference pixel G11 is changed from G2 to G1. It can be seen that the first reference pixel point G11 is a first reference pixel point corresponding to one pixel point of the N first pixel points, and for another N-1 first pixel points of the N first pixel points, the first reference pixel point corresponding to each first pixel point of the N-1 first pixel points can be obtained through the distortion operation formula.
S104, N first reference pixel points corresponding to the N first pixel points are obtained, and the N first reference pixel points are displayed in the first display area according to N first pixel values corresponding to the N first reference pixel points.
In the embodiment of the present invention, since N first reference pixel points corresponding to N first pixel points are obtained, that is, the first reference pixel point corresponding to each first pixel point in the N first pixel points is obtained, for example, for a certain first pixel point in the N first pixel points, the corresponding first pixel value is w2, and then the pixel value of the first reference pixel point corresponding to the first pixel point displayed in the first display area is w2. And displaying N first reference pixel points in the first display area, namely displaying the pixel values corresponding to the N first reference pixel points in the first display area as first pixel values corresponding to the first pixel points. Here, the pixel value of each of the N first reference pixels displayed in the first display area is a first pixel value corresponding to a first pixel corresponding to the first reference pixel.
In one possible implementation manner, M pixel points included in the target picture may also be acquired first; secondly, obtaining M-N third original pixel values corresponding to M-N third pixel points except N first reference pixel points in the M pixel points; and finally, dynamically displaying the target picture according to M-N third initial pixel values corresponding to the M-N third pixel points, N first pixel values corresponding to the N first reference pixel points and a preset trigonometric function curve. The M pixel points comprise N first reference pixel points, and the preset trigonometric function curve is a graph taking time as an abscissa.
Here, the third pixel point is a pixel point included in a region other than the first display region in the target picture, such as point C1 in fig. 3b, and the third pixel point C1 is a third original pixel value C1 corresponding to the third pixel point C1. At the first moment, the pixel value corresponding to the third pixel point is the third original pixel value, and the pixel value of the third pixel point is changed along with the change of time. Fig. 5 is a schematic diagram of a trigonometric function curve according to an embodiment of the present invention, wherein the abscissa is time and the ordinate is amplitude. And inputting all the M-N third pixel points and the N first reference pixel points into a trigonometric function corresponding to a preset trigonometric function curve, wherein the pixel value of the first reference pixel point is the first pixel value, and curve reference pixel points corresponding to the M-N third pixel points and the N first reference pixel points on the preset trigonometric function curve at each moment can be determined.
Taking any one pixel point of the first reference pixel points corresponding to the N first pixel values of the M-N third pixel points as an example for explanation, inputting the position corresponding to the pixel point (namely the position coordinate of the pixel point in the target picture) into a trigonometric function corresponding to a preset trigonometric function curve, and determining the position of a curve reference pixel point corresponding to the pixel point on the preset trigonometric function curve at each moment according to the time change and the amplitude of the trigonometric function curve, so that the pixel value of the pixel point is moved to the curve reference pixel point corresponding to the pixel point according to the time change for display. As shown in fig. 5, the trigonometric function corresponding to the trigonometric function curve through the pixel point (any one of the first reference pixel points corresponding to the N first pixel values and the M-N third pixel points) determines that the curve reference pixel point corresponding to the time t1 is f1, the curve reference pixel point corresponding to the time t2 is f2, and the curve reference pixel point corresponding to the time t3 is f3, so that the curve reference pixel point corresponding to the pixel point at each time can be determined, and the pixel value of the pixel point can be moved to different curve reference pixel points at different times for displaying, thereby generating a disturbed dynamic display effect.
And aiming at other pixel points in the first reference pixel points corresponding to the N first pixel values of the M-N third pixel points, and dynamically displaying the same.
In one possible implementation manner, the picture display can be richer by dynamically displaying the first ripple (i.e. updating and displaying the first ripple at every other time interval), which specifically includes the following steps:
1. and determining a second amplitude corresponding to the first pixel point according to the first amplitude and the first attenuation coefficient corresponding to the first pixel point for each first pixel point in the N first pixel points.
Here, since the first amplitude decreases with time for each first pixel point, the amplitude attenuation formula may be a1=a0×e, where a0 is the first amplitude corresponding to the first pixel point, e is the first attenuation coefficient corresponding to the first pixel point, and a1 is the second amplitude corresponding to the first pixel point.
For each first pixel point in the N first pixel points at the same moment, the first amplitude corresponding to each first pixel point is different, as shown in fig. 6, fig. 6 is a schematic diagram of the first amplitude corresponding to the first pixel point in the first area, in fig. 6, with o as a center, the first amplitude on the circle where the first pixel point k is located is maximum, the first amplitude gradually decreases along k, j1, j2, j0, and the first amplitude gradually decreases along k, i1, i2, i0, where the first amplitude at i0, j0 is 0, and the distance from k to i0 is equal to the distance from k to j 0. The second amplitude corresponding to the first pixel point can be determined according to the amplitude attenuation formula a1=a0×e.
2. And determining a second reference pixel point corresponding to the first pixel point from the N first pixel points according to the second amplitude, taking the first original pixel value corresponding to the first pixel point as the second pixel value corresponding to the second reference pixel point, and one first pixel point corresponds to one second reference pixel point.
Since the second amplitude corresponding to the first pixel point is determined, the second reference pixel point corresponding to the first pixel point can be determined from the N first pixel points according to the second amplitude. In a specific implementation, a second reference pixel point corresponding to the first pixel point may be obtained by the above distortion operation formula p1=p0-a×3.6, where p0 is a position coordinate of the first pixel point in the target picture, p1 is a position coordinate of the first reference pixel point in the target picture, and a is a second amplitude corresponding to the first pixel point. As shown in fig. 6, the calculated k corresponds to the second reference pixel point k1, the calculated j2 corresponds to the second reference pixel point j3, and the calculated i2 corresponds to the second reference pixel point i3; taking the first original pixel value corresponding to the first pixel point as a second pixel value corresponding to the second reference pixel point, namely taking the pixel value corresponding to k as the pixel value corresponding to k1, taking the pixel value corresponding to j2 as the pixel value corresponding to j3, and taking the pixel value corresponding to i2 as the pixel value corresponding to i 3.
The position of the second reference pixel point corresponding to each first pixel point in the N first pixel points can be obtained, and therefore the first original pixel value corresponding to each first pixel point in the N first pixel points is used as the second pixel value corresponding to the second reference pixel point.
3. N second reference pixel points corresponding to the N first pixel points are obtained, and the N second reference pixel points are updated and displayed in the first display area according to N second pixel values corresponding to the N second reference pixel points.
Here, N first reference pixels are displayed in the first display area, and then N second reference pixels are updated and displayed in the first display area, that is, the pixel value of the first reference pixel displayed first is the first pixel value, and the pixel value of the second reference pixel displayed later is the second pixel value, where the first reference pixel and the second reference pixel are the same pixel in the target picture, but the pixel value corresponding to the first reference pixel is different from the pixel value corresponding to the second reference pixel, so that dynamic display of the second reference pixel can be realized, and dynamic display of the target picture can be realized.
In one possible implementation, since the corrugations gradually diffuse outwards, the following steps may be included to show the diffused corrugations:
1. And determining a second display area corresponding to the second ripple, wherein the second display area is a circular area taking the target position as a circle center, the radius of the second display area is larger than that of the first display area, the second display area comprises X second pixel points, and X is a positive integer.
Here, the second display area may be shown in fig. 7, where fig. 7 is a schematic diagram of a first display area and a second display area provided in the embodiment of the present invention, in fig. 7, 1 is a target picture, 2 is the first display area, and 3 is the second display area, and it is understood that the first display area is determined first, and then the second display area is determined, that is, the second display area is a diffused (after the radius becomes larger) first display area, and the first display area and the second display area do not exist at the same time, and in the drawing, the first display area 2 is shown by a dotted line to facilitate the observation that the second display area 3 is obtained after being diffused through the first display area 2. For example, when a click operation at the target position o of the target picture is detected, the first display area 2 with o as the center of the circle, that is, the gray dotted-line circular area 2 in fig. 7, is determined, and then the second display area 3 is determined, that is, the second display area 3 is obtained after the first display area 2 is diffused. The second display area includes X second pixels, that is, the area in the target picture covered by the gray ring area 3 includes X second pixels.
2. And obtaining X second original pixel values corresponding to the X second pixel points, wherein one second pixel point corresponds to one second original pixel value.
Here, the second original pixel value corresponding to the second pixel point is the pixel value corresponding to the pixel point in the target picture. As shown in fig. 8, fig. 8 is a schematic diagram of a second pixel provided in the embodiment of the present invention, in fig. 8, 1 is a target picture, 2 is a first display area, and 3 is a second display area, it can be understood that the first display area 2 is determined first, and in determining the second display area 3, the second display area is a diffused (radius-enlarged) first display area, and the first display area and the second display area do not exist simultaneously, and in fig. 8, the first display area 2 is indicated by a dotted line to facilitate the observation that the second display area 3 is obtained after being diffused through the first display area 2. And H1 is any one of the X second pixel points, and if the pixel value corresponding to the pixel point H1 in the target picture is H1, the second original pixel value corresponding to the second pixel point H1 is H1. Since one second pixel corresponds to one second original pixel value, for X second pixel values, X second original pixel values are obtained.
3. For each second pixel point in the X second pixel points, determining a third reference pixel point corresponding to the second pixel point from the X second pixel points according to the physical parameters of the second ripple, taking a second original pixel value corresponding to the second pixel point as a third pixel value corresponding to the third reference pixel point, and carrying out attenuation calculation on the physical parameters of the second ripple according to the physical parameters of the first ripple.
In the embodiment of the invention, the second amplitude corresponding to the second pixel point can be determined according to the physical parameters of the second ripple, and the third reference pixel point corresponding to the second pixel point can be determined from the X second pixel points according to the second amplitude and the position of the second pixel point.
In a specific implementation, the physical parameters of the first wave may include a movement speed v0 of the first wave, that is, a speed of outward diffusion of the first wave, an attenuation coefficient d corresponding to the speed of outward diffusion of the first wave, an amplitude a0 of the first wave, and an attenuation coefficient e corresponding to the amplitude of the first wave, and the physical parameters of the second wave may include a movement speed v1 of the second wave, that is, a speed of outward diffusion of the second wave, and an amplitude a1 of the second wave. The physical parameters of the second corrugation may include, but are not limited to, profile shape parameters of the second corrugation, such as amplitude, period, etc. of the second corrugation. Wherein a1=a0×e, v1=v0×d.
Since the amplitude a1 of the current second ripple is determined, a third reference pixel corresponding to each second pixel in the X second pixels can be obtained by using a distortion operation formula p1=p0-a×3.6, and the second original pixel value corresponding to the second pixel is used as the third pixel value corresponding to the third reference pixel. For example, if the second original pixel value corresponding to the second pixel point is q3 and the third pixel value corresponding to the third reference pixel point is q4, the pixel value corresponding to the third reference pixel point is changed from q4 to q3.
4. And obtaining X third reference pixel points corresponding to the X second pixel points, and displaying the X third reference pixel points in the second display area according to X third pixel values corresponding to the X third reference pixel points.
In the embodiment of the present invention, since X third reference pixel points corresponding to X second pixel points are obtained, that is, a third reference pixel point corresponding to each of the X second pixel points is obtained, for example, for a pixel value of any one of the X second pixel points being w1, a third pixel value of the third reference pixel point corresponding to the second pixel point is w2, then the pixel value of the third reference pixel point is displayed in the second display area from w2 to w1. And displaying X third reference pixel points in the second display area, namely displaying the pixel values corresponding to the X third reference pixel points in the second display area as third pixel values. Here, the X third reference pixels are X second pixels, and the pixel value of each of the X third reference pixels displayed in the second display area is the third pixel value.
Alternatively, the first display area corresponding to the first ripple may be determined once every time T; acquiring N first original pixel values corresponding to N first pixel points; for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, and taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point; n first reference pixel points corresponding to the N first pixel points are obtained, and the N first reference pixel points are displayed in the first display area according to N first pixel values corresponding to the N first reference pixel points. I.e. generating a first ripple every time T, at which a first display area (i.e. first ripple) is generated; generating a second first display area at a second time T, wherein the first display area is diffused into the second display area; generating a third first display area at a third time T, wherein the first display area is diffused into a second display area and then diffused into the third display area, and the second first display area is diffused into the second display area; by generating a first ripple at intervals of T, a first display area, a second display area, a third display area and the like corresponding to a certain time T0 can be determined, and a plurality of ripples are formed to diffuse outwards simultaneously in visual effect, so that the water ripple phenomenon in the nature is more met.
Through the steps, the simulated water ripple effect on the terminal can be shown in fig. 9, fig. 9 is a schematic diagram of a terminal display interface provided by the embodiment of the invention, fig. 9 is a terminal display interface at a certain moment, after clicking a "wallpaper setting" button on the terminal display interface, in the case that an operation at a target position of a target picture is detected, the ripple displayed at a certain moment can be shown in fig. 9, wherein the target picture under the water ripple shows a distortion effect, so that the target picture corresponding to the displayed water ripple is more realistic.
In the embodiment of the invention, if the operation at the target position of the target picture is detected, a first display area corresponding to the first ripple is determined, wherein the first display area is a circular area taking the target position as a circle center, the first display area comprises N first pixel points, and N is a positive integer; acquiring N first original pixel values corresponding to N first pixel points, wherein one first pixel point corresponds to one first original pixel value; for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, and taking one first pixel point as one first reference pixel point; n first reference pixel points corresponding to the N first pixel points are obtained, and the N first reference pixel points are displayed in the first display area according to N first pixel values corresponding to the N first reference pixel points. The reference pixel point corresponding to the first pixel point is searched in the target picture, the first pixel point is moved to the position of the reference pixel point for display, namely, the pixel value corresponding to the reference pixel point is updated to the pixel value corresponding to the first pixel point, so that the display of the picture distortion effect caused by ripple can be simulated according to the operation of a user, the display effect of the picture is enhanced, the algorithm is simple, and the operation efficiency is improved.
The method of the embodiment of the invention is described above, and the device of the embodiment of the invention is described below.
Referring to fig. 10, fig. 10 is a schematic diagram of a composition structure of a picture display device according to an embodiment of the present invention, where the device 100 includes:
a first region determining module 1001, configured to determine, if an operation at a target position of a target picture is detected, a first display region corresponding to a first ripple, where the first display region is a circular ring region with the target position as a center, and the first display region includes N first pixel points, where N is a positive integer;
here, the target picture may be a picture displayed on a display page of the terminal, and the terminal may include a mobile phone, a computer, a tablet computer, a wearable device, and the like, which is not limited in the embodiment of the present invention. The target position is an arbitrary position in the target picture, and for example, may be a center position, an upper left corner, a lower left corner, an upper right corner, a lower right corner, or the like of the picture, and the operation at the target position of the target picture may include a click operation, a slide operation, a press operation, or the like. When the first region determining module 1001 detects an operation of the user at the target position of the target picture, a first display region corresponding to the first ripple is determined. As shown in fig. 2, fig. 2 is a schematic diagram of a first display area provided in an embodiment of the present invention, in fig. 2, 1 is a target picture, 2 is a first display area, for example, when a clicking operation at a target position o of the target picture is detected, the first display area is a circular area with o as a center, that is, a gray circular area in fig. 2, and the first display area includes N first pixel points, that is, an area in the target picture covered by the gray circular area includes N first pixel points. It can be understood that the pixel points involved in the embodiment of the present invention are all the pixel points in the target picture.
A first value obtaining module 1002, configured to obtain N first original pixel values corresponding to the N first pixel points, where one first pixel point corresponds to one first original pixel value;
here, the first original pixel value corresponding to the first pixel point is the pixel value corresponding to the pixel point in the target picture. Fig. 3a is a target picture without first ripple, wherein C1 is a pixel point in the target picture, and the pixel value of each pixel point (G1, B1, C1) in fig. 3a is an original pixel value; fig. 3B is a target picture including a first ripple, wherein 1 is a target picture, 2 is a first display area corresponding to the first ripple, C1 in fig. 3a and fig. 3B is a pixel point with the same position and the same pixel value in the target picture, G1 in fig. 3a and fig. 3B is a pixel point with the same position and the same pixel value in the target picture, and B1 in fig. 3a and fig. 3B is a pixel point with the same position and the same pixel value in the target picture; for example, in fig. 3a, the original pixel values corresponding to G1, B1, and C1 are G1, B1, and C1, respectively, and then the first original pixel values corresponding to the first pixel points G1, B1, and C1 in fig. 3B are G1, B1, and C1, respectively. Since one first pixel corresponds to one first original pixel value, for N first pixels, the first value obtaining module 1002 obtains N first original pixel values.
A first numerical value determining module 1003, configured to determine, for each first pixel point of the N first pixel points, a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameter of the first ripple, and use a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, where one first pixel point corresponds to one first reference pixel point;
in this embodiment of the present invention, the first value determining module 1003 may determine a first amplitude corresponding to the first pixel according to the physical parameter of the first ripple, and determine a first reference pixel corresponding to the first pixel from the N first pixels according to the first amplitude and the position of the first pixel. The physical parameters of the first corrugation may include, but are not limited to, profile shape parameters of the first corrugation, such as amplitude, period, etc. of the first corrugation.
The first display module 1004 is configured to obtain N first reference pixel points corresponding to the N first pixel points, and display the N first reference pixel points in the first display area according to N first pixel values corresponding to the N first reference pixel points.
In the embodiment of the present invention, since the first display module 1004 obtains N first reference pixel points corresponding to N first pixel points, that is, obtains a first reference pixel point corresponding to each first pixel point in the N first pixel points, for example, for a certain first pixel point in the N first pixel points, the corresponding first pixel value is w2, and then the pixel value of the first reference pixel point corresponding to the first pixel point displayed in the first display area is w2. And displaying N first reference pixel points in the first display area, namely displaying the pixel values corresponding to the N first reference pixel points in the first display area as first pixel values corresponding to the first pixel points. Here, the pixel value of each of the N first reference pixels displayed in the first display area is the first pixel value corresponding to each of the N first pixel points, i.e., the N first reference pixels.
In one possible design, the first value determining module 1003 is configured to determine a first amplitude corresponding to the first pixel according to the physical parameter of the first ripple, and determine a first reference pixel corresponding to the first pixel from the N first pixels according to the first amplitude and the position of the first pixel.
In a specific implementation, the first value determining module 1003 may obtain a first reference pixel corresponding to each first pixel in the N first pixels through a warping operation formula p1=p0-a×3.6, and use a first original pixel value corresponding to the first pixel as a first pixel value corresponding to the first reference pixel. Wherein a is a first amplitude corresponding to a first pixel point, p0 is a position coordinate of the first pixel point in the target picture, and p1 is a position coordinate of a first reference pixel point corresponding to the first pixel point in the target picture. p0 may be a coordinate, for example (x 1, y 1), and correspondingly, p1 calculated by the warping operation formula p1=p0—a×3.6 is also a coordinate, for example (x 2, y 2). As shown in fig. 4, fig. 4 is a schematic diagram of a first reference pixel provided in an embodiment of the present invention, in fig. 4, 1 is a target picture, 2 is a first display area corresponding to a first ripple, for example, a corresponding first reference pixel of a first pixel G1 calculated by a warping algorithm is G11, a first original pixel value corresponding to G1 is G1, a first pixel value corresponding to G11 is G2, the first original pixel value corresponding to the first pixel is taken as the first pixel value corresponding to the first reference pixel, that is, G1 corresponding to G1 is taken as G2 corresponding to G11, that is, a pixel value corresponding to the first reference pixel G11 is changed from G2 to G1. It can be seen that the first reference pixel point G11 is a first reference pixel point corresponding to one pixel point of the N first pixel points, and for another N-1 first pixel points of the N first pixel points, the first reference pixel point corresponding to each first pixel point of the N-1 first pixel points can be obtained through the distortion operation formula.
In one possible design, the apparatus 100 further comprises:
a second value obtaining module 1005, configured to obtain M pixel points included in the target picture, where the M pixel points include the N first reference pixel points;
the second value obtaining module 1005 is further configured to obtain M-N third initial pixel values corresponding to M-N third pixel points, other than the N first reference pixel points, of the M pixel points;
the first display module 1004 is further configured to dynamically display the target picture according to M-N third initial pixel values corresponding to the M-N third pixel points, N first pixel values corresponding to the N first reference pixel points, and a preset trigonometric function curve, where the preset trigonometric function curve is a graph with time as an abscissa.
Here, the third pixel point is a pixel point included in a region other than the first display region in the target picture, such as point C1 in fig. 3b, and the third pixel point C1 is a third original pixel value C1 corresponding to the third pixel point C1. At the first moment, the pixel value corresponding to the third pixel point is the third original pixel value, and the pixel value of the third pixel point is changed along with the change of time. Fig. 5 is a schematic diagram of a trigonometric function curve according to an embodiment of the present invention, wherein an abscissa is time and an ordinate is amplitude corresponding to a pixel point. And inputting all the M-N third pixel points and the N first reference pixel points into a trigonometric function corresponding to a preset trigonometric function curve, wherein the pixel value of the first reference pixel point is the first pixel value, and curve reference pixel points corresponding to the M-N third pixel points and the N first reference pixel points on the preset trigonometric function curve at each moment can be determined.
Taking any one pixel point of the first reference pixel points corresponding to the N first pixel values of the M-N third pixel points as an example for explanation, inputting the position corresponding to the pixel point (namely the position coordinate of the pixel point in the target picture) into a trigonometric function corresponding to a preset trigonometric function curve, and determining the position of a curve reference pixel point corresponding to the pixel point on the preset trigonometric function curve at each moment according to the time change and the amplitude of the trigonometric function curve, so that the pixel value of the pixel point is moved to the curve reference pixel point corresponding to the pixel point according to the time change for display. As shown in fig. 5, the trigonometric function corresponding to the trigonometric function curve through the pixel point (any one of the first reference pixel points corresponding to the N first pixel values and the M-N third pixel points) determines that the curve reference pixel point corresponding to the time t1 is f1, the curve reference pixel point corresponding to the time t2 is f2, and the curve reference pixel point corresponding to the time t3 is f3, so that the curve reference pixel point corresponding to the pixel point at each time can be determined, and the pixel value of the pixel point can be moved to different curve reference pixel points at different times for displaying, thereby generating a disturbed dynamic display effect.
And aiming at other pixel points in the first reference pixel points corresponding to the N first pixel values of the M-N third pixel points, and dynamically displaying the same.
In one possible design, the apparatus 100 further comprises:
a second display module 1006, configured to determine, for each first pixel point of the N first pixel points, a second amplitude corresponding to the first pixel point according to a first amplitude and a first attenuation coefficient corresponding to the first pixel point;
here, since the first amplitude decreases with time for each first pixel point, the amplitude attenuation formula may be a1=a0×e, where a0 is the first amplitude corresponding to the first pixel point, e is the first attenuation coefficient corresponding to the first pixel point, and a1 is the second amplitude corresponding to the first pixel point.
Wherein a first pixel corresponds to a first amplitude, the first amplitude being determined by the contour shape of the first corrugation. In the following, as illustrated in fig. 6, k, j1, j2, j0, i1, i2, i0 are 7 first pixel points of N first pixel points, and the first amplitude corresponding to each first pixel point of the 7 first pixel points may be different for the same time, and the first amplitude corresponding to each k, j1, j2, j0 is gradually decreased along the direction of the ray arrow in the figure, and the first amplitude corresponding to each k, i1, i2, i0 is gradually decreased along the opposite direction of the ray arrow in the figure. The first amplitude on the center circle where the first pixel point k is located is maximum with o as the center. Where the first amplitude at i0, j0 is 0, the distance k to i0 may be equal to the distance k to j 0. As shown in the figure, the first amplitude corresponding to the first pixel point i2 is i3, the first amplitude corresponding to the first pixel point j2 is j3, and the first amplitude corresponding to the first pixel point k is k 1.
The second display module 1006 is further configured to determine, according to the second amplitude, a second reference pixel corresponding to the first pixel from the N first pixels, and use a first original pixel value corresponding to the first pixel as a second pixel value corresponding to the second reference pixel, where one first pixel corresponds to one second reference pixel;
since the second display module 1006 determines the second amplitude corresponding to the first pixel, the second reference pixel corresponding to the first pixel may be determined from the N first pixels according to the second amplitude. In a specific implementation, the second display module 1006 may obtain a second reference pixel corresponding to the first pixel through the above distortion operation formula p1=p0-a×3.6, where p0 is a position coordinate of the first pixel in the target picture, p1 is a position coordinate of the first reference pixel in the target picture, and a is a second amplitude corresponding to the first pixel. As shown in fig. 6, the second display module 1006 calculates that the second reference pixel point corresponding to k is k1, the second reference pixel point corresponding to j2 is j3, and the second reference pixel point corresponding to i2 is i3; taking the first original pixel value corresponding to the first pixel point as a second pixel value corresponding to the second reference pixel point, namely taking the pixel value corresponding to k as the pixel value corresponding to k1, taking the pixel value corresponding to j2 as the pixel value corresponding to j3, and taking the pixel value corresponding to i2 as the pixel value corresponding to i 3.
The position of the second reference pixel point corresponding to each first pixel point in the N first pixel points can be obtained, and therefore the first original pixel value corresponding to each first pixel point in the N first pixel points is used as the second pixel value corresponding to the second reference pixel point.
The second display module 1006 is further configured to obtain N second reference pixel points corresponding to the N first pixel points, and update and display the N second reference pixel points in the first display area according to N second pixel values corresponding to the N second reference pixel points.
Here, N first reference pixels are displayed in the first display area, and then N second reference pixels are updated and displayed in the first display area, that is, the pixel value of the first reference pixel displayed first is the first pixel value, and the pixel value of the second reference pixel displayed later is the second pixel value, where the first reference pixel and the second reference pixel are the same pixel in the target picture, but the pixel value corresponding to the first reference pixel is different from the pixel value corresponding to the second reference pixel, so that dynamic display of the second reference pixel can be realized, and dynamic display of the target picture can be realized.
In one possible design, the apparatus 100 further comprises:
a third display module 1007, configured to determine a second display area corresponding to a second ripple, where the second display area is a circular area with the target position as a center of a circle, a radius of the second display area is greater than a radius of the first display area, and the second display area includes X second pixel points, where X is a positive integer;
here, the second display area may be shown in fig. 7, where fig. 7 is a schematic diagram of a first display area and a second display area provided in the embodiment of the present invention, in fig. 7, 1 is a target picture, 2 is the first display area, and 3 is the second display area, and it is understood that the first display area is determined first, and then the second display area is determined, that is, the second display area is a diffused (after the radius becomes larger) first display area, and the first display area and the second display area do not exist at the same time, and in the drawing, the first display area 2 is shown by a dotted line to facilitate the observation that the second display area 3 is obtained after being diffused through the first display area 2. For example, when a click operation at the target position o of the target picture is detected, the first display area 2 with o as the center of the circle, that is, the gray dotted-line circular area 2 in fig. 7, is determined, and then the second display area 3 is determined, that is, the second display area 3 is obtained after the first display area 2 is diffused. The second display area includes X second pixels, that is, the area in the target picture covered by the gray ring area 3 includes X second pixels.
The third display module 1007 is further configured to obtain X second original pixel values corresponding to the X second pixel points, where one second pixel point corresponds to one second original pixel value;
here, the second original pixel value corresponding to the second pixel point is the pixel value corresponding to the pixel point in the target picture. As shown in fig. 8, fig. 8 is a schematic diagram of a second pixel provided in the embodiment of the present invention, in fig. 8, 1 is a target picture, 2 is a first display area, and 3 is a second display area, it can be understood that the first display area 2 is determined first, and in determining the second display area 3, the second display area is a diffused (radius-enlarged) first display area, and the first display area and the second display area do not exist simultaneously, and in fig. 8, the first display area 2 is indicated by a dotted line to facilitate the observation that the second display area 3 is obtained after being diffused through the first display area 2. And H1 is any one of the X second pixel points, and if the pixel value corresponding to the pixel point H1 in the target picture is H1, the second original pixel value corresponding to the second pixel point H1 is H1. Since one second pixel corresponds to one second original pixel value, for X second pixel values, X second original pixel values are obtained.
The third display module 1007 is further configured to determine, for each second pixel point of the X second pixel points, a third reference pixel point corresponding to the second pixel point from the X second pixel points according to the physical parameter of the second ripple, and use a second original pixel value corresponding to the second pixel point as a third pixel value corresponding to the third reference pixel point, where the physical parameter of the second ripple is obtained by performing attenuation calculation according to the physical parameter of the first ripple;
in the embodiment of the invention, the second amplitude corresponding to the second pixel point can be determined according to the physical parameters of the second ripple, and the third reference pixel point corresponding to the second pixel point can be determined from the X second pixel points according to the second amplitude and the position of the second pixel point.
In a specific implementation, the physical parameters of the first wave may include a movement speed v0 of the first wave, that is, a speed of outward diffusion of the first wave, an attenuation coefficient d corresponding to the speed of outward diffusion of the first wave, an amplitude a0 of the first wave, and an attenuation coefficient e corresponding to the amplitude of the first wave, and the physical parameters of the second wave may include a movement speed v1 of the second wave, that is, a speed of outward diffusion of the second wave, and an amplitude a1 of the second wave. Wherein a1=a0×e, v1=v0×d.
Since the amplitude a1 of the current second ripple is determined, a third reference pixel corresponding to each second pixel in the X second pixels can be obtained by using a distortion operation formula p1=p0-a×3.6, and the second original pixel value corresponding to the second pixel is used as the third pixel value corresponding to the third reference pixel. For example, if the second original pixel value corresponding to the second pixel point is q3 and the third pixel value corresponding to the third reference pixel point is q4, the pixel value corresponding to the third reference pixel point is changed from q4 to q3.
The third display module 1007 is further configured to obtain X third reference pixel points corresponding to the X second pixel points, and display the X third reference pixel points in the second display area according to X third pixel values corresponding to the X third reference pixel points.
In the embodiment of the present invention, since the third display module 1007 obtains X third reference pixel points corresponding to the X second pixel points, that is, obtains a third reference pixel point corresponding to each of the X second pixel points, for example, for a pixel value of a certain second pixel point in the X second pixel points being w1, a third pixel value of the third reference pixel point corresponding to the second pixel point is w2, then the pixel value of the third reference pixel point is displayed in the second display area from w2 to w1. And displaying X third reference pixel points in the second display area, namely displaying the pixel values corresponding to the X third reference pixel points in the second display area as third pixel values. Here, the X third reference pixels are X second pixels, and the pixel value of each of the X third reference pixels displayed in the second display area is the third pixel value.
Alternatively, the first display area corresponding to the first ripple may be determined once every time T; acquiring N first original pixel values corresponding to N first pixel points; for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, and taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point; n first reference pixel points corresponding to the N first pixel points are obtained, and the N first reference pixel points are displayed in the first display area according to N first pixel values corresponding to the N first reference pixel points. I.e. generating a first ripple every time T, at which a first display area (i.e. first ripple) is generated; generating a second first display area at a second time T, wherein the first display area is diffused into the second display area; generating a third first display area at a third time T, wherein the first display area is diffused into a second display area and then diffused into the third display area, and the second first display area is diffused into the second display area; by generating a first ripple at intervals of T, a first display area, a second display area, a third display area and the like corresponding to a certain time T0 can be determined, and a plurality of ripples are formed to diffuse outwards simultaneously in visual effect, so that the water ripple phenomenon in the nature is more met.
Through the steps, the simulated water ripple effect on the terminal can be shown in fig. 9, fig. 9 is a schematic diagram of a terminal display interface provided by the embodiment of the invention, fig. 9 is a terminal display interface at a certain moment, and after clicking a wallpaper setting button on the terminal display interface, the ripple displayed at a certain moment can be shown in fig. 9 under the condition that the operation at the target position of the target picture is detected, wherein the target picture under the water ripple shows a distortion effect, so that the target picture displayed under the water ripple is more realistic.
It should be noted that, in the embodiment corresponding to fig. 10, the content not mentioned may refer to the description of the method embodiment, and will not be repeated here.
In the embodiment of the invention, if the operation at the target position of the target picture is detected, a first display area corresponding to the first ripple is determined, wherein the first display area is a circular area taking the target position as a circle center, the first display area comprises N first pixel points, and N is a positive integer; acquiring N first original pixel values corresponding to N first pixel points, wherein one first pixel point corresponds to one first original pixel value; for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, and taking one first pixel point as one first reference pixel point; n first reference pixel points corresponding to the N first pixel points are obtained, and the N first reference pixel points are displayed in the first display area according to N first pixel values corresponding to the N first reference pixel points. The reference pixel point corresponding to the first pixel point is searched in the target picture, the first pixel point is moved to the position of the reference pixel point for display, namely, the pixel value corresponding to the reference pixel point is updated to the pixel value corresponding to the first pixel point, so that the display of the picture distortion effect caused by ripple can be simulated according to the operation of a user, the display effect of the picture is enhanced, the algorithm is simple, and the operation efficiency is improved.
Referring to fig. 11, fig. 11 is a schematic diagram of a composition structure of a picture display device according to an embodiment of the present invention, where the device 110 includes a processor 1101, a memory 1102, and an input/output interface 1103. The processor 1101 is connected to the memory 1102 and the input-output interface 1103, for example, the processor 1101 may be connected to the memory 1102 and the input-output interface 1103 through a bus.
The processor 1101 is configured to support the picture display device to perform the corresponding functions in the picture display method described in fig. 1. The processor 1101 may be a central processing unit (central processing unit, CPU), a network processor (network processor, NP), a hardware chip or any combination thereof. The hardware chip may be an application specific integrated circuit (application specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), general-purpose array logic (generic array logic, GAL), or any combination thereof.
The memory 1102 is used for storing program codes and the like. Memory 1102 may include Volatile Memory (VM), such as random access memory (random access memory, RAM); the memory 1102 may also include a non-volatile memory (NVM), such as read-only memory (ROM), flash memory (flash memory), hard disk (HDD) or Solid State Drive (SSD); memory 1102 may also include a combination of the above types of memory.
The input/output interface 1103 is used for inputting or outputting data.
The processor 1101 may call the program code to:
if an operation at a target position of a target picture is detected, determining a first display area corresponding to first ripple, wherein the first display area is a circular area taking the target position as a circle center, the first display area comprises N first pixel points, and N is a positive integer;
acquiring N first original pixel values corresponding to the N first pixel points, wherein one first pixel point corresponds to one first original pixel value;
for each first pixel point in the N first pixel points, determining a first reference pixel point corresponding to the first pixel point from the N first pixel points according to the physical parameters of the first ripple, and taking a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the first reference pixel point, wherein one first pixel point corresponds to one first reference pixel point;
and acquiring N first reference pixel points corresponding to the N first pixel points, and displaying the N first reference pixel points in the first display area according to N first pixel values corresponding to the N first reference pixel points.
It should be noted that, implementation of each operation may also correspond to the corresponding description referring to the above method embodiment; the processor 1101 may also cooperate with the input-output interface 1103 to perform other operations in the method embodiments described above.
Embodiments of the present invention also provide a computer storage medium storing a computer program comprising program instructions which, when executed by a computer, cause the computer to perform a method as described in the previous embodiments, which may be part of the above-mentioned picture display device. Such as the processor 1101 described above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in the embodiments may be accomplished by computer programs stored in a computer-readable storage medium, which when executed, may include the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (8)

1. A picture display method, characterized by comprising:
if an operation at a target position of a target picture is detected, determining a first display area corresponding to first ripple, wherein the first display area is a circular area taking the target position as a circle center, the first display area comprises N first pixel points, and N is a positive integer;
acquiring N first original pixel values corresponding to the N first pixel points, wherein one first pixel point corresponds to one first original pixel value;
determining first amplitudes of the first pixel points corresponding to the outline shape of the first ripple for each first pixel point in the N first pixel points, determining first reference pixel points corresponding to the first pixel points based on an operation relation between the position coordinates of the first pixel points and the first amplitudes corresponding to the first pixel points, and taking first original pixel values corresponding to the first pixel points as first pixel values corresponding to the first reference pixel points, wherein one first pixel point corresponds to one first reference pixel point;
Acquiring N first reference pixel points corresponding to the N first pixel points;
obtaining M pixel points contained in the target picture, wherein the M pixel points contain the N first reference pixel points;
obtaining M-N third initial pixel values corresponding to M-N third pixel points except the N first reference pixel points in the M pixel points;
and all the M-N third pixel points and the N first reference pixel points are input into trigonometric functions corresponding to preset trigonometric function curves, curve reference pixel points corresponding to the M-N third pixel points and the N first reference pixel points on the preset trigonometric function curves at each moment are determined, the preset trigonometric function curves are graphs taking time as horizontal coordinates, and third original pixel values corresponding to the M-N third pixel points and first pixel values corresponding to the N first reference pixel points are used as pixel values of the corresponding curve reference pixel points.
2. The method of claim 1, wherein determining a first reference pixel corresponding to each first pixel based on an operational relationship between the position coordinates of the each first pixel and the first amplitude corresponding to each first pixel comprises:
And calculating the position coordinates of each first pixel point and the first amplitude corresponding to each first pixel point according to a first operation rule to obtain a first reference pixel point corresponding to each first pixel point.
3. The method according to claim 2, wherein the method further comprises:
for each first pixel point in the N first pixel points, calculating a second amplitude corresponding to the first pixel point according to a second operation rule between a first amplitude corresponding to the first pixel point and a first attenuation coefficient;
calculating the position coordinates of each first pixel point and the second amplitude corresponding to each first pixel point according to a first operation rule, determining a second reference pixel point corresponding to each first pixel point from the N first pixel points, taking a first original pixel value corresponding to each first pixel point as a second pixel value corresponding to the second reference pixel point, and one first pixel point corresponds to one second reference pixel point;
and acquiring N second reference pixel points corresponding to the N first pixel points, and updating and displaying the N second reference pixel points in the first display area according to N second pixel values corresponding to the N second reference pixel points.
4. The method according to claim 2, wherein the method further comprises:
determining a second display area corresponding to second ripple, wherein the second display area is a circular area taking the target position as a circle center, the radius of the second display area is larger than that of the first display area, the second display area comprises X second pixel points, and X is a positive integer;
obtaining X second original pixel values corresponding to the X second pixel points, wherein one second pixel point corresponds to one second original pixel value;
determining third amplitudes of the second pixel points corresponding to the outline shape of the second ripple for each second pixel point in the X second pixel points, calculating the position coordinates of the second pixel points and the third amplitudes corresponding to the second pixel points according to a first operation rule, determining a third reference pixel point corresponding to the second pixel point from the X second pixel points, and taking a second original pixel value corresponding to the second pixel point as a third pixel value corresponding to the third reference pixel point, wherein the outline shape of the second ripple is obtained by performing attenuation calculation according to the outline shape of the first ripple;
And obtaining X third reference pixel points corresponding to the X second pixel points, and displaying the X third reference pixel points in the second display area according to X third pixel values corresponding to the X third reference pixel points.
5. A picture display device, comprising:
the first region determining module is used for determining a first display region corresponding to first ripple if an operation at a target position of a target picture is detected, wherein the first display region is a circular ring region taking the target position as a circle center, the first display region comprises N first pixel points, and N is a positive integer;
the first numerical value acquisition module is used for acquiring N first original pixel values corresponding to the N first pixel points, wherein one first pixel point corresponds to one first original pixel value;
the first numerical value determining module is configured to determine, for each first pixel point of the N first pixel points, a first amplitude of each first pixel point corresponding to the outline shape of the first ripple, determine, based on an operational relationship between a position coordinate of each first pixel point and the first amplitude corresponding to each first pixel point, a first reference pixel point corresponding to each first pixel point, and use a first original pixel value corresponding to the first pixel point as a first pixel value corresponding to the corresponding first reference pixel point, where one first pixel point corresponds to one first reference pixel point; acquiring N first reference pixel points corresponding to the N first pixel points;
The second value acquisition module is used for acquiring M pixel points contained in the target picture, wherein the M pixel points contain the N first reference pixel points;
the second value obtaining module is further configured to obtain M-N third initial pixel values corresponding to M-N third pixel points, except the N first reference pixel points, in the M pixel points;
the first display module inputs all the M-N third pixel points and the N first reference pixel points into trigonometric functions corresponding to preset trigonometric function curves, and determines curve reference pixel points corresponding to the M-N third pixel points and the N first reference pixel points on the preset trigonometric function curves at each moment, wherein the preset trigonometric function curves are graphs taking time as horizontal coordinates, and third original pixel values corresponding to the M-N third pixel points and first pixel values corresponding to the N first reference pixel points are used as pixel values of the corresponding curve reference pixel points.
6. The apparatus of claim 5, wherein the first numerical determination module is configured to calculate the position coordinate of each first pixel point and the first amplitude corresponding to each first pixel point according to a first operation rule, so as to obtain a first reference pixel point corresponding to each first pixel point.
7. A picture display device comprising a processor, a memory and an input-output interface, the processor, the memory and the input-output interface being interconnected, wherein the input-output interface is for inputting or outputting data, the memory is for storing program code, and the processor is for invoking the program code to perform the method of any of claims 1-4.
8. A computer storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-4.
CN201911164432.5A 2019-11-22 2019-11-22 Picture display method, device and equipment Active CN111008937B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911164432.5A CN111008937B (en) 2019-11-22 2019-11-22 Picture display method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911164432.5A CN111008937B (en) 2019-11-22 2019-11-22 Picture display method, device and equipment

Publications (2)

Publication Number Publication Date
CN111008937A CN111008937A (en) 2020-04-14
CN111008937B true CN111008937B (en) 2023-07-25

Family

ID=70113288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911164432.5A Active CN111008937B (en) 2019-11-22 2019-11-22 Picture display method, device and equipment

Country Status (1)

Country Link
CN (1) CN111008937B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6985148B2 (en) * 2001-12-13 2006-01-10 Microsoft Corporation Interactive water effects using texture coordinate shifting
JP4223447B2 (en) * 2004-08-03 2009-02-12 富士通株式会社 Video generation device
CN101814006A (en) * 2010-04-28 2010-08-25 中兴通讯股份有限公司 Method and device for realizing water ripple special effect

Also Published As

Publication number Publication date
CN111008937A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN113643404B (en) Subdivision method using recursive subdivision of triangles
US9842417B2 (en) Computing device and method for simplifying point cloud of object
CN111709965A (en) Map optimization method and device for sweeping robot
CN113688552A (en) Camera module falling simulation method and device, electronic equipment and medium
CN109741413B (en) Rendering method and device of semitransparent objects in scene and electronic equipment
KR102005492B1 (en) Apparatus and method for simplification of 3d mesh data
CN112306301A (en) Touch data processing method, device, equipment and storage medium
JP5771348B2 (en) Method, apparatus, and computer program for adjusting hyperlink layout size (adjusting hyperlink layout size)
US20190228214A1 (en) Gesture recognition method, device, apparatus, and storage medium
CN109598672B (en) Map road rendering method and device
CN111462278B (en) Depth-based material sequencing rendering method, medium, equipment and device
CN111008937B (en) Picture display method, device and equipment
CN113538624B (en) A method, device, equipment and medium for drawing rounded corners of fan-shaped page elements
CN114494646B (en) Scene rendering method, device and electronic device
CN111402366A (en) Character rendering method and device, electronic equipment and storage medium
CN107977923B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN110689493A (en) A method, device and equipment for processing schlieren pictures of discharge channels
CN113470144B (en) Fillet drawing method, device and equipment for page element and readable medium
CN108507563B (en) Cruise path generation method and device
CN114797109B (en) Object editing methods, apparatuses, electronic devices, and storage media
CN107578476B (en) Visual effect processing method and device for three-dimensional model of medical instrument
CN114299213B (en) Virtual scene display method, device, medium and equipment
CN110097525A (en) A kind of image rendering method, device and calculate equipment
RU2706182C1 (en) Tactile correlated graphic effects
CN114519762B (en) Model normal processing method, device, storage medium and electronic device

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