Image display method and device and electronic equipment

By comparing the moving distance of the second object with the distance threshold between its movement starting point and the first object in the image display method, the object occlusion problem is solved and the image display effect is improved.

CN118939212APending Publication Date: 2024-11-12NANJING OPPO SOFTWARE TECH CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310528123.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the image screen, the phenomenon of mutual occlusion between objects affects the display effect, especially when virtual objects overlap with real objects, which may lead to occlusion problems.

Method used

By obtaining the moving distance of the second object and comparing it with the distance threshold between its movement starting point and the first object, if the moving distance is greater than or equal to the distance threshold, the second object is not displayed, thereby avoiding occlusion.

Benefits of technology

The second object blocks the first object effectively and improves the display effect of the image screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939212A_ABST
    Figure CN118939212A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image display method and device and electronic equipment. The method comprises the steps that under the condition that a first object and a second object are displayed, the corresponding moving distance after the second object moves is obtained, and the moving distance represents the moving distance after the second object starts to move from a moving starting point; comparing the moving distance with a distance threshold value, wherein the distance threshold value is the distance between the moving starting point and the first object; if the moving distance is larger than or equal to the distance threshold value, the second object is not displayed. In this way, the distance between the moving starting point of the second object and the first object can serve as a reference (the distance threshold value), the moving distance of the second object after moving is compared with the reference, and when the moving distance is larger than or equal to the distance threshold value, the second object is not displayed any more; and the condition that the second object shields the first object is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to an image display method, device and electronic device. Background Art

[0002] The displayed image may include a variety of objects. Different objects may be located at different positions in the image. For example, the objects included in the displayed image may include fireworks and people watching the fireworks. However, in some cases, background objects may block foreground objects, thereby affecting the display effect of the image. Summary of the invention

[0003] In view of the above problems, the present application proposes an image display method, device and electronic device to improve the above problems.

[0004] In a first aspect, the present application provides an image display method, which is applied to an electronic device, and the method includes: when displaying a first object and a second object, obtaining a moving distance corresponding to the movement of the second object, the moving distance representing the distance moved by the second object after moving from a moving starting point; comparing the moving distance with a distance threshold, the distance threshold being the distance between the moving starting point and the first object; if the moving distance is greater than or equal to the distance threshold, not displaying the second object.

[0005] In a second aspect, the present application provides an image display device that runs on an electronic device, the device comprising: a moving distance acquisition unit, used to acquire the corresponding moving distance after the second object moves when displaying a first object and a second object, the moving distance representing the distance moved by the second object after moving from a moving starting point; a distance comparison unit, used to compare the moving distance with a distance threshold, the distance threshold being the distance between the moving starting point and the first object; and a display control unit, used to not display the second object if the moving distance is greater than or equal to the distance threshold.

[0006] In a third aspect, the present application provides an electronic device, comprising a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above method.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium having a program code stored therein, wherein the above method is executed when the program code is started and executed by a controller.

[0008] The present application provides an image display method, device and electronic device, which can obtain the corresponding moving distance of the second object after it moves when displaying the first object and the second object, so as to compare the moving distance with the distance threshold, wherein the distance threshold is the distance between the moving starting point and the first object, and when the moving distance is greater than or equal to the distance threshold, the second object is not displayed. Thus, through the above method, the distance between the moving starting point of the second object and the first object can be used as a reference (distance threshold) to compare the moving distance of the second object after it moves with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram showing mutual occlusion between multiple objects is shown;

[0011] Figure 2 A flow chart of an image display method proposed in an embodiment of the present application is shown;

[0012] Figure 3 A schematic diagram of an interest setting interface in an embodiment of the present application is shown;

[0013] Figure 4 A schematic diagram showing a positional relationship between a first object and a second object in an embodiment of the present application;

[0014] Figure 5 A schematic diagram showing another positional relationship between the first object and the second object in an embodiment of the present application;

[0015] Figure 6 A schematic diagram showing the distance between two points in an embodiment of the present application;

[0016] Figure 7 A schematic diagram showing a second object blocking a first object;

[0017] Figure 8 A schematic diagram showing that the second object is not displayed in the embodiment of the present application;

[0018] Fig. 9 A flowchart of an image display method proposed in another embodiment of the present application is shown;

[0019] Fig.10 A flowchart of an image display method proposed in another embodiment of the present application is shown;

[0020] Fig.11 A flowchart of an image display method proposed in another embodiment of the present application is shown;

[0021] Fig.12 A schematic diagram of determining a distance threshold in an embodiment of the present application is shown;

[0022] Fig.13 A schematic diagram of another method for determining a distance threshold in an embodiment of the present application is shown;

[0023] Fig.14 A flowchart of an image display method proposed in another embodiment of the present application is shown;

[0024] Fig.15 A schematic diagram showing the division of the viewing cone in an embodiment of the present application is shown;

[0025] Fig.16 A schematic diagram of a view cone grid in a view cone in an embodiment of the present application is shown;

[0026] Fig.17 A schematic diagram showing a scene represented by an image screen in an embodiment of the present application is shown;

[0027] Fig.18 Shows Fig.17 Schematic diagram of the viewing frustum grid where the object is located;

[0028] Fig.19 A schematic diagram of a viewing cone in an embodiment of the present application is shown;

[0029] Fig. 20 A schematic diagram showing the process stages included in an image display method proposed in an embodiment of the present application;

[0030] Fig.21 A structural block diagram of an image display device proposed in an embodiment of the present application is shown;

