Image processing method and device, storage medium and electronic equipment

By adjusting the image areas of the real scene and virtual scene in the XR device, the image comparison information is not lower than the target value, which solves the risk of users misidentifying obstacles in an immersive experience, and improves security and experience quality.

CN119211505APending Publication Date: 2024-12-27GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310766433.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

When the user has an immersive experience, the image comparison information of the real scene and the virtual scene in the XR device is lower than the target value, making it difficult for the user to distinguish obstacles in the real scene from objects in the virtual scene, increasing the risk of injury.

Method used

By obtaining image comparison information of real scenes and virtual scenes, determine areas where image comparison information is lower than the target value, and adjust the pixel values ​​or brightness of these areas so that the image comparison information is not lower than the target value, so that the overlay display on the XR device , enhance image differences and avoid users from mistakenly identifying the real scene as virtual scenes.

Benefits of technology

It effectively reduces the phenomenon of users being injured by mistakenly acknowledging obstacles in real scenes in immersive experiences, and improves the safety and experience quality of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211505A_ABST
    Figure CN119211505A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring a first image of a real scene and a second image of a virtual scene; acquiring image comparison information of the first image and the second image; according to the image comparison information, a first area is determined from the first image, a second area is determined from the second image, and the image comparison information of the first area and the second area is lower than a target comparison value; at least one of the first area and the second area is adjusted, a third image corresponding to the first image and a fourth image corresponding to the second image are obtained, the fourth image is displayed on the third image in an overlapping mode, and image comparison information of the third image and the fourth image is not lower than the target comparison value. According to the method, the phenomenon that the user is injured can be reduced when the user performs immersive experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of electronic technology, and in particular, relates to an image processing method, device, computer-readable storage medium and electronic device. Background Art

[0002] With the development of Extended Reality (XR) technology, XR devices are gradually being used in various industries, such as the film and television industry, education industry, and electronics industry. Among them, XR devices refer to a combination of real and virtual environments that can interact with humans and machines, which are generated by computer technology and wearable devices. It is a general term for various forms such as augmented reality (AR), virtual reality (VR), and mixed reality (MR).

[0003] Users can wear XR devices to watch XR images presented by the XR devices for an immersive experience. However, in the related art, users are prone to getting injured when they are experiencing an immersive experience. Summary of the invention

[0004] The embodiments of the present application provide an image processing method, device, storage medium, and electronic device, which can reduce the possibility of user injuries when the user is experiencing an immersive experience.

[0005] In a first aspect, an embodiment of the present application provides an image processing method, comprising:

[0006] Acquire a first image of a real scene and a second image of a virtual scene;

[0007] Acquire image comparison information between the first image and the second image;

[0008] Determine a first region from the first image and a second region from the second image according to the image contrast information, wherein image contrast information between the first region and the second region is lower than a target contrast value;

[0009] Adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and superimpose the fourth image on the third image, wherein image contrast information between the third image and the fourth image is not lower than a target contrast value.

[0010] In a second aspect, an embodiment of the present application provides an image processing device, including:

[0011] An image acquisition module, used to acquire a first image of a real scene and a second image of a virtual scene;

[0012] An information acquisition module, used to acquire image comparison information between the first image and the second image;

[0013] a region determination module, configured to determine a first region from the first image and a second region from the second image according to the image contrast information, wherein the image contrast information between the first region and the second region is lower than a target contrast value;

[0014] An image display module is used to adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and to superimpose the fourth image on the third image, wherein image contrast information between the third image and the fourth image is not less than a target contrast value.

[0015] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed on a computer, the computer executes the image processing method provided by the embodiment of the present application.

[0016] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the processor is used to execute the image processing method provided in the embodiment of the present application by calling a computer program stored in the memory.

[0017] In an embodiment of the present application, a first image of a real scene and a second image of a virtual scene are obtained; image contrast information of the first image and the second image is obtained; a first area is determined from the first image and a second area is determined from the second image according to the image contrast information, wherein the image contrast information of the first area and the second area is lower than a target contrast value; at least one of the first area and the second area is adjusted to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and the fourth image is superimposed and displayed on the third image, wherein the image contrast information of the third image and the fourth image is not lower than the target contrast value, thereby making the image difference between the third image and the fourth image large, and the user will not confuse the contents of the third image and the fourth image displayed by the XR device when viewing the third image and the fourth image. Therefore, obstacles such as walls or tables in the real scene can be avoided as much as possible based on the XR image displayed by the XR device, thereby reducing the phenomenon of user injuries. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The technical solution and beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.

[0019] Figure 1 It is a flowchart of the image processing method provided in the embodiment of the present application.

[0020] Figure 2 It is a schematic diagram of the first area and the second area provided in an embodiment of the present application.

[0021] Figure 3 It is a schematic diagram of determining whether image contrast information is lower than a target contrast value provided in an embodiment of the present application.

[0022] Figure 4 It is a schematic diagram of adjusting at least one of the first area and the second area provided in an embodiment of the present application.

[0023] Figure 5 It is a schematic diagram of displaying a first image and a second image provided in an embodiment of the present application.

[0024] Figure 6 It is a schematic diagram for determining the first area and the second area provided in an embodiment of the present application.

[0025] Figure 7 This is a first schematic diagram of the first area to be adjusted and the second area to be adjusted provided in an embodiment of the present application.

[0026] Figure 8 This is a second schematic diagram of the first area to be adjusted and the second area to be adjusted provided in an embodiment of the present application.

[0027] Fig. 9 It is a schematic diagram of adjusting the first area to be adjusted and the second area to be adjusted provided in an embodiment of the present application.

[0028] Fig.10 It is a structural schematic diagram of the image processing device provided in an embodiment of the present application.

[0029] Fig.11 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] It should be noted that the terms "first", "second" and "third" in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include steps or modules that are not listed, or some embodiments also include other steps or modules inherent to these processes, methods, products or devices.

[0031] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0032] The embodiments of the present application provide an image processing method, an image processing device, a storage medium, and an electronic device. The execution subject of the image processing method may be the image processing device provided in the embodiments of the present application, or an electronic device integrating the image processing device, wherein the image processing device may be implemented in hardware or software. The electronic device may be a device such as a smart phone, a tablet computer, a PDA, a laptop computer, etc. that is equipped with a processor and has image processing capabilities.

[0033] In order to facilitate understanding of the embodiments of the present application, before describing each embodiment of the present application, some concepts involved in all embodiments of the present application are first appropriately explained, as follows:

