Image processing method, device, terminal and storage medium
By acquiring the user's image and optical parameters, inverting and processing the specular reflection virtual image, and synthesizing it to generate a composite image, it solves the problem of virtual image interference on the mirror display screen and improves the operator's experience.
Patent Information
- Application Number
- CN202010637218.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-03
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-07-03
AI Technical Summary
The specular reflection of the mirror display causes virtual image interference, which affects the operator's experience. Existing technical solutions have defects such as angle adjustment, increased outer packaging, and equipment replacement, and cannot effectively reduce the visual interference of virtual images to real images.
By obtaining the optical parameters of the user image and the mirror display screen, the equivalent image of the specular reflection virtual image is determined, and the image is inverted, synthesized with the content image to be displayed, and a composite image is generated to offset the virtual image interference.
It effectively reduces the visual interference caused by the specular reflection virtual image when viewing the displayed content, and improves the operator's experience without changing the device angle or adding external packaging. It is suitable for a variety of terminal devices.
Smart Images

Figure CN113891013B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image processing method, device, terminal and storage medium. Background Art
[0002] Currently, some terminals on the market, such as desktops, laptops, mobile phones or other smart devices, often use mirror displays to achieve high-contrast and high-brightness display effects.
[0003] However, since the screen surface of the mirror display screen is smooth, mirror reflection will occur when it is used, and the operator and other objects in front of the screen will be reflected by the mirror to form a virtual image, which will then be reflected in the operator's eyes. At this time, in the screen display area of the terminal, a composite image of the real image displayed on the screen and the virtual image reflected by the mirror will be displayed, and the presentation of the virtual image will cause visual interference to the viewing of the real image, greatly affecting the operator's usage experience. Summary of the invention
[0004] In order to solve the technical problems existing in the related art, the embodiments of the present application provide an image processing method, device, terminal and storage medium.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides an image processing method, which is applied to a terminal. The method includes:
[0007] Obtain an image of content to be displayed;
[0008] Determine an equivalent image of a specularly reflected virtual image; the equivalent image of the specularly reflected virtual image is used to represent an approximate replacement real image of the specularly reflected virtual image on a specular display screen of the terminal, wherein the specularly reflected virtual image is formed based on specular reflection of the specular display screen;
[0009] Performing image inversion processing on the equivalent image of the mirror-reflected virtual image to obtain an inverted image;
[0010] Performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image;
[0011] The composite image is displayed on the mirror display screen.
[0012] In the above solution, determining the equivalent image of the specular reflection virtual image includes:
[0013] Acquire an image of a user; the image of the user has a positional relationship with the mirror display screen;
[0014] Obtaining optical parameters related to the mirror display screen;
[0015] Based on the image of the user and the optical parameters, an equivalent image of the specularly reflected virtual image is determined.
[0016] In the above solution, the step of obtaining the user's image includes:
[0017] Sensing the location of the user by means of a sensing device of the terminal;
[0018] When it is sensed that the user is located in a predetermined area, an image of the user is acquired; the shooting range of the image of the user at least includes an incident content range corresponding to the mirror-reflected virtual image.
[0019] In the above solution, the step of obtaining optical parameters related to the mirror display screen includes:
[0020] Determining a posture of a user when acquiring an image of the user; the posture includes at least one of a position and a posture;
[0021] When it is detected that the target posture is the determined posture, optical parameters related to the mirror display screen are obtained.
[0022] In the above solution, determining the equivalent image of the mirror-reflected virtual image based on the image of the user and the optical parameters includes:
[0023] Adjusting the content of the image of the user to obtain an adjusted image of the user; wherein the content of the adjusted image of the user matches the content of the mirror-reflected virtual image;
[0024] Based on the optical parameters, the chromaticity of the adjusted image of the user is adjusted to obtain an equivalent image of the mirror-reflected virtual image.
[0025] In the above solution, the image inversion processing is performed on the equivalent image of the mirror-reflected virtual image to obtain an inverted image, including:
[0026] Reversing the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image to obtain a new pixel value after the grayscale value is reversed;
[0027] Based on the new pixel value after the grayscale value is inverted, an inverted image of the equivalent image corresponding to the mirror reflection virtual image is obtained.
[0028] In the above scheme, the grayscale value of each pixel in the equivalent image of the mirror-reflected virtual image is inverted to obtain a new pixel value after the corresponding grayscale value is inverted, including:
[0029] Determine the maximum gray level in the gray level range corresponding to the equivalent image of the specular reflection virtual image;
[0030] Based on the determined maximum grayscale level, the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image is inverted to obtain a corresponding new pixel value after the grayscale value is inverted.
[0031] In the above solution, the step of determining the maximum grayscale level in the grayscale range corresponding to the equivalent image of the mirror-reflected virtual image includes one of the following:
[0032] Determine the maximum gray level in a preset manner;
[0033] A blank image is acquired, and the maximum grayscale level is determined based on an average value of pixel values of the blank image.
[0034] In the above solution, the step of performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image includes:
[0035] For each corresponding pixel value in the image of the content to be displayed and the inverted image, determine each synthesized pixel value based on a product value of the corresponding pixel value in the image of the content to be displayed and the first transparency level, and a product value of the corresponding pixel value in the inverted image and the second transparency level;
[0036] Based on the synthesized pixel values, the synthesized image is obtained; wherein,
[0037] The first transparency level corresponds to the image of the content to be displayed, and the second transparency level corresponds to the inverted image; the sum of the first transparency level and the second transparency level is a first value.
[0038] In the above solution, the step of performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image includes:
[0039] Constructing a first Laplacian pyramid image corresponding to the image of the content to be displayed and a second Laplacian pyramid image corresponding to the inverted image; the number of layers of the first Laplacian pyramid image is equal to the number of layers of the second Laplacian pyramid image;
[0040] For each corresponding level in the first Laplacian pyramid image and the second Laplacian pyramid image, determine synthesized images of each level based on a product value of the corresponding level in the first Laplacian pyramid image and a corresponding first mask value, and a product value of the corresponding level in the second Laplacian pyramid image and a corresponding second mask value;
[0041] The synthesized image is obtained based on the synthesized images of each level.
[0042] In the above solution, the step of performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image includes:
[0043] Determine an image synthesis area; the texture of the image in the image synthesis area satisfies a first set condition;
[0044] Poisson synthesis processing is performed on the image of the content to be displayed in the image synthesis area and the corresponding pixel values in the inverted image to obtain the synthesized image.
[0045] The present application also provides an image processing device, the device comprising:
[0046] An acquisition unit, used for acquiring an image of content to be displayed;
[0047] a determination unit, configured to determine an equivalent image of a specularly reflected virtual image; the equivalent image of the specularly reflected virtual image is used to represent an approximate replacement real image of the specularly reflected virtual image on a specular display screen of the terminal, the specularly reflected virtual image being formed based on specular reflection of the specular display screen;
[0048] An inversion unit, used for performing image inversion processing on an equivalent image of the mirror-reflected virtual image to obtain an inverted image;
[0049] A synthesis unit, used for performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image;
[0050] A display unit is used to display the composite image on the mirror display screen.
[0051] In the above solution, the determining unit includes a first obtaining subunit, a second obtaining subunit and a first determining subunit; wherein,
[0052] The first acquisition subunit is used to acquire an image of a user; the image of the user has a positional relationship with the mirror display screen;
[0053] The second acquisition subunit is used to acquire optical parameters related to the mirror display screen;
[0054] The first determining subunit is used to determine an equivalent image of the mirror-reflected virtual image based on the image of the user and the optical parameters.
[0055] In the above solution, the first acquisition subunit is specifically used to:
[0056] Sensing the location of the user by means of a sensing device of the terminal;
[0057] When it is sensed that the user is located in a predetermined area, an image of the user is acquired; the shooting range of the image of the user at least includes an incident content range corresponding to the mirror-reflected virtual image.
[0058] In the above solution, the second acquisition subunit is specifically used to:
[0059] Determining a posture of a user when acquiring an image of the user; the posture includes at least one of a position and a posture;
[0060] When it is detected that the target posture is the determined posture, optical parameters related to the mirror display screen are obtained.
[0061] In the above solution, the first determining subunit is specifically used to:
[0062] Adjusting the content of the image of the user to obtain an adjusted image of the user; wherein the content of the adjusted image of the user matches the content of the mirror-reflected virtual image;
[0063] Based on the optical parameters, the chromaticity of the adjusted image of the user is adjusted to obtain an equivalent image of the mirror-reflected virtual image.
[0064] In the above solution, the inversion unit is specifically used for:
[0065] Reversing the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image to obtain a new pixel value after the grayscale value is reversed;
[0066] Based on the new pixel value after the grayscale value is inverted, an inverted image of the equivalent image corresponding to the mirror reflection virtual image is obtained.
[0067] In the above solution, the reversal unit includes: a second determining subunit and a reversal subunit; wherein,
[0068] The second determining subunit is used to determine the maximum gray level in the gray level range corresponding to the equivalent image of the mirror-reflected virtual image;
[0069] The inversion subunit is used to invert the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image based on the determined maximum grayscale level, so as to obtain a new pixel value after the grayscale value is inverted.
[0070] In the above solution, the second determining subunit is specifically used for one of the following:
[0071] Determine the maximum gray level in a preset manner;
[0072] A blank image is acquired, and the maximum grayscale level is determined based on an average value of pixel values of the blank image.
[0073] In the above scheme, the synthesis unit is specifically used for:
[0074] For each corresponding pixel value in the image of the content to be displayed and the inverted image, determine each synthesized pixel value based on a product value of the corresponding pixel value in the image of the content to be displayed and the first transparency level, and a product value of the corresponding pixel value in the inverted image and the second transparency level;
[0075] Based on the synthesized pixel values, the synthesized image is obtained; wherein,
[0076] The first transparency level corresponds to the image of the content to be displayed, and the second transparency level corresponds to the inverted image; the sum of the first transparency level and the second transparency level is a first value.
[0077] In the above scheme, the synthesis unit is also specifically used for:
[0078] Constructing a first Laplacian pyramid image corresponding to the image of the content to be displayed and a second Laplacian pyramid image corresponding to the inverted image; the number of layers of the first Laplacian pyramid image is equal to the number of layers of the second Laplacian pyramid image;
[0079] For each corresponding level in the first Laplacian pyramid image and the second Laplacian pyramid image, determine synthesized images of each level based on a product value of the corresponding level in the first Laplacian pyramid image and a corresponding first mask value, and a product value of the corresponding level in the second Laplacian pyramid image and a corresponding second mask value;
[0080] The synthesized image is obtained based on the synthesized images of each level.
[0081] In the above scheme, the synthesis unit is also specifically used for:
[0082] Determine an image synthesis area; the texture of the image in the image synthesis area satisfies a first set condition;
[0083] Poisson synthesis processing is performed on the image of the content to be displayed in the image synthesis area and the corresponding pixel values in the inverted image to obtain the synthesized image.
[0084] The present application also provides a terminal, which includes:
[0085] A communication interface for acquiring an image of content to be displayed;
[0086] A processor is used to determine an equivalent image of a mirror-reflected virtual image; the equivalent image of the mirror-reflected virtual image is used to represent the approximate replacement of the real image of the mirror-reflected virtual image on the mirror display screen of the terminal, and the mirror-reflected virtual image is formed based on the mirror reflection of the mirror display screen; the equivalent image of the mirror-reflected virtual image is subjected to image inversion processing to obtain an inverted image; the image of the content to be displayed is subjected to image synthesis processing with the inverted image to obtain a synthesized image; and the synthesized image is displayed on the mirror display screen.
[0087] An embodiment of the present application further provides a terminal, the terminal comprising: a processor and a memory for storing a computer program that can be run on the processor;
[0088] Wherein, when the processor is used to run the computer program, it executes the steps of the image processing method provided in the embodiment of the present application.
[0089] The embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the image processing method provided in the embodiment of the present application are implemented.
[0090] The image processing method, device, terminal and storage medium provided in the embodiments of the present application, the terminal obtains an image of the content to be displayed; determines an equivalent image of a mirror-reflected virtual image; the equivalent image of the mirror-reflected virtual image is used to represent the approximate replacement of a real image by the mirror-reflected virtual image on the mirror display screen of the terminal, the mirror-reflected virtual image is formed based on the mirror reflection of the mirror display screen; performs image inversion processing on the equivalent image of the mirror-reflected virtual image to obtain an inverted image; performs image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image; and displays the synthesized image on the mirror display screen. By adopting the scheme of the embodiment of the present application, an inverted image obtained by inverting the equivalent image of the mirror reflection virtual image is synthesized with the image of the content to be displayed to obtain a composite image. In this way, when the composite image is displayed, what the user observes is the superposition of the composite image and the mirror reflection virtual image formed by the mirror reflection, and the inverted component in the composite image can completely or partially offset the interference of the mirror reflection virtual image, so that the interference texture in the displayed composite image area becomes uniform, thereby effectively reducing the visual interference caused by the presentation of the mirror reflection virtual image on the viewing of the image of the content to be displayed, thereby improving the operator's user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application;
[0092] Figure 2 A schematic diagram of the screen of the mirror display screen and the display of the mirror-reflected virtual image provided in the embodiment of the present application;
[0093] Figure 3 A schematic diagram of displaying an image of content to be displayed provided in an embodiment of the present application;
[0094] Figure 4 It is a schematic diagram of the observation effect of superimposing the image of the content to be displayed and the virtual image of the mirror reflection without any processing;
[0095] Figure 5 A schematic diagram of displaying an equivalent inverted image of a mirror-reflected virtual image provided in an embodiment of the present application;
[0096] Figure 6 A schematic diagram of displaying a composite image provided in an embodiment of the present application;
[0097] Figure 7 A schematic diagram of the observation effect of the superimposed images obtained by using the embodiment of the present application;
[0098] Figure 8 A schematic diagram of an observation effect of eliminating the interference effect of a specular reflection virtual image provided by an embodiment of the present application;
[0099] Fig. 9 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0100] Fig.10 A schematic diagram of the hardware structure of the terminal provided in the embodiment of the present application;
[0101] Fig.11 A schematic diagram of the structure of an image processing system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0102] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0103] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments. However, it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and the technical solutions recorded in the embodiments of the present application may be combined with each other without conflict.
[0104] Before introducing the technical solutions of the embodiments of the present application, the related technologies are described below.
[0105] In practical applications, since some terminals on the market, such as display screens of desktops, laptops, mobile phones or other smart devices, serve as output devices of von Neumann system computers, the display screens themselves need to display digital images and often interact with controllers, operators, memories, input devices or other output devices. Therefore, the mirror display screens of desktops, laptops, mobile phones or other smart devices cannot be simply treated as optical components with mirror reflection characteristics such as plane mirrors; that is, the measures for eliminating mirror reflections by optical components such as plane mirrors may not be applicable to the mirror display screens of the above-mentioned terminals.
[0106] At present, in order to reduce the visual interference caused by the presentation of virtual images on the viewing of real images, the following solutions are mainly proposed in the relevant technologies:
[0107] Solution 1: Manually or automatically adjust the angle of the mirror display screen so that the mirror reflection path avoids or partially avoids the operator's line of sight as much as possible, thereby reducing the virtual image entering the operator's eyes.
[0108] Solution 2: Add a transparent non-mirror outer packaging device to the mirror display, such as a non-mirror transparent shell, frosted protective film, etc. Since the outer surface of such a device will form diffuse reflection rather than mirror reflection, the virtual image formed by mirror reflection can be eliminated.
[0109] Option three: Abandon the mirror display screen and choose to use a non-mirror display device, such as a matte screen.
[0110] Solution 4: Turn up the backlight of the mirror display.
[0111] However, the above-mentioned solutions in the related art have certain defects in practical application, so that they cannot effectively reduce the visual interference caused by the presentation of virtual images on the viewing of real images, which are analyzed below respectively.
[0112] For the above solution 1, since this solution changes the angle of the input device (and may even cause changes in the angle of the input device or other devices, such as the input device and output device of terminals such as all-in-one computers, mobile phones, and tablet computers are integrated), it may have an adverse effect on the user's viewing and other operating experience. For some terminal devices, adjusting the angle of the mirror display screen will affect the user's operating experience. For example, for smartphones, the operating experience is better when looking directly at the terminal interface from the front. If the angle of the mirror display screen of the terminal is adjusted, such as tilting the mirror display screen to the left or up, the viewing quality will be affected, and finger touch operations will also become laborious.
[0113] For the above solution 2, for some terminal devices, such as smartphones or tablets, adding a transparent shell or film will increase the friction on the screen surface, resulting in obstruction of touch operation. For some terminal devices, adding a transparent shell or film will also hinder the heat dissipation of the terminal device. In addition, some users do not want to add a shell or film for a long time. For example, some users want to use a smartphone instead of a mirror in some usage scenarios.
[0114] For the above-mentioned solution three, the screens and motherboards of some terminal devices such as all-in-one computers, smart phones or tablets are highly integrated. Due to the lack of special accessories, it may not be possible to replace the screen; and some devices are difficult to disassemble (such as Microsoft's surface tablet), and the disassembly process may cause secondary damage to the device, that is, there is a high secondary risk when the user replaces the screen, so the universality of this solution is poor.
[0115] For the above-mentioned solution 4, raising the backlight of the mirror display screen can easily cause eye fatigue, and not all mirror displays support backlight adjustment.
[0116] It can be seen that in the related art, there is currently no effective solution for how to effectively solve the problem of virtual images generated by mirror reflection on the mirror display screen of the terminal, which causes visual interference to the viewing of the content displayed on the display screen.
[0117] Based on this, in various embodiments of the present application, the terminal obtains an image of the content to be displayed; determines an equivalent image of the mirror-reflected virtual image; performs image inversion processing on the equivalent image of the mirror-reflected virtual image to obtain an inverted image; performs image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image; and displays the synthesized image on the mirror display screen.
[0118] By adopting the scheme of the embodiment of the present application, an inverted image obtained by inverting the equivalent image of the mirror reflection virtual image is synthesized with the image of the content to be displayed to obtain a composite image. In this way, when the composite image is displayed, what the user observes is the superposition of the composite image and the mirror reflection virtual image formed by the mirror reflection, and the inverted component in the composite image can completely or partially offset the interference of the mirror reflection virtual image, so that the interference texture in the displayed composite image area becomes uniform, thereby effectively reducing the visual interference caused by the presentation of the mirror reflection virtual image on the viewing of the image of the content to be displayed, thereby improving the operator's user experience.
[0119] The present application scheme is further described in detail below with reference to the accompanying drawings and embodiments.
[0120] The present application embodiment provides an image processing method, which is applied to a terminal. Figure 1 A flowchart of an image processing method provided in an embodiment of the present application is shown in FIG. Figure 1As shown, the method includes:
[0121] Step 101: Acquire an image of content to be displayed.
[0122] Here, the terminal that implements the image processing method of the embodiment of the present application includes but is not limited to a desktop computer, a laptop computer, a mobile phone or other smart device with a mirror display screen.
[0123] In the embodiment of the present application, the image of the content to be displayed obtained by the terminal is a digital image. Specifically, the digital image of the content to be displayed on the mirror display screen of the terminal is obtained. In actual application, the content to be displayed is generally obtained by a von Neumann system computer and stored in the video memory. Here, the content to be displayed may include video, pictures, text and other content, which are not limited here.
[0124] Step 102, determining an equivalent image of the specularly reflected virtual image.
[0125] In the embodiment of the present application, the equivalent image of the mirror-reflected virtual image is used to represent the approximate replacement of the real image of the mirror-reflected virtual image on the mirror display screen of the terminal, and the mirror-reflected virtual image is formed based on the mirror reflection of the mirror display screen.
[0126] In actual application, since the terminal has a mirror display screen, the mirror display screen will generate a mirror reflection virtual image due to mirror reflection when the terminal is used. The mirror reflection virtual image on the mirror display screen of the terminal approximately replaces the real image as an equivalent image of the mirror reflection virtual image. The equivalent image of the mirror reflection virtual image here is a digital image. It should be noted that the equivalence here can be understood as the same color stimulation, that is, the light radiation of the equivalent image is similar to the light radiation of the mirror reflection virtual image, and the color sensation caused by both after entering the operator's line of sight is the same.
[0127] In some embodiments, the terminal may determine the equivalent image of the specular reflection virtual image in the following manner:
[0128] Acquire an image of a user; the image of the user has a positional relationship with the mirror display screen;
[0129] Obtaining optical parameters related to the mirror display screen;
[0130] Based on the image of the user and the optical parameters, an equivalent image of the specularly reflected virtual image is determined.
[0131] In actual application, the terminal can obtain the user's image in the following ways:
[0132] Sensing the location of the user by means of a sensing device of the terminal;
[0133] When it is sensed that the user is located in a predetermined area, an image of the user is acquired; the shooting range of the image of the user at least includes an incident content range corresponding to the mirror-reflected virtual image.
[0134] Here, the sensing device of the terminal may be, for example, an infrared sensor, an ultrasonic sensor, or a camera, etc. For example, when the sensing device of the terminal senses that the user is one meter away from the terminal, the image of the user is acquired, and the image of the user has a certain positional relationship with the mirror display screen of the terminal, for example, the image of the user when the user is watching the screen of the mirror display screen may be acquired.
[0135] Taking the sensing device as a camera as an example, the acquisition of the user's image is explained.
[0136] In actual application, for terminals with secondary cameras, such as smart phones, laptops, all-in-one computers, tablet computers, etc., when the user is watching the screen of the mirror display normally, the terminal can use the secondary camera to capture the image of the user to obtain the image of the user, and the image of the user can be a digital image. Here, the secondary camera refers to the camera displayed on the front of the terminal, such as the side of the inner screen, and the main camera refers to the camera displayed on the back of the terminal, such as the side of the outer screen.
[0137] Of course, if the terminal does not have a secondary camera, or the user does not want to use a secondary camera, an external camera can be used to replace the secondary camera. Among them, the lens plane of the external camera should be in the same plane as the screen of the terminal's mirror display screen, or in a parallel plane close to the screen plane of the mirror display screen, as close as possible to the midline of the left and right lines of the mirror display screen. Specifically, when the user is using the screen of the mirror display screen normally, let the user keep the same position, change the screen to an external camera, and the external camera automatically captures the user's image; you can also use tape, brackets and other devices to attach the external camera near the screen in advance, such as directly above the screen, in the center of the screen, on the screen border, etc., and capture the user's image when the user is using the screen normally.
[0138] If the user's posture relative to the screen changes while using the mirror display, it is necessary to re-acquire the user's image. Here, whether the posture has changed can be proposed by the user; the terminal's existing sensors (such as accelerometers, gyroscopes, etc.) can also be used to judge the terminal's movement; sensors can also be attached to handheld terminals (such as mobile phones, tablets, laptops, etc.) or attached to the user (such as the back of the user who is watching the screen) in advance to judge the terminal or user's movement; or the user's real-time image can be compared with the previous image content to make a judgment (the user's image can be captured by the auxiliary camera or external camera mentioned above, or another camera can be set up for motion monitoring to obtain the user's image).
[0139] Regardless of whether a secondary camera or an external camera is used, the user's image capture should meet the following conditions: (1) The user's image capture range should at least include the incident content range corresponding to the mirror reflection virtual image, including the user himself and the background environment, which can be achieved by zooming or panning the lens; (2) The left and right directions of the acquired user image should be consistent with the mirror reflection virtual image seen by the user; (3) One or more images can be captured for rough estimation of the mirror reflection virtual image, or continuous video can be captured for accurate or real-time estimation of the mirror reflection virtual image.
[0140] In actual application, in order to avoid the influence of posture changes on the measurement accuracy of optical parameters, the embodiment of the present application measures the optical parameters related to the mirror display screen when the target posture is the posture of the user when the user's image is acquired.
[0141] Based on this, in some embodiments, the terminal may obtain optical parameters related to the mirror display screen in the following manner:
[0142] Determining a posture of a user when acquiring an image of the user; the posture includes at least one of a position and a posture;
[0143] When it is detected that the target posture is the determined posture, optical parameters related to the mirror display screen are obtained.
[0144] Here, the optical parameters related to the mirror display screen include but are not limited to the reflectivity, refractive index, incident light chromaticity, reflected light chromaticity, incident light wavelength, reflected light wavelength, incident angle, reflection angle, etc. of the mirror display screen. It should be noted that the above optical parameters can be preset by the user, or can be measured by a reflectivity meter, a spectrophotometer or a colorimeter.
[0145] In practical applications, the user's posture should be maintained at the posture when the user's image is acquired. Under this premise, various optical parameters are measured to avoid the influence of posture changes on the measurement accuracy of optical parameters. It should be noted that when measuring wavelength (incident light wavelength, reflected light wavelength) or chromaticity (incident light chromaticity, reflected light chromaticity), the user and background areas can be divided into several small areas, and the colors of each divided small area are ensured to be approximately the same, and the chromaticity or wavelength of each small area is measured. The smaller the area, the more accurate the measurement, and the higher the cost of measurement and subsequent calculation. Therefore, the size of the divided area can be determined based on the actual situation.
[0146] In some embodiments, the terminal determines the equivalent image of the mirror-reflected virtual image based on the image of the user and the optical parameters, which can be achieved in the following manner:
[0147] Adjusting the content of the image of the user to obtain an adjusted image of the user; wherein the content of the adjusted image of the user matches the content of the mirror-reflected virtual image;
[0148] Based on the optical parameters, the chromaticity of the adjusted image of the user is adjusted to obtain an equivalent image of the mirror-reflected virtual image.
[0149] Specifically, in order to determine the equivalent image of the mirror-reflected virtual image, the terminal can first adjust the digital image of the user's image so that the content of the digital image of the user's image matches the content of the mirror-reflected virtual image. On this basis, the optical parameters related to the mirror display screen obtained above are used to adjust the chromaticity of the adjusted user's image to obtain an equivalent image of the mirror-reflected virtual image with the same color stimulation as the mirror-reflected virtual image.
[0150] The following describes in detail the process of adjusting the content of the user's image and adjusting the chromaticity of the adjusted user's image.
[0151] First, the adjustment of the content of the user's image is explained. The content adjustment here includes but is not limited to scaling, translating, cropping and other adjustments to the content of the user's image, so that the content of the adjusted user's image matches the content of the mirror-reflected virtual image. Since the distance between the mirror-reflected virtual image and the operator's eyes is equal to twice the distance between the operator's eyes and the screen plane, if the mirror-reflected virtual image is to be replaced by an equivalent image of the mirror-reflected virtual image at the screen, the length of the user's image should be 1 / 2 of the mirror-reflected virtual image. Here, the size and camera range of the acquired user's image are adjusted. Specifically, at least one of the scaling, translating and cropping operations is performed to ensure that the content of the adjusted user's image matches the content of the mirror-reflected virtual image, that is, the content of the adjusted user's image is consistent with the content of the mirror-reflected virtual image, such as the consistency of people and objects, but the color consistency of the two is not guaranteed.
[0152] In actual application, the following methods can be used to adjust the content of the user's image:
[0153] (1) Manual comparison method, displaying the acquired user image on the screen of the mirror display screen, and only displaying the mirror reflection virtual image when the mirror display screen is off, so that the acquired user image and the mirror reflection virtual image are manually compared, and using the input device of a von Neumann system computer connected to the mirror display screen (for a mobile phone or tablet computer, the computer connected to the screen of the mobile phone or tablet computer refers to the mobile phone or tablet computer itself; for a display, the computer connected to the display screen refers to an external PC or mobile phone, etc.) to perform at least one of scaling, translation, and cropping operations on the content of the user image, so as to adjust the user image to a content that is consistent with the content of the mirror reflection virtual image;
[0154] (2) Instrument measurement comparison method: a physical model (such as a puppet, used to replace the user) plus an external camera (to replace the operator's eyes) can be used to capture a mirror-reflected virtual image, and a digital image of the physical model can be obtained based on the physical model and the external camera. A computer can be used to compare the digital image of the physical model and the captured image of the mirror-reflected virtual image, such as extracting the contours, lines, shadows and other features of the two to determine the positional correspondence between the pixels of the two, and calculating the operations such as scaling, translation, and cropping that need to be performed. These operations are applied to the acquired image of the user, and the image of the user is adjusted to be consistent with the content of the mirror-reflected virtual image;
[0155] (3) Model measurement method: Based on manual comparison and instrument measurement methods, the distance from the human eye to the screen of the mirror display screen (which can be measured with a ruler or tape measure, or measured using the terminal's own distance sensor), relative position, the user's total image zooming operation, the user's total image displacement operation, and the user's total image cropping operation can be recorded. Statistical regression analysis and neural network technology can be used to establish a function of the user's total image zooming operation, the user's total image displacement operation, and the user's total image cropping operation with respect to the distance from the human eye to the screen of the mirror display screen, the relative position, and the screen size. Each time, the distance from the human eye to the screen of the mirror display screen, the relative position, and the screen size are substituted into the function to calculate the various operations to be performed. The computer connected to the screen (for mobile phones and tablet computers, the computer connected to the screen of the mobile phone and tablet computer refers to the mobile phone and tablet computer itself; for displays, the computer connected to the display screen refers to an external PC or mobile phone, etc.) automatically performs at least one of zooming, translation, and cropping operations on the acquired user image to adjust the user image to a content that is consistent with the content of the mirror-reflected virtual image.
[0156] The following is an explanation of the chromaticity adjustment of the adjusted user's image. Due to the material characteristics of the mirror display screen, only a portion of the incident radiation flux is reflected when the incident light is projected onto the mirror screen, which also causes the chromaticity of the mirror-reflected virtual image observed by the user to be different from the chromaticity of the user himself and the background and environment. Therefore, the chromaticity of the adjusted user's image needs to be adjusted to finally obtain an equivalent image of the mirror-reflected virtual image with the same color stimulus as the mirror-reflected virtual image.
[0157] In actual application, the chromaticity adjustment of the adjusted user's image can be achieved in the following ways:
[0158] (1) Manual adjustment method, in which the adjusted user image is displayed on the screen of the mirror display screen, and only the mirror reflection virtual image is displayed when the mirror display screen is turned off, so that the adjusted user image is manually compared with the mirror reflection virtual image, and the adjusted user image is subjected to brightness adjustment operation by using the input device of a von Neumann system computer connected to the mirror display screen (for a mobile phone or tablet computer, the computer connected to the screen of the mobile phone or tablet computer refers to the mobile phone or tablet computer itself; for a display, the computer connected to the display screen refers to an external PC or mobile phone, etc.), so as to adjust the chromaticity of the adjusted user image to be consistent with the chromaticity of the mirror reflection virtual image;
[0159] (2) Instrument measurement adjustment method: customize the required grayscale level (less than or equal to the maximum grayscale level supported by the mirror display screen). Within the selected grayscale level range, make the mirror display screen display several monochrome colors. Use a colorimeter or spectrophotometer to measure their chromaticity. Match the chromaticity of various monochrome colors with the chromaticity of the reflected light of the user and the small background area obtained by obtaining the optical parameters related to the mirror display screen. The match is considered successful when the chromaticity value difference is the smallest. In the digital image of the adjusted user's image, replace the chromaticity of the area corresponding to the optical parameters related to the mirror display screen with the chromaticity of the matched screen monochrome. Finally, perform pixel smoothing (such as Laplace smoothing) again to finally obtain an equivalent image with the same color stimulus as the virtual image of the mirror reflection.
[0160] (3) Model calculation adjustment method: Based on the manual adjustment and instrument measurement adjustment methods, statistical regression analysis, neural network and other technologies are used to obtain the functional relationship between the chromaticity adjustment operation and various optical parameters. The chromaticity adjustment operation is calculated using the function, and the computer connected to the screen (for mobile phones and tablet computers, the computer connected to the mobile phone and tablet computer screen refers to the mobile phone and tablet computer itself; for monitors, the computer connected to the monitor screen refers to an external PC or mobile phone, etc.) automatically performs chromaticity adjustment operations on the adjusted user image, and adjusts the adjusted user image to a chromaticity that is consistent with the chromaticity of the mirror-reflected virtual image.
[0161] Step 103, performing image inversion processing on the equivalent image of the mirror-reflected virtual image to obtain an inverted image.
[0162] In some embodiments, the terminal may perform image inversion processing on the equivalent image of the mirror-reflected virtual image to obtain an inverted image in the following manner:
[0163] Reversing the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image to obtain a new pixel value after the grayscale value is reversed;
[0164] Based on the new pixel value after the grayscale value is inverted, an inverted image of the equivalent image corresponding to the mirror reflection virtual image is obtained.
[0165] In actual application, the terminal performs inversion processing on the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image to obtain the corresponding new pixel value after the grayscale value is inverted, which can be achieved in the following way:
[0166] Determine the maximum gray level in the gray level range corresponding to the equivalent image of the specular reflection virtual image;
[0167] Based on the determined maximum grayscale level, the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image is inverted to obtain a corresponding new pixel value after the grayscale value is inverted.
[0168] The inverted image obtained here is similar to a photographic negative. Performing image inversion processing on the equivalent image of the mirror-reflected virtual image is actually to perform inversion operations on the three components of R, G, and B in the equivalent image of the mirror-reflected virtual image respectively to obtain the inverted image.
[0169] For example, assuming that the grayscale range of the equivalent image of the mirror reflection virtual image is [0, L-1], image inversion processing of the equivalent image of the mirror reflection virtual image actually means performing the following numerical operation on each pixel in the equivalent image of the mirror reflection virtual image to obtain a new pixel value:
[0170] s = L-1-r, where s represents the new pixel value after the grayscale value of the image is inverted, r represents the grayscale value of the original pixel, and L-1 represents the maximum grayscale level in the grayscale range. The grayscale range represented by [0, L-1] is a commonly used representation method in the field of digital image processing. Due to storage and quantization hardware considerations, L is generally equal to an integer power of 2, for example, L = 2 8 , then a total of 256 levels can be represented, and the grayscale range is [0, L-1] = [0, 255]. In the embodiment of the present application, the L value can be re-estimated according to actual needs. In the following, L is a positive integer, not necessarily equal to an integer power of 2.
[0171] In practical application, the maximum gray level in the gray level range corresponding to the equivalent image of the mirror reflection virtual image may be determined in one of the following ways:
[0172] Determine the maximum gray level in a preset manner;
[0173] A blank image is acquired, and the maximum grayscale level is determined based on an average value of pixel values of the blank image.
[0174] Exemplarily, a white object such as white paper or a white wall in the environment where the user is located may be photographed as a blank image, and the average value of each pixel value in the blank image is taken as the maximum grayscale level.
[0175] Here, if the original image is in RGBA format (A refers to transparency), A remains unchanged, and a preliminary inverted image can be obtained. Furthermore, the preliminary inverted image can be scaled by upsampling or downsampling, so that the size of the preliminary inverted image after scaling is the same as the size of the image of the content to be displayed, and finally the inverted image can be obtained. The inverted image here is also a digital image.
[0176] Step 104 , performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image.
[0177] Here, image blending refers to combining two digital images, the image of the content to be displayed and the inverted image, into one image, mainly including direct cutting and pasting, alpha blending, multi-scale (multi-resolution) blending, Poisson blending, etc. The following is a detailed description of the process of image blending using alpha blending, multi-scale blending, and Poisson blending.
[0178] In some embodiments, the terminal may perform image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image in the following manner:
[0179] For each corresponding pixel value in the image of the content to be displayed and the inverted image, determine each synthesized pixel value based on a product value of the corresponding pixel value in the image of the content to be displayed and the first transparency level, and a product value of the corresponding pixel value in the inverted image and the second transparency level;
[0180] Based on the synthesized pixel values, the synthesized image is obtained; wherein,
[0181] The first transparency level corresponds to the image of the content to be displayed, and the second transparency level corresponds to the inverted image; the sum of the first transparency level and the second transparency level is a first value.
[0182] Specifically, assuming that the reversed image is R(z), the image of the content to be displayed is B(z), the synthesized image is I(z), z is any pixel value, which can represent any pixel value in the image of the content to be displayed and the reversed image, α represents the second transparency, which corresponds to the reversed image R(z), 1-α represents the first transparency, which corresponds to the image of the content to be displayed B(z), then the alpha synthesis formula is used to obtain the synthesized image I(z) as follows:
[0183] I(z)=α·R(z)+(1-α)·B(z),α∈[0,1];
[0184] The alpha synthesis formula is applied to each corresponding R, G, and B component in the image of the content to be displayed and the inverted image to obtain a synthesized composite image.
[0185] Here, α can be preset or adjusted according to the effect of the synthesized image. If α is close to 1, the synthesized image is close to the inverted image R(z), and the interference reduction effect of the mirror reflection virtual image is obvious, but the display effect of the image of the content to be displayed is deteriorated; if α is close to 0, the synthesized image is close to the image B(z) of the content to be displayed, and the interference reduction effect of the mirror reflection virtual image is not obvious, but the display effect of the image of the content to be displayed is better.
[0186] In some other embodiments, the terminal may also perform image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image in the following manner:
[0187] Constructing a first Laplacian pyramid image corresponding to the image of the content to be displayed and a second Laplacian pyramid image corresponding to the inverted image; the number of layers of the first Laplacian pyramid image is equal to the number of layers of the second Laplacian pyramid image;
[0188] For each corresponding level in the first Laplacian pyramid image and the second Laplacian pyramid image, determine synthesized images of each level based on a product value of the corresponding level in the first Laplacian pyramid image and a corresponding first mask value, and a product value of the corresponding level in the second Laplacian pyramid image and a corresponding second mask value;
[0189] The synthesized image is obtained based on the synthesized images of each level.
[0190] Specifically, the embodiment of the present application uses Laplacian pyramids to mix the image B of the content to be displayed and the reverse image R to obtain a composite image I. The specific implementation steps are as follows:
[0191] First, construct the k-order Laplacian pyramid image L corresponding to the image B to be displayed and the inverted image R respectively. B and L R ; Secondly, mix L using the following formula B and L R Each level in the corresponding:
[0192]
[0193] Where I represents the mixed image, i∈[0,k] represents the layer number of the pyramid, the first Laplacian pyramid image corresponding to the image B of the content to be displayed and the second Laplacian pyramid image corresponding to the reversed image R have the same number of layers, M i Represents the mask value (mask) of the i-th layer, M i It can be preset or adjusted according to the effect of the composite image.
[0194] Finally, the synthesized image pyramid L I Perform inverse pyramid transform to obtain the composite image I.
[0195] In some other embodiments, the terminal may also perform image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image in the following manner:
[0196] Determine an image synthesis area; the texture of the image in the image synthesis area satisfies a first set condition;
[0197] Poisson synthesis processing is performed on the image of the content to be displayed in the image synthesis area and the corresponding pixel values in the inverted image to obtain the synthesized image.
[0198] Specifically, suppose the pixel value function of the synthesized image is f(z), and the pixel value function of the inverted image is g(z), where z represents any pixel value; Ω represents the image synthesis area, which can be selected as needed; f * The pixel value function of the image to be displayed. The optimization problem can be solved according to the following Poisson synthesis formula to obtain f(z):
[0199]
[0200]
[0201] v=(u,v)=▽g
[0202] The first line of the above formula can be understood as that in the image synthesis area, the synthesized image is as close to the inverted image as possible, and the second line of the above formula can be understood as that at the edge of the image synthesis area, the synthesized image is smoothly connected to the image of the content to be displayed. Solving the optimization problem of the above formula can obtain the pixel values of the synthesized image.
[0203] Here, since the first line of the above formula will cause the synthesized image to be as close to the inverted image as possible, in actual application, the synthesized image needs to reflect the image of the content to be displayed, that is, the viewing of the original image of the content to be displayed should not be affected in order to eliminate the interference of the mirror reflection virtual image. Therefore, the image synthesis area Ω should not be too large, so as to prevent all or part of the content of the inverted image from occupying too large an area of the synthesized image, thereby affecting the viewing of the original image of the content to be displayed.
[0204] It should be noted that the embodiment of the present application can determine the image synthesis area Ω in the following manner: edge detection and texture detection are performed on the image of the content to be displayed to obtain a number of small areas, and it is necessary to ensure that each small area has little or no texture (that is, the texture of the image in the image synthesis area Ω meets the first set condition), and each small area is used as the image synthesis area Ω. Then, Poisson synthesis processing is performed on the image of the content to be displayed in the image synthesis area Ω and the corresponding pixel values in the inverted image to obtain a synthesized image.
[0205] Step 105: display the synthesized image on the mirror display screen.
[0206] By adopting the solution provided in the embodiment of the present application, an inverted image obtained by inverting the equivalent image of the mirror reflection virtual image is synthesized with the image of the content to be displayed to obtain a composite image. In this way, when the composite image is displayed, what the user observes is the superposition of the composite image and the mirror reflection virtual image formed by the mirror reflection, and the inverted component in the composite image can fully or partially offset the interference of the mirror reflection virtual image, so that the interference texture in the displayed composite image area becomes uniform, thereby effectively reducing the visual interference caused by the presentation of the mirror reflection virtual image to the viewing of the image of the content to be displayed, thereby improving the operator's user experience.
[0207] The present application scheme is further described in detail below in conjunction with application examples.
[0208] The terminal has a mirror display screen. When the terminal is used, the mirror display screen will produce mirror reflection, generating a mirror reflection virtual image. Figure 2 A schematic diagram of a mirror display screen and a mirror-reflected virtual image provided in an embodiment of the present application, Figure 2 In the figure, the parallelogram represents the screen of the mirror display screen, and a gray triangle is displayed on the screen of the mirror display screen, and the gray triangle represents the mirror reflection virtual image formed by the reflection of the mirror display screen; Figure 3 A schematic diagram of displaying an image of content to be displayed provided in an embodiment of the present application, such as Figure 3 As shown, the image of the content to be displayed is displayed on the screen of the mirror display screen. In the case where no processing method is adopted, the user observes the image of the content to be displayed on the screen of the mirror display screen ( Figure 3 The image shown) and the specular reflection virtual image ( Figure 2 The gray triangle shown in the figure above is superimposed on the Figure 4 As shown, it can be seen that the mirror-reflected virtual image interferes with the display of the image of the content to be displayed.
[0209] If the solution of the embodiment of the present application is adopted, the user's image and the optical parameters related to the mirror display screen are first obtained, and the equivalent image of the mirror-reflected virtual image can be determined based on the obtained user's image and the optical parameters related to the mirror display screen. Then, the equivalent image of the mirror-reflected virtual image is subjected to image inversion processing to obtain the corresponding inverted image, that is, the image is obtained as follows: Figure 5 Here, specifically, the content of the user's image can be adjusted to obtain the adjusted user's image, and then the chromaticity of the adjusted user's image can be adjusted based on the optical parameters to obtain the equivalent image of the mirror reflection virtual image, and the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image can be inverted to obtain the equivalent inverted image of the mirror reflection virtual image; next, the image of the content to be displayed ( Figure 3 The image shown) and the equivalent inverted image of the mirror-reflected virtual image ( Figure 5 The image shown in the figure is processed by image synthesis to obtain the following Figure 6 After the display content of the embodiment of the present application is adjusted, the mirror display screen displays Figure 6 The user observes the superposition of the synthetic image and the specular reflection virtual image. The texture of the main interference area of the specular reflection virtual image in the display area is similar to that of the non-interference area. The observation effect is as follows: Figure 7 As shown, it is obvious that the interference of the specular reflection virtual image is reduced. Under the condition that the external conditions such as the grayscale range of the specular reflection virtual image and the image texture of the content to be displayed are relatively ideal, after the display content is adjusted in the embodiment of the present application, the texture of the main interference area of the specular reflection virtual image in the display area observed by the user is almost the same as that of the non-interference area, and the interference effect of the specular reflection virtual image is eliminated. The observed effect is as follows: Figure 8 shown.
[0210] In practical applications, the equivalent inverted image of the mirror-reflected virtual image is synthesized with the image of the content to be displayed, and the synthesized image is displayed on the screen and superimposed with the mirror-reflected virtual image, so that the interference of the virtual image can be reduced or eliminated. Among them, the effect of reduction or elimination depends on the environment to a certain extent: if the brightness of the virtual image is much lower than the maximum display brightness of the screen, the interference reduction effect is better, otherwise the interference reduction effect is limited; if the image of the content to be displayed does not require high color fidelity, the equivalent inverted image of the mirror-reflected virtual image has a large adjustment space when synthesizing with the image of the content to be displayed, and color cast can be exchanged for a better interference reduction effect, otherwise the interference reduction effect is limited; if the image texture of the content to be displayed is not complex and there are not too many details to be maintained, the equivalent inverted image of the mirror-reflected virtual image has a large adjustment space when synthesizing with the image of the content to be displayed, and some textures can be introduced during synthesis to obtain a better interference reduction effect, otherwise the interference reduction effect is limited.
[0211] In order to implement the image processing method of the embodiment of the present application, the embodiment of the present application further provides an image processing device, which is arranged on a terminal. Fig. 9 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the device comprises:
[0212] An acquisition unit 91 is used to acquire an image of content to be displayed;
[0213] A determination unit 92, configured to determine an equivalent image of a mirror-reflected virtual image; the equivalent image of the mirror-reflected virtual image is used to represent an approximate replacement real image of the mirror-reflected virtual image on the mirror display screen of the terminal, wherein the mirror-reflected virtual image is formed based on mirror reflection of the mirror display screen;
[0214] An inversion unit 93, configured to perform image inversion processing on an equivalent image of the mirror-reflected virtual image to obtain an inverted image;
[0215] A synthesis unit 94, configured to perform image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image;
[0216] The display unit 95 is used to display the composite image on the mirror display screen.
[0217] In some embodiments, the determining unit 92 includes a first obtaining subunit, a second obtaining subunit and a first determining subunit; wherein,
[0218] The first acquisition subunit is used to acquire an image of a user; the image of the user has a positional relationship with the mirror display screen;
[0219] The second acquisition subunit is used to acquire optical parameters related to the mirror display screen;
[0220] The first determining subunit is used to determine an equivalent image of the mirror-reflected virtual image based on the image of the user and the optical parameters.
[0221] In some embodiments, the first acquisition subunit is specifically configured to:
[0222] Sensing the location of the user by means of a sensing device of the terminal;
[0223] When it is sensed that the user is located in a predetermined area, an image of the user is acquired; the shooting range of the image of the user at least includes an incident content range corresponding to the mirror-reflected virtual image.
[0224] In some embodiments, the second acquisition subunit is specifically used to:
[0225] Determining a posture of a user when acquiring an image of the user; the posture includes at least one of a position and a posture;
[0226] When it is detected that the target posture is the determined posture, optical parameters related to the mirror display screen are obtained.
[0227] In some embodiments, the first determining subunit is specifically configured to:
[0228] Adjusting the content of the image of the user to obtain an adjusted image of the user; wherein the content of the adjusted image of the user matches the content of the mirror-reflected virtual image;
[0229] Based on the optical parameters, the chromaticity of the adjusted image of the user is adjusted to obtain an equivalent image of the mirror-reflected virtual image.
[0230] In some embodiments, the reversing unit 93 is specifically used to:
[0231] Reversing the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image to obtain a new pixel value after the grayscale value is reversed;
[0232] Based on the new pixel value after the grayscale value is inverted, an inverted image of the equivalent image corresponding to the mirror reflection virtual image is obtained.
[0233] In some embodiments, the reversal unit 93 includes: a second determination subunit and a reversal subunit; wherein,
[0234] The second determining subunit is used to determine the maximum gray level in the gray level range corresponding to the equivalent image of the mirror-reflected virtual image;
[0235] The inversion subunit is used to invert the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image based on the determined maximum grayscale level, so as to obtain a new pixel value after the grayscale value is inverted.
[0236] In practical application, the second determining subunit is specifically used for one of the following:
[0237] Determine the maximum gray level in a preset manner;
[0238] A blank image is acquired, and the maximum grayscale level is determined based on an average value of pixel values of the blank image.
[0239] In some embodiments, the synthesis unit 94 is specifically used to:
[0240] For each corresponding pixel value in the image of the content to be displayed and the inverted image, determine each synthesized pixel value based on a product value of the corresponding pixel value in the image of the content to be displayed and the first transparency level, and a product value of the corresponding pixel value in the inverted image and the second transparency level;
[0241] Based on the synthesized pixel values, the synthesized image is obtained; wherein,
[0242] The first transparency level corresponds to the image of the content to be displayed, and the second transparency level corresponds to the inverted image; the sum of the first transparency level and the second transparency level is a first value.
[0243] In some embodiments, the synthesis unit 94 is further specifically used for:
[0244] Constructing a first Laplacian pyramid image corresponding to the image of the content to be displayed and a second Laplacian pyramid image corresponding to the inverted image; the number of layers of the first Laplacian pyramid image is equal to the number of layers of the second Laplacian pyramid image;
[0245] For each corresponding level in the first Laplacian pyramid image and the second Laplacian pyramid image, determine synthesized images of each level based on a product value of the corresponding level in the first Laplacian pyramid image and a corresponding first mask value, and a product value of the corresponding level in the second Laplacian pyramid image and a corresponding second mask value;
[0246] The synthesized image is obtained based on the synthesized images of each level.
[0247] In some embodiments, the synthesis unit 94 is further specifically used for:
[0248] Determine an image synthesis area; the texture of the image in the image synthesis area satisfies a first set condition;
[0249] Poisson synthesis processing is performed on the image of the content to be displayed in the image synthesis area and the corresponding pixel values in the inverted image to obtain the synthesized image.
[0250] Here, in actual application, the acquisition unit 91 can be implemented by a communication interface in the image processing device; the determination unit 92, the reversal unit 93, the synthesis unit 94 and the display unit 95 can be implemented by a processor in the image processing device in combination with the communication interface.
[0251] It should be noted that the image processing device provided in the above embodiment only uses the division of the above program modules as an example when performing image processing. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the image processing device provided in the above embodiment and the image processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0252] Based on the composition structure of the above program modules, and in order to implement the image processing method of the embodiment of the present application, the embodiment of the present application also provides a terminal, Fig.10 A schematic diagram of the hardware structure of the terminal provided in the embodiment of the present application is shown in FIG. Fig.10 As shown, the terminal 100 includes:
[0253] Communication interface 101, used to obtain an image of content to be displayed;
[0254] The processor 102 is connected to the communication interface 101 and is used to execute the method provided by one or more technical solutions on the terminal side when running a computer program. The computer program is stored in the memory 103.
[0255] Specifically, the processor 102 is used to determine an equivalent image of a mirror-reflected virtual image; the equivalent image of the mirror-reflected virtual image is used to represent the approximate replacement of the real image by the mirror-reflected virtual image on the mirror display screen of the terminal, and the mirror-reflected virtual image is formed based on the mirror reflection of the mirror display screen; the equivalent image of the mirror-reflected virtual image is subjected to image inversion processing to obtain an inverted image; the image of the content to be displayed is subjected to image synthesis processing with the inverted image to obtain a synthesized image; and the synthesized image is displayed on the mirror display screen.
[0256] In some embodiments, the processor 102 is specifically configured to:
[0257] Acquire an image of a user; the image of the user has a positional relationship with the mirror display screen;
[0258] Obtaining optical parameters related to the mirror display screen;
[0259] Based on the image of the user and the optical parameters, an equivalent image of the specularly reflected virtual image is determined.
[0260] In some embodiments, the processor 102 is specifically configured to:
[0261] Sensing the location of the user by means of a sensing device of the terminal;
[0262] When it is sensed that the user is located in a predetermined area, an image of the user is acquired; the shooting range of the image of the user at least includes an incident content range corresponding to the mirror-reflected virtual image.
[0263] In some embodiments, the processor 102 is specifically configured to:
[0264] Determining a posture of a user when acquiring an image of the user; the posture includes at least one of a position and a posture;
[0265] When it is detected that the target posture is the determined posture, optical parameters related to the mirror display screen are obtained.
[0266] In some embodiments, the processor 102 is specifically configured to:
[0267] Adjusting the content of the image of the user to obtain an adjusted image of the user; wherein the content of the adjusted image of the user matches the content of the mirror-reflected virtual image;
[0268] Based on the optical parameters, the chromaticity of the adjusted image of the user is adjusted to obtain an equivalent image of the mirror-reflected virtual image.
[0269] In some embodiments, the processor 102 is specifically configured to:
[0270] Reversing the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image to obtain a new pixel value after the grayscale value is reversed;
[0271] Based on the new pixel value after the grayscale value is inverted, an inverted image of the equivalent image corresponding to the mirror reflection virtual image is obtained.
[0272] In some embodiments, the processor 102 is specifically configured to:
[0273] Determine the maximum gray level in the gray level range corresponding to the equivalent image of the specular reflection virtual image;
[0274] Based on the determined maximum grayscale level, the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image is inverted to obtain a corresponding new pixel value after the grayscale value is inverted.
[0275] In some embodiments, the processor 102 is specifically configured to:
[0276] Determine the maximum gray level in a preset manner;
[0277] A blank image is acquired, and the maximum grayscale level is determined based on an average value of pixel values of the blank image.
[0278] In some embodiments, the processor 102 is specifically configured to:
[0279] For each corresponding pixel value in the image of the content to be displayed and the inverted image, determine each synthesized pixel value based on a product value of the corresponding pixel value in the image of the content to be displayed and the first transparency level, and a product value of the corresponding pixel value in the inverted image and the second transparency level;
[0280] Based on the synthesized pixel values, the synthesized image is obtained; wherein,
[0281] The first transparency level corresponds to the image of the content to be displayed, and the second transparency level corresponds to the inverted image; the sum of the first transparency level and the second transparency level is a first value.
[0282] In some embodiments, the processor 102 is specifically configured to:
[0283] Constructing a first Laplacian pyramid image corresponding to the image of the content to be displayed and a second Laplacian pyramid image corresponding to the inverted image; the number of layers of the first Laplacian pyramid image is equal to the number of layers of the second Laplacian pyramid image;
[0284] For each corresponding level in the first Laplacian pyramid image and the second Laplacian pyramid image, determine synthesized images of each level based on a product value of the corresponding level in the first Laplacian pyramid image and a corresponding first mask value, and a product value of the corresponding level in the second Laplacian pyramid image and a corresponding second mask value;
[0285] The synthesized image is obtained based on the synthesized images of each level.
[0286] In some embodiments, the processor 102 is specifically configured to:
[0287] Determine an image synthesis area; the texture of the image in the image synthesis area satisfies a first set condition;
[0288] Poisson synthesis processing is performed on the image of the content to be displayed in the image synthesis area and the corresponding pixel values in the inverted image to obtain the synthesized image.
[0289] It should be noted that the specific processing process of the communication interface 101 and the processor 102 is detailed in the method embodiment and will not be repeated here.
[0290] Of course, in actual application, the various components in the terminal 100 are coupled together through the bus system 104. It can be understood that the bus system 104 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 104 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig.10 Various buses are labeled as bus system 104 .
[0291] The memory 103 in the embodiment of the present application is used to store various types of data to support the operation of the terminal 100. Examples of such data include: any computer program used to operate on the terminal 100.
[0292] The image processing method disclosed in the above embodiment of the present application can be applied to the processor 102, or implemented by the processor 102. The processor 102 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above image processing method can be completed by the hardware integrated logic circuit or software instructions in the processor 102. The above processor 102 may be a general processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 102 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 103, and the processor 102 reads the information in the memory 103, and completes the steps of the image processing method on the terminal side in combination with its hardware.
[0293] In an exemplary embodiment, the terminal 100 may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor or other electronic components to execute the aforementioned terminal side image processing method.
[0294] It can be understood that the memory 103 of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory.
[0295] Volatile memory can be random access memory (RAM, Random Access Memory), which is used as external high-speed cache. By exemplary but not restrictive explanation, many forms of RAM are available, such as static random access memory (SRAM, Static Random Access Memory), synchronous static random access memory (SSRAM, Synchronous Static Random Access Memory), dynamic random access memory (DRAM, Dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced synchronous dynamic random access memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), synchronous connection dynamic random access memory (SLDRAM, Sync Link Dynamic Random Access Memory), direct memory bus random access memory (DRRAM, Direct Rambus Random Access Memory). The memory described in the embodiment of the application is intended to include but is not limited to these and any other suitable type of memory.
[0296] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, which may be a computer-readable storage medium, for example, a memory 103 storing a computer program, and the computer program may be executed by the processor 102 of the terminal 100 to complete the steps of the aforementioned terminal-side image processing method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk or CD-ROM; or may be various devices including one or any combination of the above memories.
[0297] In order to effectively solve the problem that the virtual image generated by the mirror reflection of the mirror display screen of the terminal causes visual interference to the viewing of the content displayed on the display screen, the embodiment of the present application also provides an image processing system, Fig.11 A schematic diagram of the structure of the image processing system provided in the embodiment of the present application is shown in FIG. Fig.11 As shown, the system mainly includes the following modules:
[0298] The user image acquisition module 111 is used to acquire and output the user's image when the user normally views the screen of the mirror display screen, and the user's image has a positional relationship with the mirror display screen.
[0299] The optical parameter acquisition module 112 is used to obtain optical parameters related to the mirror display screen, such as reflectivity, refractive index, incident light chromaticity, reflected light chromaticity, incident light wavelength, reflected light wavelength, incident angle, reflection angle, etc. of the mirror display screen. In specific implementation, if some measurements are made manually, the optical parameter acquisition module 112 needs to have a human-computer interaction function to collect manual parameters.
[0300] The image acquisition module 113 of the content to be displayed is used to acquire the image of the content to be displayed on the mirror display screen and output it.
[0301] The virtual image equivalent image determination module 114 is used to adjust the content of the user's image obtained by the user image acquisition module 111 (perform operations such as zooming, translation, and cropping), and then adjust the chromaticity of the adjusted user's image based on the optical parameters related to the mirror display screen obtained by the optical parameter acquisition module 112 to obtain an equivalent image of the mirror reflection virtual image. In specific implementation, if some measurements are made by manual measurement, then this module needs to have a human-computer interaction function to collect manual parameters.
[0302] The image inversion module 115 is used to perform image inversion processing on the equivalent image of the mirror reflection virtual image to obtain an inverted image.
[0303] The image synthesis module 116 is used to perform image synthesis processing on the inverted image and the image of the content to be displayed to obtain a synthesized image, and output the synthesized image.
[0304] The image display module 117 is used to display the composite image on the mirror display screen.
[0305] It should be noted that the specific processing process of the above modules has been described in detail above and will not be repeated here.
[0306] By adopting the solution provided in the embodiment of the present application, there is no need to change the angle of the mirror display screen, and the viewing quality will not be affected by the change in the angle of the mirror display screen; the external form of the original device is not changed, the user operation experience such as touch screen operation is not affected, and the heat dissipation of the device is not affected; it is suitable for mirror displays of various desktops, laptops, mobile phones or other smart devices; there is no need to change the backlight of the mirror display screen, and no additional visual burden will be caused by changes in brightness.
[0307] In the embodiments of the present application, the terms "first", "second", etc. are merely used to distinguish similar objects and do not represent a specific order or sequence for the objects. It can be understood that "first", "second", etc. can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0308] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An image processing method, It is characterized in that Applied to a terminal, the method comprises: Obtain an image of content to be displayed; Determine an equivalent image of a specularly reflected virtual image; the equivalent image of the specularly reflected virtual image is used to represent an approximate replacement real image of the specularly reflected virtual image on a specular display screen of the terminal, wherein the specularly reflected virtual image is formed based on specular reflection of the specular display screen; Performing image inversion processing on the equivalent image of the mirror-reflected virtual image to obtain an inverted image; Performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image; The composite image is displayed on the mirror display screen.
2. The method according to claim 1, It is characterized in that The step of determining an equivalent image of a specularly reflected virtual image comprises: Acquire an image of a user; the image of the user has a positional relationship with the mirror display screen; Obtaining optical parameters related to the mirror display screen; Based on the image of the user and the optical parameters, an equivalent image of the specularly reflected virtual image is determined.
3. The method according to claim 2, It is characterized in that The obtaining of the user's image includes: Sensing the location of the user by means of a sensing device of the terminal; When it is sensed that the user is located in a predetermined area, an image of the user is acquired; the shooting range of the image of the user at least includes an incident content range corresponding to the mirror-reflected virtual image.
4. The method according to claim 2, It is characterized in that The obtaining of optical parameters related to the mirror display screen includes: Determining a posture of a user when acquiring an image of the user; the posture includes at least one of a position and a posture; When it is detected that the target posture is the determined posture, optical parameters related to the mirror display screen are obtained.
5. The method according to claim 2, It is characterized in that The determining, based on the image of the user and the optical parameters, an equivalent image of the specular reflection virtual image comprises: Adjusting the content of the image of the user to obtain an adjusted image of the user; wherein the content of the adjusted image of the user matches the content of the mirror-reflected virtual image; Based on the optical parameters, the chromaticity of the adjusted image of the user is adjusted to obtain an equivalent image of the mirror-reflected virtual image.
6. The method according to claim 1, It is characterized in that The step of performing image inversion processing on the equivalent image of the mirror-reflected virtual image to obtain an inverted image comprises: Reversing the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image to obtain a new pixel value after the grayscale value is reversed; Based on the new pixel value after the grayscale value is inverted, an inverted image of the equivalent image corresponding to the mirror reflection virtual image is obtained.
7. The method according to claim 6, It is characterized in that The grayscale value of each pixel in the equivalent image of the mirror-reflected virtual image is inverted to obtain a new pixel value after the corresponding grayscale value is inverted, including: Determine the maximum gray level in the gray level range corresponding to the equivalent image of the specular reflection virtual image; Based on the determined maximum grayscale level, the grayscale value of each pixel in the equivalent image of the mirror reflection virtual image is inverted to obtain a corresponding new pixel value after the grayscale value is inverted.
8. The method according to claim 7, It is characterized in that Determining the maximum grayscale level in the grayscale range corresponding to the equivalent image of the specular reflection virtual image includes one of the following: Determine the maximum gray level in a preset manner; A blank image is acquired, and the maximum grayscale level is determined based on an average value of pixel values of the blank image.
9. The method according to claim 1, It is characterized in that The step of performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image includes: For each corresponding pixel value in the image of the content to be displayed and the inverted image, determine each synthesized pixel value based on a product value of the corresponding pixel value in the image of the content to be displayed and the first transparency level, and a product value of the corresponding pixel value in the inverted image and the second transparency level; Based on the synthesized pixel values, the synthesized image is obtained; wherein, The first transparency level corresponds to the image of the content to be displayed, and the second transparency level corresponds to the inverted image; the sum of the first transparency level and the second transparency level is a first value.
10. The method according to claim 1, It is characterized in that The step of performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image includes: Constructing a first Laplacian pyramid image corresponding to the image of the content to be displayed and a second Laplacian pyramid image corresponding to the inverted image; the number of layers of the first Laplacian pyramid image is equal to the number of layers of the second Laplacian pyramid image; For each corresponding level in the first Laplacian pyramid image and the second Laplacian pyramid image, determine synthesized images of each level based on a product value of the corresponding level in the first Laplacian pyramid image and a corresponding first mask value, and a product value of the corresponding level in the second Laplacian pyramid image and a corresponding second mask value; The synthesized image is obtained based on the synthesized images of each level.
11. The method according to claim 1, It is characterized in that The step of performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image includes: Determine an image synthesis area; the texture of the image in the image synthesis area satisfies a first set condition; Poisson synthesis processing is performed on the image of the content to be displayed in the image synthesis area and the corresponding pixel values in the inverted image to obtain the synthesized image.
12. An image processing device, It is characterized in that Applied to a terminal, the device comprises: An acquisition unit, used for acquiring an image of content to be displayed; a determination unit, configured to determine an equivalent image of a specularly reflected virtual image; the equivalent image of the specularly reflected virtual image is used to represent an approximate replacement real image of the specularly reflected virtual image on a specular display screen of the terminal, the specularly reflected virtual image being formed based on specular reflection of the specular display screen; An inversion unit, used for performing image inversion processing on an equivalent image of the mirror-reflected virtual image to obtain an inverted image; A synthesis unit, used for performing image synthesis processing on the image of the content to be displayed and the inverted image to obtain a synthesized image; A display unit is used to display the composite image on the mirror display screen.
13. A terminal, It is characterized in that The terminal comprises: A communication interface for acquiring an image of content to be displayed; A processor is used to determine an equivalent image of a mirror-reflected virtual image; the equivalent image of the mirror-reflected virtual image is used to represent the approximate replacement of the real image of the mirror-reflected virtual image on the mirror display screen of the terminal, and the mirror-reflected virtual image is formed based on the mirror reflection of the mirror display screen; the equivalent image of the mirror-reflected virtual image is subjected to image inversion processing to obtain an inverted image; the image of the content to be displayed is subjected to image synthesis processing with the inverted image to obtain a synthesized image; and the synthesized image is displayed on the mirror display screen.
14. A terminal, It is characterized in that The terminal comprises: a processor and a memory for storing a computer program that can be run on the processor; Wherein, when the processor is used to run the computer program, it executes the steps of the image processing method according to any one of claims 1 to 11.
15. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Field sequential color display with a composite color
CN103548074A
Field sequential color display with a composite color
CN105551419A