[0031] Fig. 22 A structural block diagram of another image display device proposed in an embodiment of the present application is shown;

[0032] Fig.23 A structural block diagram of an electronic device for executing an image display method according to an embodiment of the present application is shown;

[0033] Fig.24It is a storage unit of an embodiment of the present application for storing or carrying a program code for implementing the image display method according to an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] In an image screen (e.g., a game screen, an animation screen, or a real image screen), many objects may be included. Moreover, different objects may have different positions in the image screen. However, in some cases, the objects in the image screen may be moved. For example, in a case where the objects included in the displayed image screen include fireworks and people watching the fireworks, both the fireworks and the people watching the fireworks may be moved.

[0036] The inventors found in their research that when objects can move, different objects may block each other, thus affecting the display effect of the image. Figure 1 As shown, the electronic device can add virtual fireworks to the displayed image (for example, the real image obtained by the image acquisition method). When the virtual fireworks are displayed, the fireworks particles of the virtual fireworks (which can be understood as a light spot after the virtual fireworks explode) can start to move from the explosion point of the virtual fireworks, and may move as shown in FIG. Figure 1 The image shown overlaps with the person watching the fireworks, thus blocking the person's face.

[0037] Therefore, the inventors have proposed an image display method, device, and electronic device in this application that can improve the above-mentioned problems. When displaying a first object and a second object, the corresponding moving distance of the second object after it moves can be obtained to compare the moving distance with a distance threshold, wherein the distance threshold is the distance between the moving starting point and the first object. When the moving distance is greater than or equal to the distance threshold, the second object is not displayed. Thus, through the above-mentioned method, the distance between the moving starting point of the second object and the first object can be used as a reference (distance threshold) to compare the moving distance of the second object after it moves with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object.

[0038] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0039] See also Figure 2 , an image display method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0040] S110: When displaying the first object and the second object, obtain a corresponding moving distance of the second object after the second object moves, where the moving distance represents a distance moved by the second object from a moving starting point.

[0041] In an embodiment of the present application, an object may be an object model (Mesh) or a real object. Among them, an object model may be understood as a virtual object generated by drawing software. For example, an object model may include a character model, a hair model, a clothing model, a firework model, a plant model, etc. The real object may be understood as an object obtained by image acquisition, and the real object is real and not made by software. For example, characters and animals acquired by a camera. Optionally, the first object in an embodiment of the present application may be a real object, and the second object may be an object model. Exemplarily, if the electronic device is an augmented reality device, the first object may be an object in a real image screen acquired by the electronic device through a camera, and the second object may be an object model displayed together with the real image screen. Furthermore, optionally, the first object and the second object may both be object models.

[0042] In the embodiment of the present application, the first object can be understood as a determined object that cannot be blocked. When the electronic device displays an image, the first object can be determined in a variety of ways.

[0043] As a determination method, when an electronic device displays an image, the displayed image can be identified, and the foreground object in the image is used as the first object. Optionally, a foreground area and a background area can be segmented from the image displayed by the electronic device, and then the object in the foreground area is used as the foreground object. Optionally, the foreground area and the background area in the image can be divided based on a related background segmentation algorithm. Furthermore, the area in the image that the user is interested in can be used as the foreground area, and the area outside the area that the user is interested in can be used as the background area. Among them, the area that the user is interested in can be the area that the user who executes the image display method provided in the embodiment of the present application is interested in, or it can be the area that most users are interested in obtained by statistics.

[0044] Optionally, the area of ​​interest to the user may be obtained by manual selection. For example, the electronic device may be provided with an interest setting interface, in which the area of ​​interest to be selected is displayed, and then the electronic device may select the area selected by the user from the area of ​​interest to be selected as the area of ​​interest to the user. Figure 3 As shown, the interest regions to be selected displayed in the interest setting interface may include interest region A, interest region B, interest region C, and interest region D. If the user selects interest region A, the electronic device may use interest region A as the user's interest region. If the user selects interest region A and interest region C, the electronic device may use both interest region A and interest region C as the user's interest region.

[0045] It should be noted that, when there are multiple objects in the region of interest, the multiple objects can all be used as the first object, thereby obtaining multiple first objects.

[0046] As another determination method, when the electronic device displays an image, the object in the image is identified, and when a designated object is identified among the objects included in the image, the designated object is used as the first object. Optionally, the designated object can be a person or an animal. In addition, the designated object can also be configured by the user of the electronic device according to his or her own needs.

[0047] The second object can be understood as an object that can move in the image. For example, fireworks particles, raindrops, clouds, etc. The second object can be in the same image as the first object. For example, Figure 4 As shown, the image screen 10 includes an object 11 and an object 12, wherein the object 11 may be a first object and the object 12 may be a second object. Furthermore, the second object may not be in the same image screen as the first object. For example, the image screen where the second object is located may overlap with the image screen where the first object is located. For example, Figure 5 As shown, the image screen 20 and the image screen 10 are overlapped with each other, and the image screen 10 includes the object 11, and the image screen 20 includes the object 21, wherein the object 11 can be an image, and the object 21 can be a second object. Furthermore, when the image screen where the second object is located and the image screen where the first object is located are overlapped with each other, the image screen where the second object is located can be a transparent area except for the second object, so that in the user's visual perception ( Figure 5 The visual direction indicated by the dashed arrow in the middle) will feel that the second object and the first object are in the same image frame.

[0048] In the embodiment of the present application, the movement starting point can be understood as the position where the second object starts to be displayed and starts to move. There are many ways to determine the movement starting point.