[0034] (1) Virtual Reality (VR), also known as virtual technology or virtual environment, is a three-dimensional virtual world created by computer simulation, which provides users with simulation of visual and other senses, allowing users to feel as if they are in the real world and observe things in the three-dimensional space instantly and without restrictions. When the user moves, the computer can immediately perform complex calculations and transmit accurate three-dimensional world images back to create a sense of presence. This technology integrates the latest developments in computer graphics, computer simulation, artificial intelligence, sensing, display and network parallel processing. It is a high-tech simulation system generated with the assistance of computer technology, which allows users to immerse themselves in a simulated virtual reality environment and realize applications in a variety of virtual reality environments such as maps, games, videos, education, medical treatment, simulation, collaborative training, sales, assisted manufacturing, maintenance and repair.

[0035] (2) Augmented Reality (AR) is a technology that uses the position and angle of camera images and image analysis technology to enable the virtual world on the screen to be combined and interact with the real world scene. In other words, it is a technology that calculates the camera's posture parameters in the real world (or three-dimensional world, real world) in real time during the process of the camera capturing images, and adds virtual elements to the image captured by the camera based on the camera posture parameters. Virtual elements include but are not limited to: images, videos and three-dimensional models. The goal of AR technology is to integrate the virtual world with the real world on the screen for interaction.

[0036] (3) Mixed Reality (MR) mixes the real world and the virtual world to create a new visualization environment that contains both real world information and virtual world information. The real world and the virtual world can interact in real time. That is, a simulated setting that integrates computer-created sensory input (virtual objects) with sensory input from a physical setting or its representation. In some MR settings, the computer-created sensory input can adapt to changes in sensory input from the physical setting. In addition, some electronic systems used to run MR settings can monitor the orientation and / or position relative to the physical setting so that virtual objects can interact with real objects (i.e., physical elements from the physical setting or their representations). For example, the system can monitor movement so that virtual plants appear stationary relative to physical buildings.

[0037] (4) Extended Reality (XR) refers to all real and virtual combined environments and human-computer interactions generated by computer technology and wearable devices, which includes virtual reality (VR), augmented reality (AR) and mixed reality (MR) and other forms.

[0038] (5) Extended reality devices (XR devices) are terminals for realizing extended reality effects. They can usually be provided in the form of glasses, head mount displays (HMDs), or contact lenses to realize visual perception and other forms of perception. Of course, the forms of extended reality devices are not limited to these and can be further miniaturized or enlarged according to actual needs.

[0039] (6) Extended reality images (XR images), such as VR images, XR images or MR images, can be displayed by XR devices, thus giving users an immersive experience.

[0040] (7) Virtual scene refers to a virtual world rendered by an electronic device. The virtual scene can be a simulation of the real world, a semi-simulation and semi-fictional virtual world, or a purely fictional virtual world. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene can include the sky, land, ocean, etc. The land can include environmental elements such as deserts and cities, and the user can control the virtual object to move in the virtual scene.

[0041] (9) Real scenes are the real world in which people live. Images of real scenes can be captured by cameras and presented through XR devices. For example, the image of the virtual scene rendered by the XR device can be placed on top of the image of the real scene captured by the XR device for display. Then, the real scene can exist as the background of the virtual scene, thereby providing users with a more realistic immersive experience.

[0042] See also Figure 1 , Figure 1 : is a schematic diagram of the process of the image processing method provided in the embodiment of the present application, and the process may include:

[0043] In 101, a first image of a real scene and a second image of a virtual scene are acquired.

[0044] The following will be further explained with the XR device as the execution subject. It should be noted that the image processing method of the embodiment of the present application can also be jointly executed by the control device and the XR device. The control device can perform corresponding processing operations, and the XR device is only used to display the image processed by the control device. For example, a first image of a real scene and a second image of a virtual scene are obtained by the control device; image contrast information of the first image and the second image is obtained; according to the image contrast information, a first area is determined from the first image, and a second area is determined from the second image, wherein the image contrast information of the first area and the second area is lower than the target contrast value; at least one area of ​​the first area and the second area is adjusted to obtain a third image corresponding to the first image, and a fourth image corresponding to the second image, wherein the image contrast information of the third image and the fourth image is not lower than the target contrast value; and then the XR device is controlled to superimpose the fourth image on the third image.

[0045] In this embodiment, an XR camera is provided on the XR device, and the XR camera is used to capture an image of the real scene to obtain a first image of the real scene. The XR device can also render a virtual scene to obtain a second image of the virtual scene. That is, in this embodiment, the first image is an image obtained by capturing an image of the real scene, and the second image is an image directly rendered by the XR device.

[0046] The sizes of the first image and the second image are compatible with the sizes supported by the display screen. Then, when the sizes of the first image and the second image are not compatible with the sizes supported by the display screen, the sizes of the first image and the second image can be adjusted to make the sizes of the first image and the second image compatible with the sizes supported by the display screen. The first image and the second image can both be color images.

[0047] In 102, image comparison information between the first image and the second image is obtained.

[0048] In 103, according to the image contrast information, a first region is determined from the first image, and a second region is determined from the second image, wherein the image contrast information between the first region and the second region is lower than a target contrast value.

[0049] The image contrast information includes a difference in pixel values ​​or a difference in brightness values.

[0050] Considering that when the user is having an immersive experience, if the image contrast information between the first image and the second image is lower than the target value, such as the difference in pixel values ​​between objects in the virtual scene and objects in the real scene is lower than the target pixel difference, it means that the objects in the virtual scene and the objects in the real scene are similar in color, which may cause the user to mistakenly identify obstacles in the real scene, such as walls or tables, as objects in the virtual scene, and thus fail to avoid them, resulting in user injury.

[0051] Based on the above description, in this embodiment, the XR device can determine image contrast information between the first image and the second image, and determine the first area from the first image and the second area from the second image according to the image contrast information.

[0052] It can be understood that the first area can be the complete area of ​​the first image, or the first area can be a partial area in the first image. The second area can be the complete area of ​​the second image, or the second area can be a partial area in the second image. The first area can be at least one area in the first image, or the second area can be at least one area in the second image.

[0053] It can also be understood that each first region has the same size as the corresponding second region, and each first region has the same position in the first image as the corresponding second region in the second image. Figure 2 shown.

[0054] For example, the XR device may determine the difference between the pixel value of each pixel of the first image and the corresponding pixel of the second image, and then determine the first region from the first image and the second region from the second image, wherein the difference between the pixel value of each pixel of the first region and the pixel value of the corresponding pixel of the second region is less than the target pixel difference.

[0055] For example, Figure 3 As shown, if the difference between the pixel value of each color channel of the pixel point P11 in the first image and the pixel value of the pixel point P21 of the corresponding color channel in the second image is less than the target pixel difference, it is determined that the image contrast information of the pixel point P11 and the pixel point P21 is lower than the target contrast value; if the difference between the pixel value of the pixel point P12 of at least one color channel in the first image and the pixel value of the pixel point P22 of the corresponding color channel in the second image is greater than or equal to the target pixel difference, it is determined that the image contrast information of the pixel point P12 and the pixel point P22 is not lower than the target contrast value.

[0056] The color channels may include a red channel, a green channel, and a blue channel.

[0057] For another example, the XR device may determine the difference between the brightness value of each pixel of the first image and the brightness value of the corresponding pixel of the second image, and then determine the first area from the first image and the second area from the second image, wherein the difference between the brightness value of each pixel of the first area and the brightness value of the corresponding pixel of the second area is lower than the target brightness difference.

[0058] For example, Figure 3 As shown, if the difference in brightness between pixel point P11 in the first image and pixel point P21 in the second image is less than the target brightness difference, it is determined that the image contrast information between pixel point P11 and pixel point P21 is lower than the target contrast value; if the difference in brightness between pixel point P12 in the first image and pixel point P22 in the second image is greater than or equal to the target brightness difference, it is determined that the image contrast information between pixel point P12 and pixel point P22 is not lower than the target contrast value.

[0059] It should be noted that the target pixel difference and the target brightness difference may be pre-set before the device leaves the factory, or may be set by the user after the device leaves the factory, or may be set by the XR device based on certain rules.

[0060] In 104, at least one of the first area and the second area is adjusted to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and the fourth image is superimposed and displayed on the third image, wherein image contrast information between the third image and the fourth image is not less than a target contrast value.

[0061] In this embodiment, after determining the first area and the second area, the XR device can adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and superimpose the fourth image on the third image, wherein the image contrast information between the third image and the fourth image is not lower than the target contrast value, i.e., the difference between the third image and the fourth image is large, so that when the user watches the third image and the fourth image displayed by the XR device, obstacles such as walls or tables in the real scene will not be identified as objects in the virtual scene, and the user can avoid obstacles such as walls or tables in the real scene as much as possible, thereby reducing the phenomenon of user injuries.

[0062] It should be noted that, when the adjustment area is only the first area, the fourth image is the second image, and when the adjustment area is only the second area, the third image is the first image.

[0063] For example, if the difference between the pixel value of each pixel point in the first area and the pixel value of the corresponding pixel point in the second area is less than the target pixel difference, the XR device can increase the pixel value of the pixel point with larger pixel value in the corresponding positions of the first area and the second area and / or reduce the pixel value of the pixel point with smaller pixel value in the corresponding positions of the first area and the second area, so that the difference between the pixel values ​​of the pixel points in the corresponding positions of the first area and the second area is greater than or equal to the target pixel difference, so that the image contrast information between the first area and the second area is not lower than the target contrast value, and thus the image contrast information between the third image and the fourth image is not lower than the target contrast value.

[0064] For example, Figure 4As shown in the figure, assuming that the pixel value of the pixel point P13 in the first area is greater than the pixel value of the pixel point P23 in the second area, and the pixel value of the pixel point P14 in the first area is greater than the pixel value of the pixel point P24 in the second area, the pixel value of the pixel point P13 can be increased, and the pixel value of the pixel point P14 can be increased, so that the difference between the pixel value of the pixel point P13 and the pixel value of the pixel point P23 is greater than or equal to the target pixel difference, and the difference between the pixel value of the pixel point P14 and the pixel value of the pixel point P24 is greater than or equal to the target pixel difference; or, the pixel value of the pixel point P13 can be increased, and the pixel value of the pixel point P14 can be decreased. The pixel value of point P24 is adjusted so that the difference between the pixel value of pixel point P13 and the pixel value of pixel point P23 is greater than or equal to the target pixel difference, and the difference between the pixel value of pixel point P14 and the pixel value of pixel point P24 is greater than or equal to the target pixel difference; or, the pixel value of pixel point P13 can be increased, the pixel value of pixel point P23 can be decreased, and the pixel value of pixel point P14 can be increased, so that the difference between the pixel value of pixel point P13 and the pixel value of pixel point P23 is greater than or equal to the target pixel difference, and the difference between the pixel value of pixel point P14 and the pixel value of pixel point P24 is greater than or equal to the target pixel difference.

[0065] For another example, if the difference between the brightness value of each pixel point in the first area and the brightness value of the corresponding pixel point in the second area is less than the target brightness difference, the XR device can increase the brightness value of the pixel points with larger brightness values ​​in the corresponding positions of the first area and the second area and / or reduce the brightness value of the pixel points with smaller brightness values ​​in the corresponding positions of the first area and the second area, so that the difference between the brightness values ​​of the pixel points in the corresponding positions of the first area and the second area is greater than or equal to the target brightness difference, so that the image contrast information between the first area and the second area is not lower than the target contrast value, and thus the image contrast information between the third image and the fourth image is not lower than the target contrast value.

[0066] For example, Figure 4As shown in FIG. 1 , assuming that the brightness value of the pixel point P13 in the first area is greater than the brightness value of the pixel point P23 in the second area, and the brightness value of the pixel point P14 in the first area is greater than the brightness value of the pixel point P24 in the second area, the brightness value of the pixel point P13 can be increased, and the brightness value of the pixel point P14 can be increased, so that the difference between the brightness value of the pixel point P13 and the brightness value of the pixel point P23 is greater than or equal to the target brightness difference, and the difference between the brightness value of the pixel point P14 and the brightness value of the pixel point P24 is greater than or equal to the target brightness difference; or, the brightness value of the pixel point P13 can be increased, and the brightness value of the pixel point P14 can be decreased. The brightness value of point P24 is adjusted so that the difference between the brightness value of pixel point P13 and the brightness value of pixel point P23 is greater than or equal to the target brightness difference, and the difference between the brightness value of pixel point P14 and the brightness value of pixel point P24 is greater than or equal to the target brightness difference; or, the brightness value of pixel point P13 can be increased, the brightness value of pixel point P23 can be decreased, and the brightness value of pixel point P14 can be increased, so that the difference between the brightness value of pixel point P13 and the brightness value of pixel point P23 is greater than or equal to the target brightness difference, and the difference between the brightness value of pixel point P14 and the brightness value of pixel point P24 is greater than or equal to the target brightness difference.