[0049] As a method, the display duration corresponding to the second object can be obtained, and the display duration represents the duration that the second object is in a display state. The moving starting point of the second object is determined based on the display duration, wherein the longer the display duration is, the farther the moving starting point of the second object is from the first object. Optionally, the second object can be an object model, and there can be a corresponding display duration for the object model, which can be configured by the developer of the model. Wherein, in the case where the display duration is used to determine the duration that the corresponding object model is in a display state in the image screen, the display of the object model can be controlled based on the display duration. For example, the display duration corresponding to the second object is t. After the second object starts to be displayed from the moving starting point, the display of the second object will start to be timed. If the timing reaches t, the display of the second object will be cancelled.

[0050] It should be noted that the longer the display time of the second object, the higher the probability that the second object will contact the first object during the movement. Correspondingly, if the display time of the second object is shorter, the second object may not be displayed before it moves to the first object, and thus will not contact the first object.

[0051] As another method, a position may be randomly selected as the starting point of the movement.

[0052] S120: Compare the moving distance with a distance threshold, where the distance threshold is the distance between the moving starting point and the first object.

[0053] In the embodiment of the present application, after the moving starting point is determined, the distance between the moving starting point and the first object can be obtained as the distance threshold. During the movement of the second object, the moving distance of the second object can be obtained in real time, and the moving distance can be compared with the determined distance threshold to determine whether the second object is likely to come into contact with the first object.

[0054] There are multiple ways to determine the distance threshold. As one way, the distance between the center point of the first object and the moving starting point of the second object can be used as the distance threshold. Furthermore, as another way, the distance between a point on the edge of the first object and the moving starting point of the second object can be used as the distance threshold.

[0055] It should be noted that, in the embodiment of the present application, the distance between two points may be the straight-line distance between the two points. Figure 6As shown, there are point P1 and point P2 in the image, wherein the straight-line distance between point P1 and point P2 may be the length L of the line between point P1 and point P2.

[0056] S130: If the moving distance is greater than or equal to the distance threshold, the second object is not displayed.

[0057] If the moving distance of the second object is greater than or equal to the distance threshold, it indicates that the second object may come into contact with the first object and thus block the first object. This situation can be avoided by not displaying the second object.

[0058] For example, Figure 7 and Figure 8 As shown, in Figure 7 and Figure 8 In the figure 40, the first object is represented by the fireworks particles 30, and the fireworks particles 30 are represented by the second object. If the display state of the fireworks particles 30 is not controlled, then when the fireworks particles 30 come into contact with the figure 40, Figure 7 Further, when it is detected that the moving distance of the fireworks particle 30 is greater than the distance threshold, the fireworks particle 30 is not displayed, as shown in FIG. Figure 8 As shown, the fireworks particles 30 can prevent the character 40 from being blocked.

[0059] The present embodiment provides an image display method, in the case of displaying a first object and a second object, the corresponding moving distance of the second object after the movement can be obtained, so as to compare the moving distance with a distance threshold, wherein the distance threshold is the distance between the moving starting point and the first object, and when the moving distance is greater than or equal to the distance threshold, the second object is not displayed. Thus, through the above method, the distance between the moving starting point of the second object and the first object can be used as a reference (distance threshold) to compare the moving distance of the second object after the movement with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object.

[0060] See also Fig. 9 , an image display method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0061] S210: When displaying the first object and the second object, obtain a corresponding moving distance of the second object after the second object moves, where the moving distance represents a distance moved by the second object from a moving starting point.

[0062] S220: Compare the moving distance with a distance threshold, where the distance threshold is the distance between the moving starting point and the first object.

[0063] S230: If the moving distance is greater than or equal to the distance threshold, detecting whether the second object is in contact with the first object.

[0064] Wherein, when the moving distance of the second object is greater than or equal to the distance threshold, the second object has a greater probability of contacting the first object, thereby causing mutual occlusion. Wherein, when detecting that the moving distance of the second object is greater than or equal to the distance threshold, it is possible to detect whether the first object is in contact with the second object to further determine the possibility of the second object blocking the first object. Optionally, it is possible to determine whether the second object is in contact with the first object by comparing the spatial area occupied by the second object after the movement with the spatial area occupied by the first object.

[0065] In an embodiment of the present application, a spatial region is used to characterize the spatial range occupied by the first object as a whole. Among them, the spatial region occupied by the object can be identified by spatial coordinates. Exemplarily, taking the first object as a person, the spatial region occupied by the person in space can be identified by the spatial coordinates of a certain point or multiple points in the person. Correspondingly, the spatial region occupied by the person in space can also be identified by the spatial coordinates of a certain point or multiple points in the object part of the person. In this case, if it is detected that the spatial region occupied by the first object overlaps with the spatial region occupied by the second object, then the first object is in contact with the second object.

[0066] S240: If the second object is in contact with the first object, the second object is not displayed.

[0067] S250: If the second object is not in contact with the first object, keep displaying the second object.

[0068] The image display method provided in this embodiment allows the distance between the moving starting point of the second object and the first object to be used as a reference (distance threshold) to compare the moving distance of the second object after it moves with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object. Moreover, in this embodiment, when it is detected that the moving distance of the second object is greater than or equal to the distance threshold, it will further detect whether the second object is in contact with the first object, and when there is actual contact, the display of the second object will be cancelled, thereby making it possible to more accurately control the display of the second object.

[0069] See also Fig.10 , an image display method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0070] S310: When displaying the first object and the second object, obtain a corresponding moving distance of the second object after the second object moves, where the moving distance represents a distance moved by the second object from a moving starting point.

[0071] S320: Compare the moving distance with a distance threshold, where the distance threshold is the distance between the moving starting point and the first object.

[0072] S330: If the moving distance is greater than or equal to the distance threshold, obtain the moving direction of the second object.

[0073] S340: Detect whether the moving direction of the second object is a specified direction, wherein the specified direction is a direction in which the second object will block the first object after moving.

[0074] S341: If the moving direction is the specified direction, the second object is not displayed.

[0075] S342: If the moving direction is not the specified direction, keep displaying the second object.

[0076] It should be noted that the moving direction of the second object may be random. In this case, the second object may not move towards the first object during the movement. Furthermore, when the moving distance of the second object is greater than or equal to the distance threshold, it will not come into contact with the first object. Furthermore, there may be multiple second objects, and the moving direction of each second object may be different. In this case, if it is detected that the moving distance of the second object is greater than or equal to the distance threshold, then by combining the moving direction of the second object, it can be more accurately determined whether the second object will block the first object.

[0077] Furthermore, as a method, in the case where the moving direction of the second object is detected, after the second object starts to be displayed, it is also possible to first detect whether the moving direction of the second object is the direction of the first object relative to the second object. If the moving direction of the second object is the direction of the first object relative to the second object, the moving distance of the second object is detected to determine whether the display of the second object needs to be cancelled. Correspondingly, if the moving direction of the second object is not the direction of the first object relative to the second object, it is not necessary to detect the moving distance of the second object in real time, thereby reducing the power consumption of the electronic device.

[0078] The image display method provided in this embodiment allows the distance between the moving starting point of the second object and the first object to be used as a reference (distance threshold) to compare the moving distance of the second object after it moves with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object. Moreover, in this embodiment, when it is detected that the moving distance of the second object is greater than or equal to the distance threshold, it will further detect whether the second object is in contact with the first object, and when there is actual contact, the display of the second object will be cancelled, thereby making it possible to more accurately control the display of the second object.

[0079] See also Fig.11 , an image display method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0080] S410: Acquire a package area corresponding to a first object, wherein the package area is used to represent a location of the first object, and at least a portion of the first object is located within the package area.

[0081] Optionally, the wrapping area is an area used to characterize the location of the first object. For example, the wrapping area can be used to specifically characterize the location of the portion of the first object that cannot be blocked. The wrapping area corresponding to the first object can completely wrap the first object, or can also wrap a portion of the first object. For example, the area wrapped by the wrapping area can be the area of ​​the first object that is determined to be unblocked. For example, Fig.12 As shown, the area enclosed by the dotted circle 50 may be the enclosed area corresponding to the first object.

[0082] The shape and size of the wrapping area can be determined according to the first object. Optionally, if the first object is a three-dimensional object, the wrapping area can also be a three-dimensional area. For example, if the first object is a three-dimensional person, the wrapping area corresponding to the first object can be a sphere. Furthermore, the shape of the wrapping area can be determined according to the type of the first object. For example, the wrapping area corresponding to a person can be spherical or circular, and the wrapping area corresponding to a building can be rectangular or cuboid.

[0083] It should be noted that the larger the wrapped area corresponding to the first object is, the earlier the display of the second object can be canceled, so as to more effectively avoid the situation where the second object blocks the first object. However, when displaying the second object, there may be multiple second objects to be displayed, so as to create the desired display effect by displaying multiple second objects together. For example, when the second object is a firework particle, it is necessary to create the explosion effect of the fireworks by moving multiple firework particles. For another example, when the second object is a raindrop, it is necessary to create a rainy scene by multiple raindrops. Therefore, if the second object is not displayed too early in some cases, it may affect the display effect to be created by multiple second objects.

[0084] In order to balance the above situation, as a way, the size of the package area corresponding to the first object can be determined according to the priority of the first object. It should be noted that in the embodiment of the present application, the first object with a higher priority can be understood as a relatively more important first object. In this case, the first object with a higher priority can correspond to a larger package area, and the sizes of the package areas corresponding to the first objects of different priorities will also be different. In the embodiment of the present application, the correspondence between the priority and the package area size can be stored, so that after determining the priority of the first object, the size of the package area corresponding to the first object can be determined by querying the correspondence.

[0085] Optionally, the priority of the first object may be determined according to the type of the first object. For example, as a division method, the first object may be divided into people, animals, and plants, etc. Among them, people may have the highest priority, followed by animals, and the lowest is plants.

[0086] Furthermore, optionally, the priority of the first object can also be determined according to the user's degree of attention. For example, for the first object that the user pays more attention to, a higher priority can be configured so that the movement of the second object will not block the first object that the user pays more attention to. It should be noted that even for the same type of first objects, the degree of user attention may be different. For example, when there are objects that the user is familiar with and objects that the user is not familiar with among the objects included in the image, the user may pay more attention to the objects that the user is familiar with. Among them, after obtaining the first object, the electronic device can obtain the number or frequency of the first object appearing in the photo album of the electronic device, and then the objects whose number or frequency of appearance is greater than the specified threshold are regarded as objects that the user is familiar with.