[0067] It should be noted that, in the embodiments of the present application, Figure 5 As shown, the fourth image is displayed with corresponding transparency, such as 20% transparency, superimposed on the third image with 0% transparency, so as to avoid blocking the third image.

[0068] In an optional embodiment, the image contrast information may further include a transparency difference, and the transparency of the second area may be increased so that the transparency difference between the first area and the second area is not less than a target transparency difference.

[0069] For example, assuming the target transparency difference is 45%, the transparency of the first area is 0%, and the transparency of the second area is 20%, the transparency of the second area can be increased from 20% to 50% so that the difference in transparency between the first area and the second area is not lower than the target transparency difference.

[0070] In this embodiment, a first image of a real scene and a second image of a virtual scene are obtained; image contrast information of the first image and the second image is obtained; a first area is determined from the first image and a second area is determined from the second image according to the image contrast information, wherein image contrast information between the first area and the second area is lower than a target contrast value; at least one of the first area and the second area is adjusted to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and the fourth image is superimposed and displayed on the third image, wherein image contrast information between the third image and the fourth image is not lower than a target contrast value, thereby making the image difference between the third image and the fourth image large, and the user will not confuse the contents of the third image and the fourth image displayed by the XR device when viewing the two images, so that obstacles such as walls or tables in the real scene can be avoided as much as possible based on the XR image displayed by the XR device, and the phenomenon of user injury can be reduced.

[0071] In an optional embodiment, before determining to obtain image comparison information of the first image and the second image, the method further includes:

[0072] Determine whether the ambient light brightness information meets the target adjustment conditions;

[0073] If the ambient light brightness information satisfies the target adjustment condition, the step of acquiring image comparison information between the first image and the second image is performed.

[0074] In an optional embodiment, the ambient light brightness information includes a degree of change in the ambient light brightness, and the target adjustment condition includes that the degree of change in the ambient light brightness is higher than a target degree.

[0075] Considering that the ambient light brightness will affect the brightness of the second image, when the ambient light brightness is high, the brightness of the first image is also high, and when the ambient light brightness is low, the brightness of the first image is also low. However, when the ambient light brightness does not change significantly, that is, the degree of change in the ambient light brightness is not higher than the target degree, the difference in brightness between adjacent first images is not large, and due to the continuity of the image, the difference in brightness between adjacent second images is not large. Therefore, when the ambient light brightness does not change significantly, the first image and the second image of the next frame can be directly processed according to the processing method of the first image and the second image of the previous frame.

[0076] For example, Figure 6As shown, when the XR device acquires the first frame of the first image and the first frame of the second image, the XR device can determine the image contrast information of the first image and the second image, and determine the first area from the first image and the second area from the second image based on the image contrast information, wherein the image contrast information of the first area and the second area is lower than the target contrast value, and then adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and superimpose the fourth image on the third image; when the XR device acquires the second frame of the first image and the second frame of the second image, if the first frame of the first image and the first frame of the second image are acquired, If the difference between the ambient light brightness value collected when acquiring the second frame of the first image and the ambient light brightness value collected when acquiring the second frame of the first image and the second frame of the second image is less than or equal to the target ambient light brightness difference, the XR device can directly determine the area in the second frame of the first image that is the same as the first area in the first frame of the first image as the first area in the second frame of the first image, and determine the area in the second frame of the second image that is the same as the second area in the first frame of the second image as the second area in the second frame of the second image, and then adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and superimpose the fourth image on the third image and display it.

[0077] When the ambient light brightness changes significantly, that is, the degree of change in the ambient light brightness is higher than the target degree, the brightness difference between adjacent first images is large, and due to the continuity of the image, the brightness difference between adjacent second images is not large. Therefore, when the ambient light brightness changes significantly, the XR device cannot directly process the first image and the second image of the next frame according to the processing method of the first image and the second image of the previous frame. Based on this, in this embodiment, when the degree of change in the ambient light brightness is higher than the target degree, the step of obtaining image contrast information between the first image and the second image can be executed, and when the degree of change in the ambient light brightness is not higher than the target degree, the first image and the second image of the next frame can be directly processed according to the processing method of the first image and the second image of the previous frame.

[0078] Wherein, when the difference between the ambient light brightness value acquired by acquiring the first image and the second image of the previous frame and the ambient light brightness value acquired by acquiring the first image and the second image of the current frame is less than or equal to the target ambient light brightness difference, it is determined that the degree of change in ambient light brightness is not higher than the target degree. When the difference between the ambient light brightness value acquired by acquiring the first image and the second image of the previous frame and the ambient light brightness value acquired by acquiring the first image and the second image of the current frame is greater than the target ambient light brightness difference, it is determined that the degree of change in ambient light brightness is higher than the target degree.

[0079] In an optional embodiment, the ambient light brightness information includes a frequency of change of the ambient light brightness, and the target adjustment condition includes that the frequency of change of the ambient light brightness is less than a target frequency.

[0080] Considering that the ambient light brightness will affect the brightness of the second image, if the ambient light brightness is high, the brightness of the first image is also high, and if the ambient light brightness is low, the brightness of the first image is also low. However, when the ambient light brightness changes frequently, such as sometimes brighter and sometimes darker, that is, when the frequency of change of the ambient light brightness is greater than or equal to the target frequency, the difference in brightness between adjacent first images is large, and due to the continuity of the image, the difference in brightness between adjacent second images is not large. Therefore, there will be a situation where at least one of the first area in the previous frame of the first image and the second area in the second image needs to be adjusted, while the first area in the next frame of the first image and any area in the second area in the second image does not need to be adjusted. In this case, in order to avoid the problem of flickering on the display interface of the XR device, the image comparison information of the first image and the second image may not be obtained, but a safety reminder may be given to the user to remind the user to pay attention to safety. That is to say, in this embodiment, the step of obtaining the image comparison information of the first image and the second image may be performed when the frequency of change of the ambient light brightness is less than the target frequency.

[0081] In an optional embodiment, the ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is greater than a first target brightness value.