[0087] Optionally, the electronic device may pre-identify the objects included in each picture in the album, and then obtain the objects included in each picture. Then, the number of times the object included in each picture appears may be counted. Then, the corresponding relationship between the object and the number of occurrences is obtained. After establishing the corresponding relationship between the object and the number of occurrences, after the first object is obtained, it may be queried whether the obtained first object is included in the corresponding relationship. If the obtained first object is not included in the corresponding relationship, it is determined that the first object is an object that the user is not familiar with. If the obtained first object is included in the corresponding relationship, and the number of occurrences of the first object is greater than the number threshold, it is determined that the first object is an object that the user is familiar with. Optionally, the frequency of object occurrence may be the ratio of the number of times the object appears to a specified time length. For example, the specified time length may be a recent period of time. For example, it may be the last week, the last month, or the day.

[0088] Furthermore, the user can also configure the degree of attention of the object by manual configuration. In this case, after acquiring the first object, the electronic device can acquire the determined degree of attention of the first object, and then determine the corresponding priority according to the acquired degree of attention. Among them, as a way, the first object with the lowest priority can be configured with the smallest wrapping area. Furthermore, for the first object with the lowest priority, the corresponding wrapping area may not be configured. In this case, when the second object may block the first object with the lowest priority, the display of the second object will still be maintained.

[0089] S420: Determine a distance threshold according to the designated point in the package area and the moving starting point.

[0090] It should be noted that, in the case where the parcel area represents the location of the first object, the parcel area can be used to determine the distance threshold. The distance involved in the distance threshold can be an SDF (Signed Distance Field) distance. In this case, the parcel area can be understood as an SDF area.

[0091] In the embodiment of the present application, there are multiple ways to determine the distance threshold after the package area is determined.

[0092] As one way, the designated point is the center point of the package area. In this way, the difference between the distance between the center point of the package area and the moving start point and the reference distance value can be used as the distance threshold. The reference distance value is the distance between the center point and the target intersection point. The target intersection point is the intersection point of the line between the center point and the moving start point and the edge of the package area. For example, Fig.12As shown, after the package area 50 is determined, the center point P3 of the package area can be determined, and the moving starting point of the second object is point P4. In this case, the distance between the center point P3 and point P4 is Fig.12 The target intersection point is P5. In this case, the reference distance value is L1, and the determined distance threshold is L2=L-L1.

[0093] As another method, the designated point is a point on the edge of the wrapped area. In this method, the distance between the point on the edge of the wrapped area and the moving start point is used as the distance threshold. For example, Fig.13 As shown, when determining the package area 50 corresponding to the first object, the distance L3 between the point P6 on the edge of the package area 50 and the point P4 (movement starting point) can be used as the distance threshold.

[0094] S430: When displaying the first object and the second object, obtain a corresponding moving distance of the second object after the second object moves, where the moving distance represents a distance moved by the second object from a moving starting point.

[0095] S440: Compare the moving distance with a distance threshold, where the distance threshold is the distance between the moving starting point and the first object.

[0096] S450: If the moving distance is greater than or equal to the distance threshold, the second object is not displayed.

[0097] In the embodiments of the present application, there are multiple ways to achieve not displaying the second object. As one way, not displaying the second object can be understood as no longer rendering the second object, so that the user does not perceive the existence of the second object. Furthermore, as another way, not displaying the second object can also be understood as configuring the transparency of the second object to represent complete transparency, so that the user does not perceive the existence of the second object.

[0098] The present embodiment provides an image display method, which allows the distance between the moving starting point of the second object and the first object to be used as a reference (distance threshold) to compare the moving distance of the second object after it moves with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object. In addition, in the present embodiment, a corresponding package area can be configured for the first object, and the position of the package area is characterized as the position of the first object, and the distance threshold is determined based on the moving starting point and the point on the package area to improve the accuracy of the distance threshold determination. In addition, the shape of the package area can also be determined according to the type of the first object, which is conducive to more accurate determination of the size and range of the package area.

[0099] See also Fig.14 , an image display method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0100] S510: When displaying the first object and the second object, obtain the corresponding moving distances of the plurality of second objects after they move, the moving distances representing the distances moved by the corresponding second objects after they move from the moving starting point, and the second objects are luminous objects.

[0101] S520: Compare the moving distances of the plurality of second objects with their respective distance thresholds, where the distance threshold is the distance between the moving starting point and the first object.

[0102] S530: If there is a second object whose corresponding moving distance is greater than or equal to the corresponding distance threshold, the second object whose moving distance is greater than or equal to the corresponding distance threshold is not displayed.

[0103] S540: Displaying the first object according to the distances between the plurality of second objects and the first object, wherein the closer the second objects are to the first object, the greater the influence of the illumination on the display effect of the first object.

[0104] It should be noted that the light emitted by the luminous object can diffuse in all directions. In this case, objects around the luminous object can be illuminated by the light and produce corresponding lighting effects. Optionally, the lighting effects include brightness effects and color effects.

[0105] Among them, the brightness effect can be understood as the effect of changing the brightness presented by the illuminated object. For example, in the case where the second object is a luminous object, the closer the second object is to the first object, the stronger the illumination received by the first object will be, which will make the first object brighter. Among them, the color effect can be understood as the effect of changing the color presented on the surface of the illuminated object. Among them, the color presented on the surface of the object can be understood as the color seen by the user. For example, the light emitted by the second object is blue, then the color presented by at least part of the surface of the first object illuminated by the blue light will change due to the irradiation of the blue light. For another example, the light emitted by the second object is red, then the color presented by at least part of the surface of the first object illuminated by the red light will change due to the irradiation of the red light. For another example, there are a second object emitting blue light and a second object emitting red light around the first object. In this case, the color presented by some areas of the surface of the first object may be affected by the red light, and the color presented by some areas may be affected by the red light, and even the color presented by some areas may be affected by both the red light and the blue light.