[0082] Considering that in an extremely bright environment, that is, when the ambient light brightness value is greater than the first target brightness value, the clarity of the first image acquired by the XR device is relatively low compared to the clarity of the first image acquired in a normal environment, and the clarity of the second image is also relatively low due to the setting of corresponding transparency. In this case, if the image contrast information between the first image and the second image is not lower than the target contrast value, since the clarity of the first image and the second image is not much different, it is more likely that the user will not be able to distinguish between objects in the real scene and objects in the virtual scene, resulting in user injury. Based on this, in this embodiment, the step of acquiring image contrast information between the first image and the second image can be performed in an extremely bright environment, that is, when the ambient light brightness value is greater than the first target brightness value; in a normal environment, since the clarity of the first image and the second image is quite different, the user can distinguish between objects in the real scene and objects in the virtual scene based on clarity. Therefore, in order to save processor processing resources, no processing is required.

[0083] In an optional embodiment, the ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is less than a second target brightness value.

[0084] Considering that in an extremely dark environment, that is, when the ambient light brightness value is less than the second target brightness value, the clarity of the first image acquired by the XR device is relatively low compared to the clarity of the first image acquired in a normal environment, and the clarity of the second image is also relatively low due to the setting of corresponding transparency. In this case, if the image contrast information between the first image and the second image is not lower than the target contrast value, since the clarity of the first image and the second image is not much different, it is more likely that the user will not be able to distinguish between objects in the real scene and objects in the virtual scene, resulting in user injury. Based on this, in this embodiment, the step of acquiring image contrast information between the first image and the second image can be performed in an extremely dark environment, that is, when the ambient light brightness value is less than the second target brightness value; in a normal environment, since the clarity of the first image and the second image is quite different, the user can distinguish between objects in the real scene and objects in the virtual scene based on clarity. Therefore, in order to save processing resources of the processor, no processing is required.

[0085] It should be noted that the target ambient light brightness difference, the target frequency, the first target brightness value and the second target brightness value can be pre-set before the device leaves the factory, or can be set by the user after the device leaves the factory, or can be set by the XR device based on certain rules.

[0086] In an optional embodiment, before obtaining the image comparison information of the first image and the second image, the method further includes:

[0087] Determining whether a target object exists in the first image;

[0088] If the target object exists in the first image, the step of obtaining image comparison information between the first image and the second image is performed.

[0089] For example, objects such as walls, tables, pedestrians, etc. can be determined in advance as target objects. After acquiring the first image, the XR device can first detect whether the above-mentioned target object exists in the first image; if the above-mentioned target object exists in the first image, there may be a problem that the user is injured because the user cannot distinguish whether the object seen is an object in the real scene or an object in the virtual scene. Therefore, when the above-mentioned target object exists in the first image, the step of obtaining image contrast information between the first image and the second image can be performed, so that the image contrast information between the first image and the second image is not lower than the target contrast value, so that the user can distinguish whether the object seen is an object in the real scene or an object in the virtual scene, thereby reducing the phenomenon of user injury.

[0090] In an optional embodiment, adjusting at least one of the first area and the second area includes:

[0091] Acquire multiple candidate adjustment ratios, and determine a target adjustment ratio from the multiple candidate adjustment ratios, where the target adjustment ratio is used to describe the ratio of the area of ​​a first region to be adjusted in the first region to the area of ​​a second region to be adjusted in the second region, where a position of the first region to be adjusted in the first region is different from a position of the second region to be adjusted in the second region;

[0092] According to the target adjustment ratio, determining a first area to be adjusted from the first area, and determining a second area to be adjusted from the second area;

[0093] The first area to be adjusted is adjusted, and the second area to be adjusted is adjusted.

[0094] For example, assuming that multiple candidate adjustment ratios are 1:1, 1:2 and 1:3 respectively, then when the target adjustment ratio determined by the XR device is 1:1, the XR device can determine the left half area in the first area as the first area to be adjusted, and determine the right half area in the second area as the second area to be adjusted; the XR device can also determine the left 2 / 3 area in the first area as the first area to be adjusted, and determine the right 2 / 3 area in the second area as the second area to be adjusted, and the XR device can also determine the upper half area in the first area as the first area to be adjusted, and determine the lower half area in the second area as the second area to be adjusted; when the target adjustment ratio determined by the XR device is 1:2, the XR device can determine the left 1 / 3 area in the first area as the first area to be adjusted, and determine the right 2 / 3 area in the second area as the second area to be adjusted; the XR device can also determine the upper 1 / 3 area in the first area as the first area to be adjusted, and determine the lower 2 / 3 area in the second area as the second area to be adjusted. For example, assuming that the target adjustment ratio determined by the XR device is 1:1, the first area to be adjusted and the second area to be adjusted can be as follows: Figure 7 As shown, it can also be Figure 8 shown.

[0095] For example, if the difference between the brightness value of each pixel in the first area and the brightness value of the corresponding pixel in the second area is less than the target brightness difference, and the brightness value of each pixel in the first area is greater than the brightness value of the corresponding pixel in the second area, the XR device can increase the brightness value of the first area to be adjusted and reduce the brightness value of the pixels in the second area to be adjusted, so that the difference between the brightness values ​​of the pixels at corresponding positions in the first area and the second area is greater than or equal to the target brightness difference, so that the image contrast information between the first area and the second area is not lower than the target contrast value, and thus the image contrast information between the third image and the fourth image is not lower than the target contrast value.

[0096] For example, Fig. 9As shown, assuming that the brightness value of pixel point P15 in the first area is greater than the brightness value of pixel point P25 in the second area, and the brightness value of pixel point P16 in the first area is greater than the brightness value of pixel point P26 in the second area, since pixel point P15 is in the first area to be adjusted, the brightness value of pixel point P15 can be increased, and since pixel point P26 is in the second area to be adjusted, the brightness value of pixel point P26 can be reduced, so that the difference between the brightness value of pixel point P15 and the brightness value of pixel point P25 is greater than or equal to the target brightness difference, and the difference between the brightness value of pixel point P16 and the brightness value of pixel point P26 is greater than or equal to the target brightness difference.

[0097] In an optional embodiment, determining a target adjustment ratio from a plurality of candidate adjustment ratios includes:

[0098] If the target object exists in the first region, the candidate adjustment ratio corresponding to the second region to be adjusted with the largest area among the plurality of candidate adjustment ratios is determined as the target adjustment ratio.

[0099] Taking into account that when there is a target object in the first area, if the adjusted area in the first area is large, the user may not be able to recognize the target object, which may cause injury to the user. Based on this, in this embodiment, when there is a target object in the first area, the candidate adjustment ratio with the largest area of ​​the second area to be adjusted corresponding to multiple candidate adjustment ratios can be determined as the target adjustment ratio.

[0100] For example, assuming that multiple candidate adjustment ratios are 1:1, 1:2 and 1:3 respectively, then it can be determined that the area of ​​the second region to be adjusted corresponding to the candidate adjustment ratio 1:3 is the largest, and the candidate adjustment ratio 1:3 can be determined as the target adjustment ratio.

[0101] In an optional embodiment, determining a target adjustment ratio from a plurality of candidate adjustment ratios includes:

[0102] Obtain scores for multiple candidate adjustment ratios;

[0103] The candidate adjustment ratio with the highest score among the multiple candidate adjustment ratios is determined as the target adjustment ratio.

[0104] For example, when the user stops the immersive experience, the XR device can allow the user to score the third image and the fourth image presented to it, and use the scores as the scores of the candidate adjustment ratios corresponding to the third image and the fourth image. The XR device can calculate the average score of each candidate adjustment ratio, and use the average score as the score of each candidate adjustment ratio; after determining the first area and the second area, the XR device can determine the candidate adjustment ratio with the highest score among the multiple candidate adjustment ratios as the target adjustment ratio.

[0105] In an optional embodiment, when the frequency of change of ambient light is greater than or equal to the target frequency, the image comparison information of the first image and the second image will not be processed. Then, there may be a situation where the user cannot distinguish between objects in the real scene and objects in the virtual scene. Therefore, it is necessary to provide safety prompts to the user to minimize the phenomenon of user injury. Based on this, when the frequency of change of ambient light is greater than or equal to the target frequency, the XR device can also output prompt information to provide safety prompts to the user.

[0106] In an optional embodiment, acquiring a first image of a real scene includes:

[0107] Get color depth images of real scenes;

[0108] The color depth image is transformed into an XR image to obtain the first image of the real scene.

[0109] For example, a color depth (RGB-D) camera may be provided on the XR device, and the color depth image of the real scene may be obtained by collecting images of the real scene through the RGB-D camera. Then, the XR device may perform XR transformation processing on the color depth image to obtain the first image of the real scene.

[0110] Specifically, the XR device can distort the color depth image through projection transformation, change the FOV (field of view) to adapt to the human eye, then match the cropping size with the screen display size, and finally compensate for the display optical distortion after image pre-distortion to obtain the first image of the real scene.

[0111] It should be noted that the solution provided by the relevant technology for transforming a color depth image into an XR image may also be used to transform the color image of the real scene into the first image of the real scene.

[0112] In an optional embodiment, the XR device may further adjust the transparency of the first image and / or the second image according to the current ambient light brightness when there is no target object in the first image, and display the first image and the second image with adjusted transparency.

[0113] For example, adjusting the transparency of the first image and the second image according to the current ambient light brightness may include: storing a first target mapping relationship and a second target mapping relationship between ambient light brightness and transparency in the XR device, determining a first corrected transparency of the first image based on the first target mapping relationship and the current ambient light brightness, and determining a second corrected transparency of the second image based on the second target mapping relationship and the current ambient light brightness; correcting the transparency of the first image according to the first corrected transparency, and correcting the transparency of the second image according to the second corrected transparency.

[0114] In an optional embodiment, the greater the ambient light brightness, the higher the transparency of the first image and the lower the transparency of the second image, and the smaller the ambient light brightness, the lower the transparency of the first image and the higher the transparency of the second image.

[0115] In an optional embodiment, the XR device may also adjust the transparency of the first image and / or the second image according to the current ambient light brightness when there is no target object in the first image and the change information of the ambient light brightness meets the target adjustment condition, and display the first image and the second image with adjusted transparency.

[0116] The target adjustment condition is that the degree of change of the ambient light brightness is higher than the target degree and / or the frequency of change of the ambient light brightness is higher than the target frequency.

[0117] Taking into account the corresponding errors in the ambient light brightness collected by the ambient light sensor, resulting in different brightnesses of adjacent ambient lights collected continuously, the XR device will detect the constant changes in the ambient light brightness, which will cause the XR device to frequently adjust the transparency of the first image and the second image, resulting in different transparency of the first image and the second image displayed at adjacent moments, which in turn causes the XR device display interface to flicker. Therefore, in this embodiment, the transparency of the first image and the second image can be adjusted according to the change information only when the degree of change in the ambient light brightness is higher than the target degree and / or the frequency of change in the ambient light brightness is greater than the target frequency.

[0118] In an optional embodiment, after determining the first area from the first image, the XR device may further detect whether there is a target object in the first area. If there is a target object in the first area, the step of adjusting at least one of the first area and the second area may be performed. If there is no target object in the first area, no processing may be performed.

[0119] In an optional embodiment, acquiring a first image of a real scene includes:

[0120] In response to an authorization operation for multi-layer display, a first image of a real scene is acquired.

[0121] For example, the user may choose whether to display the first image of the real scene and the second image of the virtual scene at the same time. If the user chooses to display the first image of the real scene and the second image of the virtual scene at the same time, the XR device determines that an authorization operation for multi-layer display is received. Then, in response to the authorization operation, the XR device may execute the step of acquiring the first image of the real scene.

[0122] For example, a query message may be displayed to ask the user whether to agree to display the first image of the real scene and the second image of the virtual scene at the same time. An "agree" control may also be displayed, and if the user clicks the "agree" control, it is determined that the authorization operation for multi-layer display has been received.

[0123] In an optional embodiment, the image processing method further includes:

[0124] In response to the deauthorization operation of the multi-layer display, acquiring a second image of the virtual scene;

[0125] A second image of the virtual scene is displayed.

[0126] For example, if the user chooses not to display the first image of the real scene and the second image of the virtual scene at the same time, the XR device determines that a deauthorization operation for multi-layer display has been received. Then, in response to the deauthorization operation, the XR device may only obtain the second image of the virtual scene and only display the second image of the virtual scene.

[0127] For example, a query message may be displayed to ask the user whether to agree to display the first image of the real scene and the second image of the virtual scene at the same time. A "disagree" control may also be displayed. If the user clicks the "disagree" control, it is determined that the cancellation of the multi-layer display authorization operation has been received.

[0128] It should be noted that the inquiry information can be displayed every target time, such as once every 10 minutes, or it can be displayed only once after the device is turned on. There is no specific restriction here, and it is subject to actual needs.