[0106] Furthermore, when the second luminous object is closer to the first object, the color of the light emitted by the second object will change the color of the surface of the first object to a greater extent. The greater the degree of change, the closer the color of the surface of the first object is to the color of the light emitted by the second object, or the more areas of the surface of the first object are affected by the light emitted by the second object.

[0107] In an embodiment of the present application, the displayed scene can be divided based on the view cone to divide the displayed scene into multiple view cone grids. The view cone represents the image acquisition range of the virtual camera, and the visual range corresponding to the virtual camera represents the image content that the user can see. In this case, the luminous object can be located in a certain view cone grid or multiple view cone grids to affect the display effect. The view cone grid that can be affected by the luminous object can be determined according to the distance between the view cone grid and the luminous object (for example, the SDF distance). Furthermore, the display effect of the objects in the view cone grid that can be affected by the luminous object can also be affected by the luminous object, so that cluster rendering can be used to perform scene rendering of multiple light sources (multiple luminous objects) to achieve global illumination rendering.

[0108] For example, Fig.15 As shown, the view cone 60 can be divided into a plurality of view cone grids. Each small grid in the view cone in the image 15 can be understood as a view cone grid. Fig.16 As shown, the shape of the view frustum grid can be Fig.16 The SDF distance of the frustum grid can be obtained by Fig.16 The difference between the SDF distance of a relatively large pyramid O-EFGH and the SDF distance of a relatively small pyramid O-ABCD is obtained.

[0109] like Fig.17 As shown, in Fig.17 The scene shown includes a second object 70 and a second object 71. Fig.16 The way the frustum is divided in Fig.17 By dividing the scene shown in Fig.18 As shown in Fig.18As shown, the second object 70 and the second object 71 are both located in the viewing frustum. Among them, the viewing frustum grids 61, 62, 63 and 64 are relatively close to the second object 70, and thus, the display effects of the objects in the viewing frustum grids 61, 62, 63 and 64 can be affected by the light emitted by the second object 70. Among them, the viewing frustum grids 65, 66, 67 and 68 are relatively close to the second object 71, and thus, the display effects of the objects in the viewing frustum grids 65, 66, 67 and 68 can be affected by the light emitted by the second object 71.

[0110] As shown in the foregoing, the starting point of the movement of the second object can be randomly determined. As a way, a preset display range can be determined, so that the starting point of the movement of the second object is randomly determined within the preset display range. As a way, the preset display range where the starting point is located can be determined based on the position of the virtual camera in the camera coordinate system, the specified scene depth, and the field of view of the virtual camera, wherein the virtual camera represents the user's perspective, and when the virtual camera represents the user's perspective, the visual range corresponding to the virtual camera represents what the user can see. Furthermore, the specified scene depth represents the depth of the preset display range.

[0111] For example, Fig.19 As shown, Fig.19 A schematic diagram of the viewing cone is shown in FIG. Fig.19 The shown viewing cone includes a near plane and a far plane. Among them, the plane formed by point ntl, point ntr, point nbl and point nbr is the near plane. The plane formed by point ftl, point ftr, point fbl and point fbr is the far plane. The starting point of the movement of the second object can be located in the viewing plane between the near plane and the far plane. In this case, the viewing plane can be understood as a preset display range. Among them, the viewing plane can be composed of point I, point J, point K and point R. Among them, point M is the center point of the viewing plane, point N is the midpoint of the line connecting point I and point J, and point Q is the midpoint of the line connecting point I and point R. In this case, the position of the center point of the viewing plane in the coordinate system can be calculated based on the following formula, which is:

[0112] Center point position = eye + normize (center-eye) × distance

[0113] Among them, eye is the position of the virtual camera in the camera coordinate system, distance represents the specified scene depth, and normailize(center-eye)×distance represents the gaze direction vector of the virtual camera.

[0114] Furthermore, in Fig.19 Where MN = distance × tan (Fov / 2), MQ = MN × aspect_ratio, where aspect_ratio is the aspect ratio of the screen, and Fov (Field of View) is Fig.19 The field of view of the cone shown in . Based on the above-mentioned method of obtaining MN and MQ, the positions of point I, point J, point K and point R in the coordinate system can be obtained. The formulas for obtaining point I, point J, point K and point R can be shown as follows:

[0115] R=(Mx-MN.x-MQ.x, My-MN.y-MQ.y, My-MN.z-MQ.z);

[0116] K=(Mx-MN.x+MQ.x, My-MN.y+MQ.y, Mz-MN.z+MQ.z);

[0117] I=(M.x+MN.x-MQ.x, M.y+MN.y-MQ.y, M.z+MN.z-MQ.z);

[0118] J=(M.x+MN.x+MQ.x, M.y+MN.y+MQ.y, M.z+MN.z+MQ.z);

[0119] Among them, Mx, My and Mz represent the spatial coordinates of point M in the coordinate system. MN.x, MN.y and MN.z represent the projection lengths of MN in the X-axis, Y-axis and Z-axis directions in the spatial coordinate system. MQ.x, MQ.y and MQ.z represent the projection lengths of MQ in the X-axis, Y-axis and Z-axis directions in the spatial coordinate system.

[0120] The image display method provided in this embodiment allows the distance between the moving starting point of the second object and the first object to be used as a reference (distance threshold) to compare the moving distance of the second object after moving with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object. In addition, in this embodiment, when there are multiple second objects and the second objects are luminous objects, the first object can be displayed according to the distances between the multiple second objects and the first object, thereby realizing global illumination rendering.