[0129] See also Fig.10 , Fig.10 The image processing device 200 includes an image acquisition module 201 , an information acquisition module 202 , a region determination module 203 and an image display module 204 .

[0130] The image acquisition module 201 is used to acquire a first image of a real scene and a second image of a virtual scene.

[0131] The information acquisition module 202 is used to acquire image comparison information between the first image and the second image.

[0132] The region determination module 203 is used to determine a first region from the first image and a second region from the second image according to the image contrast information, wherein the image contrast information between the first region and the second region is lower than a target contrast value.

[0133] The image display module 204 is used to adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and to superimpose the fourth image on the third image, wherein the image contrast information between the third image and the fourth image is not less than a target contrast value.

[0134] In an optional embodiment, the image processing device 200 may further include a judgment module, which may be used to: judge whether the ambient light brightness information meets the target adjustment condition; if the ambient light brightness information meets the target adjustment condition, execute the step of obtaining image comparison information of the first image and the second image.

[0135] In an optional embodiment, the ambient light brightness information includes a degree of change in ambient light brightness, and the target adjustment condition includes that the degree of change in ambient light brightness is higher than a target degree.

[0136] In an optional embodiment, the ambient light brightness information includes a frequency of change of the ambient light brightness, and the target adjustment condition includes that the frequency of change of the ambient light brightness is less than a target frequency.

[0137] In an optional embodiment, the ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is greater than a first target brightness value.

[0138] In an optional embodiment, the ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is less than a second target brightness value.

[0139] In an optional embodiment, the judgment module may be used to: judge whether a target object exists in the first image; if a target object exists in the first image, execute the step of obtaining image comparison information between the first image and the second image.

[0140] In an optional embodiment, the image display module 204 can be used to: obtain multiple candidate adjustment ratios, and determine a target adjustment ratio from the multiple candidate adjustment ratios, the target adjustment ratio is used to describe the ratio of the area of ​​a first area to be adjusted in the first area to the area of ​​a second area to be adjusted in the second area, and the position of the first area to be adjusted in the first area is different from the position of the second area to be adjusted in the second area; according to the target adjustment ratio, determine the first area to be adjusted from the first area, and determine the second area to be adjusted from the second area; adjust the first area to be adjusted, and adjust the second area to be adjusted.

[0141] In an optional embodiment, the image display module 204 may be configured to: if there is a target object in the first area, determine the candidate adjustment ratio with the largest area corresponding to the second area to be adjusted among the plurality of candidate adjustment ratios as the target adjustment ratio.

[0142] In an optional embodiment, the image display module 204 may be configured to: obtain scores of the plurality of candidate adjustment ratios; and determine the candidate adjustment ratio with the highest score among the plurality of candidate adjustment ratios as the target adjustment ratio.

[0143] In an optional embodiment, the image contrast information includes a difference in pixel values ​​or a difference in brightness values.

[0144] In an optional embodiment, the image acquisition module 201 can be used to: acquire a first image of a real scene in response to an authorization operation of a multi-layer display.

[0145] In an optional embodiment, the image acquisition module 201 may be used to: acquire a second image of the virtual scene in response to a cancellation operation of the multi-layer display;

[0146] The image display module 204 may be configured to display a second image of the virtual scene.

[0147] In an optional embodiment, the image acquisition module 201 may be used to: acquire a color depth image of a real scene; and transform the color depth image into an XR image to obtain a first image of the real scene.

[0148] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes the image processing method provided in the embodiment.

[0149] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the image processing method provided in the present embodiment by calling a computer program stored in the memory.

[0150] For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Fig.11 , Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0151] The electronic device 300 may include components such as a processor 301 and a memory 302. The electronic device 300 may be an XR device or a control device, etc. A person skilled in the art may understand that Fig.11The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the electronic device 300 may also include an XR display screen.

[0152] The processor 301 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing applications stored in the memory 302 and calling data stored in the memory 302, thereby monitoring the electronic device as a whole.

[0153] The memory 302 may be used to store applications and data. The applications stored in the memory 302 include executable codes. The applications may be composed of various functional modules. The processor 301 executes various functional applications and data processing by running the applications stored in the memory 302.

[0154] In this embodiment, the processor 301 in the electronic device will load the executable code corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application program stored in the memory 302, thereby achieving:

[0155] Acquire a first image of a real scene and a second image of a virtual scene;

[0156] Acquire image comparison information between the first image and the second image;

[0157] Determine a first region from the first image and a second region from the second image according to the image contrast information, wherein image contrast information between the first region and the second region is lower than a target contrast value;

[0158] Adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and superimpose the fourth image on the third image, wherein image contrast information between the third image and the fourth image is not lower than a target contrast value.

[0159] In an optional embodiment, before the processor 301 executes the step of obtaining the image contrast information of the first image and the second image, it may also execute: determining whether the ambient light brightness information meets the target adjustment condition; if the ambient light brightness information meets the target adjustment condition, executing the step of obtaining the image contrast information of the first image and the second image.

[0160] In an optional embodiment, the ambient light brightness information includes a degree of change in ambient light brightness, and the target adjustment condition includes that the degree of change in ambient light brightness is higher than a target degree.

[0161] In an optional embodiment, the ambient light brightness information includes a frequency of change of the ambient light brightness, and the target adjustment condition includes that the frequency of change of the ambient light brightness is less than a target frequency.

[0162] In an optional embodiment, the ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is greater than a first target brightness value.

[0163] In an optional embodiment, the ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is less than a second target brightness value.

[0164] In an optional embodiment, before the processor 301 executes the step of obtaining image comparison information between the first image and the second image, it may also execute: determining whether there is a target object in the first image; if there is a target object in the first image, executing the step of obtaining image comparison information between the first image and the second image.

[0165] In an optional embodiment, when the processor 301 executes the adjustment of at least one of the first area and the second area, it can execute: obtaining multiple candidate adjustment ratios, and determining a target adjustment ratio from the multiple candidate adjustment ratios, the target adjustment ratio is used to describe the ratio of the area of ​​the first area to be adjusted in the first area to the area of ​​the second area to be adjusted in the second area, and the position of the first area to be adjusted in the first area is different from the position of the second area to be adjusted in the second area; according to the target adjustment ratio, determining the first area to be adjusted from the first area, and determining the second area to be adjusted from the second area; adjusting the first area to be adjusted, and adjusting the second area to be adjusted.