[0121] like Fig. 20As shown, as a division method, the image display method involved in the embodiment of the present application can be divided into three stages, which may include an SDF area definition stage, an SDF use stage, and a rendering stage. Among them, in the SDF area definition stage, a foreground object can be divided from the displayed image, and then a first object is obtained from the foreground object, and a corresponding package area (SDF area) is configured for the first object. In the SDF use stage, a random position can be determined in the view cone of the virtual camera as the starting point for the movement of the second object. After determining the starting point of the movement, the distance threshold can be determined based on the specified point in the package area of ​​the first object and the starting point of the movement. In the object rendering stage, the object to be displayed can be rendered, and the object that is no longer displayed will no longer be rendered.

[0122] See also Fig.21 An image display device 600 provided in an embodiment of the present application runs on an electronic device. The device 600 includes: a moving distance acquisition unit 610, which is used to acquire the corresponding moving distance after the second object moves when displaying a first object and a second object. The moving distance represents the distance moved by the second object after moving from the starting point of the movement. A distance comparison unit 620 is used to compare the moving distance with a distance threshold, and the distance threshold is the distance between the starting point of the movement and the first object. A display control unit 630 is used to not display the second object if the moving distance is greater than or equal to the distance threshold.

[0123] As a method, the display control unit 630 is specifically configured to detect whether the second object is in contact with the first object if the moving distance is greater than or equal to a distance threshold; if the second object is in contact with the first object, the second object is not displayed.

[0124] As a method, the display control unit 630 is specifically used to obtain the moving direction of the second object if the moving distance is greater than or equal to a distance threshold; if the moving direction is a specified direction, the second object is not displayed, wherein the specified direction is the direction in which the second object will cause occlusion of the first object after moving.

[0125] The distance comparison unit 620 is further used to obtain a package area corresponding to the first object, wherein the package area is used to represent the location of the first object, and at least a part of the first object is located in the package area; and determine the distance threshold according to the specified point in the package area and the moving starting point.

[0126] Optionally, the designated point is the center point of the package area. The distance comparison unit 620 is further specifically used to use the difference between the distance between the center point of the package area and the moving starting point and the reference distance value as the distance threshold, the reference distance value is the distance between the center point and the target intersection point, and the target intersection point is the intersection point of the line between the center point and the moving starting point and the edge of the package area.

[0127] Optionally, the designated point is a point on the edge of the wrapped area. The distance comparison unit 620 is further specifically configured to use the distance between a point on the edge of the wrapped area and the moving start point as a distance threshold.

[0128] Optionally, the shape of the wrapping area is determined according to the type of the first object.

[0129] like Fig. 22 As shown, the device 600 also includes:

[0130] The image processing unit 640 is used to identify the displayed image and take the foreground object in the image as the first object. It can also be used to obtain the display time corresponding to the second object, which represents the time the second object is in the display state; based on the display time, the moving starting point of the second object is determined, wherein the longer the display time is, the farther the moving starting point of the second object is from the first object.

[0131] As a method, the display control unit 630 is also used to display the first object according to the distance between the plurality of second objects and the first object, wherein the closer the second object is to the first object, the greater the influence of the lighting on the display effect of the first object.

[0132] An image display device provided in this embodiment allows the distance between the starting point of the movement of the second object and the first object to be used as a reference (distance threshold) through the above method, so as to compare the moving distance of the second object after moving with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object will no longer be displayed, thereby avoiding the situation where the second object blocks the first object.

[0133] It should be noted that the device embodiment in the present application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment and will not be repeated here.

[0134] The following will be combined Fig.23 An electronic device provided by the present application is described.

[0135] See also Fig.23Based on the above-mentioned image display method and device, the embodiment of the present application also provides another electronic device 1000 that can execute the above-mentioned image display method. The electronic device 1000 includes one or more (only one is shown in the figure) processors 102, a memory 104, a network module 106, a sensor module 108 and an audio acquisition device 110 that are coupled to each other. Among them, the memory 104 stores a program that can execute the content of the above-mentioned embodiment, and the processor 102 can execute the program stored in the memory 104.

[0136] Among them, the processor 102 may include one or more processing cores. The processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 104, and calling data stored in the memory 104. Optionally, the processor 102 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). Furthermore, the processor 102 can be an application processor (Application Processor). The processor 102 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but may be implemented separately through a communication chip.

[0137] The memory 104 may include a random access memory (RAM) or a read-only memory (ROM). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.

[0138] The network module 106 is used to implement information exchange between the electronic device 1000 and other devices, for example, to transmit device control instructions, operation request instructions, and status information acquisition instructions, etc. When the electronic device 1000 is specifically a different device, the corresponding network module 106 may be different.

[0139] The sensor module 108 may include at least one sensor. Specifically, the sensor module 108 may include but is not limited to: a light sensor, a motion sensor, a pressure sensor, an infrared heat sensor, a distance sensor, an acceleration sensor, and other sensors.

[0140] Among them, the pressure sensor can be a sensor that detects the pressure generated by pressing on the electronic device 1000. That is, the pressure sensor detects the pressure generated by the contact or pressing between the user and the audio playback device, such as the pressure generated by the contact or pressing between the user's ear and the mobile terminal. Therefore, the pressure sensor can be used to determine whether contact or pressing occurs between the user and the electronic device 1000, and the magnitude of the pressure.