[0166] In an optional embodiment, when the processor 301 executes the determination of the target adjustment ratio from multiple candidate adjustment ratios, it can execute: if there is a target object in the first area, then the candidate adjustment ratio with the largest area corresponding to the second area to be adjusted among the multiple candidate adjustment ratios is determined as the target adjustment ratio.

[0167] In an optional embodiment, when the processor 301 executes the step of determining the target adjustment ratio from multiple candidate adjustment ratios, it may execute: obtaining scores of the multiple candidate adjustment ratios; and determining the candidate adjustment ratio with the highest score among the multiple candidate adjustment ratios as the target adjustment ratio.

[0168] In an optional embodiment, the image contrast information includes a difference in pixel values ​​or a difference in brightness values.

[0169] In an optional embodiment, when the processor 301 executes the acquisition of the first image of the real scene, it can execute: in response to the authorization operation of the multi-layer display, acquiring the first image of the real scene.

[0170] In an optional embodiment, the processor 301 may further execute: in response to a deauthorization operation of the multi-layer display, acquiring a second image of the virtual scene; and displaying the second image of the virtual scene.

[0171] In an optional embodiment, when the processor 301 executes the step of acquiring the first image of the real scene, the steps may include: acquiring a color depth image of the real scene; and transforming the color depth image into an XR image to obtain the first image of the real scene.

[0172] In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the image processing method above, and will not be repeated here.

[0173] The image processing device provided in the embodiment of the present application belongs to the same concept as the image processing method in the above embodiment. Any method provided in the image processing method embodiment can be run on the image processing device. The specific implementation process is detailed in the image processing method embodiment and will not be repeated here.

[0174] It should be noted that, for the image processing method of the embodiment of the present application, a person skilled in the art can understand that the implementation of all or part of the process of the image processing method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and the execution process may include the process of the embodiment of the image processing method. Among them, the computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0175] It is understandable that in the specific implementation of this application, user information is involved, such as application usage behavior data, logs and other related data. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0176] For the image processing device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.

[0177] The above is a detailed introduction to an image processing method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An image processing method, characterized in that: include: Acquire a first image of a real scene and a second image of a virtual scene; Acquire image comparison information between the first image and the second image; Determine a first region from the first image and a second region from the second image according to the image contrast information, wherein image contrast information between the first region and the second region is lower than a target contrast value; Adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and superimpose the fourth image on the third image, wherein image contrast information between the third image and the fourth image is not lower than a target contrast value.

2. The image processing method according to claim 1, characterized in that: Before acquiring the image comparison information of the first image and the second image, the method further includes: Determine whether the ambient light brightness information meets the target adjustment conditions; If the ambient light brightness information satisfies the target adjustment condition, the step of acquiring image comparison information between the first image and the second image is performed.

3. The image processing method according to claim 2, characterized in that: The ambient light brightness information includes a degree of change in ambient light brightness, and the target adjustment condition includes that the degree of change in ambient light brightness is higher than a target degree.

4. The image processing method according to claim 2, characterized in that: The ambient light brightness information includes a frequency of change in ambient light brightness, and the target adjustment condition includes that the frequency of change in ambient light brightness is less than a target frequency.

5. The image processing method according to claim 2, characterized in that: The ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is greater than a first target brightness value.

6. The image processing method according to claim 2, characterized in that: The ambient light brightness information includes an ambient light brightness value, and the target adjustment condition includes that the ambient light brightness value is less than a second target brightness value.

7. The image processing method according to claim 1, characterized in that: Before acquiring the image comparison information of the first image and the second image, the method further includes: Determining whether a target object exists in the first image; If the target object exists in the first image, the step of acquiring image comparison information between the first image and the second image is performed.

8. The image processing method according to any one of claims 1 to 7, characterized in that: The adjusting at least one of the first area and the second area includes: Acquire multiple candidate adjustment ratios, and determine a target adjustment ratio from the multiple candidate adjustment ratios, the target adjustment ratio being used to describe the ratio of the area of ​​a first region to be adjusted in the first region to the area of ​​a second region to be adjusted in the second region, the position of the first region to be adjusted in the first region being different from the position of the second region to be adjusted in the second region; According to the target adjustment ratio, determining a first area to be adjusted from the first area, and determining a second area to be adjusted from the second area; The first area to be adjusted is adjusted, and the second area to be adjusted is adjusted.

9. The image processing method according to claim 8, characterized in that: The step of determining a target adjustment ratio from a plurality of candidate adjustment ratios includes: If there is a target object in the first area, the candidate adjustment ratio corresponding to the second area to be adjusted with the largest area among the plurality of candidate adjustment ratios is determined as the target adjustment ratio.

10. The image processing method according to claim 8, characterized in that: The step of determining a target adjustment ratio from a plurality of candidate adjustment ratios includes: Obtaining scores of a plurality of the candidate adjustment ratios; The candidate adjustment ratio with the highest score among the plurality of candidate adjustment ratios is determined as the target adjustment ratio.

11. The image processing method according to any one of claims 1 to 7, characterized in that: The image contrast information includes a difference in pixel values ​​or a difference in brightness values.

12. The image processing method according to any one of claims 1 to 7, characterized in that: The step of acquiring a first image of a real scene comprises: In response to an authorization operation for multi-layer display, a first image of a real scene is acquired.

13. The image processing method according to claim 12, characterized in that: The method further comprises: In response to the deauthorization operation of the multi-layer display, acquiring a second image of the virtual scene; A second image of the virtual scene is displayed.

14. The image processing method according to any one of claims 1 to 7, characterized in that: The step of acquiring a first image of a real scene comprises: Get color depth images of real scenes; The color depth image is transformed into an XR image to obtain a first image of the real scene.

15. An image processing device, characterized in that: include: An image acquisition module, used to acquire a first image of a real scene and a second image of a virtual scene; An information acquisition module, used to acquire image comparison information between the first image and the second image; a region determination module, configured to determine a first region from the first image and a second region from the second image according to the image contrast information, wherein the image contrast information between the first region and the second region is lower than a target contrast value; An image display module is used to adjust at least one of the first area and the second area to obtain a third image corresponding to the first image and a fourth image corresponding to the second image, and to superimpose the fourth image on the third image, wherein image contrast information between the third image and the fourth image is not less than a target contrast value.

16. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the image processing method according to any one of claims 1 to 14.

17. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the image processing method according to any one of claims 1 to 14 by calling the computer program stored in the memory.