[0141] Among them, the acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the posture of the electronic device 1000 (such as horizontal and vertical screen conversion, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. In addition, the electronic device 1000 can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, etc., which will not be repeated here.

[0142] The audio acquisition device 110 is used to acquire audio signals. Optionally, the audio acquisition device 110 includes a plurality of audio acquisition devices. The audio acquisition device may be a microphone.

[0143] As a method, the network module of the electronic device 1000 is a radio frequency module, which is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The radio frequency module may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, etc. For example, the radio frequency module can exchange information with an external device through the electromagnetic waves sent or received, and then receive audio signals sent by the external device.

[0144] Furthermore, the electronic device 1000 may also include an image acquisition device for image acquisition. For example, a video, a static picture, or a dynamic picture may be taken by the image acquisition device. In addition, the electronic device 1000 may also include a motor driver IC and a motor. The motor may drive the electronic device 1000 to change the device state. For example, when the electronic device 1000 includes a scroll screen, the motor may drive the scroll screen to shrink or expand, so that the electronic device 1000 changes the device state.

[0145] Please refer to Fig.24 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1100 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0146] The computer readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1100 has storage space for program code 1110 that executes any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 1110 can be compressed, for example, in an appropriate form.

[0147] In summary, the image display method, device and electronic device provided by the present application can obtain the corresponding moving distance of the second object after it moves when displaying the first object and the second object, so as to compare the moving distance with the distance threshold, wherein the distance threshold is the distance between the moving starting point and the first object, and when the moving distance is greater than or equal to the distance threshold, the second object is not displayed. Thus, through the above method, the distance between the moving starting point of the second object and the first object can be used as a reference (distance threshold) to compare the moving distance of the second object after it moves with the reference, so that when the moving distance is greater than or equal to the distance threshold, the second object is no longer displayed, thereby avoiding the situation where the second object blocks the first object.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical feature diagrams therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An image display method, characterized in that: Applied to electronic equipment, the method comprises: When the first object and the second object are displayed, a moving distance corresponding to the movement of the second object is acquired, where the moving distance represents the distance moved by the second object after the second object moves from a moving starting point; Comparing the moving distance with a distance threshold, where the distance threshold is the distance between the moving starting point and the first object; If the moving distance is greater than or equal to the distance threshold, the second object is not displayed.

2. The method according to claim 1, characterized in that If the moving distance is greater than or equal to the distance threshold, not displaying the second object includes: If the moving distance is greater than or equal to the distance threshold, detecting whether the second object is in contact with the first object; If the second object contacts the first object, the second object is not displayed.

3. The method according to claim 1, characterized in that: If the moving distance is greater than or equal to the distance threshold, not displaying the second object includes: If the moving distance is greater than or equal to the distance threshold, obtaining the moving direction of the second object; If the moving direction is a specified direction, the second object is not displayed, wherein the specified direction is a direction in which the second object will block the first object after moving.

4. The method according to claim 1, characterized in that The method further comprises: Acquire a package area corresponding to the first object, wherein the package area is used to represent a location of the first object, and at least a portion of the first object is located within the package area; The distance threshold is determined according to the designated point in the wrapped area and the moving starting point.

5. The method according to claim 4, characterized in that The designated point is the center point of the package area, and determining the distance threshold according to the designated point in the package area and the moving starting point includes: The difference between the distance between the center point of the wrapped area and the moving starting point and the reference distance value is used as the distance threshold, and the reference distance value is the distance between the center point and the target intersection point, and the target intersection point is the intersection point of the line between the center point and the moving starting point and the edge of the wrapped area.

6. The method according to claim 4, characterized in that The designated point is a point on the edge of the package area, and determining the distance threshold according to the designated point in the package area and the moving starting point includes: The distance between a point on the edge of the wrapped area and the moving starting point is used as the distance threshold.

7. The method according to claim 4, characterized in that Acquiring a package area corresponding to the first object includes: The shape of the wrapping area is determined according to the type of the first object.

8. The method according to claim 1, characterized in that In the case where the first object and the second object are displayed, before obtaining the corresponding moving distance of the second object after the second object moves, the method further includes: The displayed image is identified, and a foreground object in the image is used as a first object.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: Acquire a display duration corresponding to the second object, where the display duration represents a duration during which the second object is in a display state; A moving starting point of the second object is determined based on the display time, wherein the longer the display time is, the farther the moving starting point of the second object is from the first object.

10. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: Based on the position of the virtual camera in the camera coordinate system, the specified scene depth, and the field of view of the virtual camera, a preset display range where the starting point is located is determined, wherein the virtual camera represents the user's viewing angle.

11. The method according to any one of claims 1 to 8, characterized in that: The second object is a light-emitting object, and there are a plurality of the second objects, and the method further includes: The first object is displayed according to the distances between the plurality of second objects and the first object, wherein the illumination of the second object that is closer to the first object has a greater influence on the display effect of the first object.

12. An image display device, characterized in that: Running on an electronic device, the device comprises: A moving distance acquisition unit, used to acquire a moving distance corresponding to the movement of the second object when the first object and the second object are displayed, wherein the moving distance represents a distance moved by the second object after the second object moves from a moving starting point; a distance comparison unit, configured to compare the moving distance with a distance threshold, wherein the distance threshold is the distance between the moving starting point and the first object; A display control unit is configured to not display the second object if the moving distance is greater than or equal to the distance threshold.

13. An electronic device, characterized in that: including a processor and a memory; One or more programs are stored in the memory and configured to be executed by the processor to implement the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 11 is executed.