Display method, device, electronic equipment, storage medium and computer program product

By detecting the user's glasses in the electronic device and converting the display color values ​​using a target conversion matrix, the problem of visual color deviation when wearing glasses is solved, achieving accuracy and consistency in color display.

CN122290547APending Publication Date: 2026-06-26BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411919342.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Users may experience visual color distortion when viewing electronic device displays while wearing sunglasses or other eyewear.

Method used

The device collects image data through electronic devices to detect whether the user is wearing glasses. Based on the detection results, it determines the target conversion matrix from a preset matrix set and uses this matrix to convert the color values ​​in the display screen's native color space to the color values ​​in the target color space for display.

Benefits of technology

It reduces visual color deviation when wearing glasses, achieving accuracy and consistency in color display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122290547A_ABST
    Figure CN122290547A_ABST
Patent Text Reader

Abstract

This disclosure relates to a display method, apparatus, electronic device, storage medium, and computer program product. The method includes: responding to an electronic device detecting a target object wearing glasses based on acquired image data; determining a detection result of the glasses device based on the image data; determining a target conversion matrix from a preset matrix set based on the detection result; wherein the preset conversion matrix in the matrix set is determined based on the spectral distribution parameters of light emitted by the display device and the spectral distribution parameters of light transmitted through the glasses device; and converting the color values ​​of the electronic device's display screen in its native color space to color values ​​in a target color space based on the target conversion matrix, and displaying the image. This allows the determined target conversion matrix to correspond to the glasses device worn by the user, automatically adjusting the color display effect of the electronic device based on the glasses device, thereby reducing visual color deviation when wearing glasses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of display technology, and in particular to a display method, apparatus, electronic device, storage medium, and computer program product. Background Technology

[0002] When users view electronic device screens using eyeglasses, it can cause visual color distortion. For example, in summer or subtropical regions like islands, users often need to wear sunglasses outdoors to block harmful ultraviolet rays from reaching their eyes. Currently, various tinted sunglasses are commonly available on the market, primarily brown and red. When users wear sunglasses to view electronic device screens, visual color distortion can occur. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a display method, apparatus, electronic device, storage medium, and computer program product. These can reduce visual color deviation when wearing glasses.

[0004] According to a first aspect of the present disclosure, a display method is provided, comprising:

[0005] In response to an electronic device detecting that a target object is wearing glasses based on acquired image data, the detection result for the glasses is determined based on the image data.

[0006] Based on the detection results, a target conversion matrix is ​​determined from a preset matrix set; wherein the matrix set includes at least one preset conversion matrix, and the preset conversion matrix is ​​determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device;

[0007] Based on the target conversion matrix, the color values ​​of the electronic device's display screen in the native color space are converted to the color values ​​in the target color space, and then the image is displayed.

[0008] In some embodiments, determining the target transformation matrix from a preset matrix set based on the detection results includes:

[0009] Determine the light transmittance parameters of the eyeglasses device indicated by the test results; wherein the light transmittance parameters are related to the light transmittance performance of the lenses of the eyeglasses device;

[0010] The target transformation matrix is ​​determined from the matrix set based on the light transmission parameters; wherein the preset transformation matrix corresponds to different light transmission parameters.

[0011] In some embodiments, the method further includes:

[0012] Acquire a first spectral distribution parameter of the initial light emitted from the display screen of the test device, and a second spectral distribution parameter obtained by the initial light passing through at least one test glasses device; wherein the type of the test device is the same as the type of the electronic device, and the second spectral distribution parameter is related to the light transmission parameter of the test glasses device;

[0013] For each of the test glasses devices, a preset transformation matrix is ​​determined based on the first spectral distribution parameter and the second spectral distribution parameter;

[0014] The matrix set is formed based on each of the preset transformation matrices.

[0015] In some embodiments, determining the preset transformation matrix based on the first spectral distribution parameter and the second spectral distribution parameter includes:

[0016] The first coordinate value of the reference pixel in the target color space is determined based on the first spectral distribution parameter, and the second coordinate value of the reference pixel in the target color space is determined based on the second spectral distribution parameter.

[0017] The preset transformation matrix is ​​determined based on the third coordinate value, the first coordinate value, and the second coordinate value of the reference pixel in the native color space.

[0018] In some embodiments, determining the preset transformation matrix based on the third coordinate value, the first coordinate value, and the second coordinate value of the reference pixel in the native color space includes:

[0019] A first matrix is ​​determined based on the third coordinate value and the first coordinate value, and a second matrix is ​​determined based on the third coordinate value and the second coordinate value;

[0020] The preset transformation matrix is ​​determined based on the first matrix and the second matrix.

[0021] In some embodiments, the method further includes:

[0022] In response to the failure to detect the target object based on the image data, or the detection that the target object is not wearing the glasses device, the color values ​​of the display screen of the electronic device in the native color space are converted to the color values ​​in the target color space based on a preset reference conversion matrix, and the image is displayed.

[0023] The reference transformation matrix and the preset transformation matrix are different.

[0024] According to a second aspect of the present disclosure, a display device is provided, comprising:

[0025] The first determining module is configured to, in response to an electronic device detecting a target object wearing glasses based on acquired image data, determine a detection result for the glasses based on the image data.

[0026] The second determining module is configured to determine a target transformation matrix from a preset matrix set based on the detection result; wherein the matrix set includes at least one preset transformation matrix, the preset transformation matrix being determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device;

[0027] The first conversion module is configured to convert the color values ​​of the display screen of the electronic device in the native color space to the color values ​​in the target color space based on the target conversion matrix, and then display the image.

[0028] In some embodiments, the second determining module is configured to:

[0029] Determine the light transmittance parameters of the eyeglasses device indicated by the test results; wherein the light transmittance parameters are related to the light transmittance performance of the lenses of the eyeglasses device;

[0030] The target transformation matrix is ​​determined from the matrix set based on the light transmission parameters; wherein the preset transformation matrix corresponds to different light transmission parameters.

[0031] In some embodiments, the apparatus further includes:

[0032] The acquisition module is configured to acquire a first spectral distribution parameter of the initial light emitted from the display screen of the test device, and a second spectral distribution parameter obtained by the initial light passing through at least one test glasses device; wherein the type of the test device is the same as the type of the electronic device, and the second spectral distribution parameter is related to the light transmission parameter of the test glasses device;

[0033] The third determining module is configured to determine a preset transformation matrix for each of the test glasses devices based on the first spectral distribution parameters and the second spectral distribution parameters;

[0034] The building module is configured to form the matrix set based on each of the preset transformation matrices.

[0035] In some embodiments, the third determining module is configured to:

[0036] The first coordinate value of the reference pixel in the target color space is determined based on the first spectral distribution parameter, and the second coordinate value of the reference pixel in the target color space is determined based on the second spectral distribution parameter.

[0037] The preset transformation matrix is ​​determined based on the third coordinate value, the first coordinate value, and the second coordinate value of the reference pixel in the native color space.

[0038] In some embodiments, the third determining module is configured to:

[0039] A first matrix is ​​determined based on the third coordinate value and the first coordinate value, and a second matrix is ​​determined based on the third coordinate value and the second coordinate value;

[0040] The preset transformation matrix is ​​determined based on the first matrix and the second matrix.

[0041] In some embodiments, the apparatus further includes:

[0042] The second conversion module is configured to, in response to the absence of detection of the target object based on the image data, or the detection that the target object is not wearing the glasses device, convert the color values ​​of the display screen of the electronic device in the native color space to the color values ​​in the target color space based on a preset reference conversion matrix, and then display the image.

[0043] The reference transformation matrix and the preset transformation matrix are different.

[0044] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0045] processor;

[0046] Memory used to store computer programs or instructions;

[0047] The processor executes the computer program or instructions to implement the steps in any of the methods in the first aspect described above.

[0048] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, comprising:

[0049] When the computer program or instructions in the storage medium are executed by a processor, the steps in any of the methods in the first aspect described above are implemented.

[0050] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of any of the methods in the first aspect described above.

[0051] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0052] In this embodiment of the present disclosure, when it is detected that the target object is wearing glasses, a target conversion matrix can be determined from a preset matrix set based on the detection result of the glasses, and the color values ​​of the display screen of the electronic device in the native color space can be converted to the color values ​​in the target color space based on the target conversion matrix, and the image is displayed.

[0053] A preset conversion matrix is ​​determined in advance based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device. A target conversion matrix is ​​determined from each preset conversion matrix based on the detection results of the glasses device. This allows the determined target conversion matrix to correspond to the glasses device worn by the user. The color display effect of the electronic device is automatically adjusted by the glasses device, thereby reducing the visual color deviation when wearing the glasses device.

[0054] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0055] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0056] Figure 1 This is a flowchart illustrating a display method according to an exemplary embodiment.

[0057] Figure 2 This is a schematic diagram of spectral comparison according to an exemplary embodiment.

[0058] Figure 3 This is a block diagram illustrating a display device according to an exemplary embodiment.

[0059] Figure 4 This is a structural block diagram of a device 4000 according to an exemplary embodiment. Detailed Implementation

[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0061] Figure 1 This is a flowchart illustrating a display method according to an exemplary embodiment. For example... Figure 1 As shown, the method mainly includes the following steps:

[0062] In step 101, in response to the electronic device detecting that the target object is wearing glasses based on the acquired image data, the detection result of the glasses device is determined based on the image data;

[0063] In step 102, based on the detection results, a target transformation matrix is ​​determined from a preset matrix set; wherein, the matrix set includes at least one preset transformation matrix, and the preset transformation matrix is ​​determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device;

[0064] In step 103, based on the target conversion matrix, the color values ​​of the electronic device's display screen in the native color space are converted to the color values ​​in the target color space, and the image is displayed.

[0065] It should be noted that the display method proposed in this disclosure can be applied to electronic devices. Here, electronic devices may include terminal devices, such as mobile terminals or fixed terminals. Mobile terminals may include mobile phones, tablets, laptops, wearable electronic devices, etc. Fixed terminals may include desktop computers, smart TVs, in-vehicle systems, etc. In other embodiments, the display method can also be applied to applications installed on electronic devices.

[0066] In other embodiments, the display method described in this disclosure can be configured in a display device, which can be located in an electronic device; this disclosure does not limit this. It should be noted that the execution entity of this disclosure can be a central processing unit (CPU) in the electronic device in hardware, and related background services in the electronic device in software; this is not limited.

[0067] In this embodiment of the disclosure, image data can be acquired using the image acquisition module of an electronic device, and the acquired image data can be used to detect whether a target object is wearing glasses. The target object can be a user currently using the electronic device.

[0068] In some embodiments, it can be determined whether the electronic device is in a holding state based on sensing parameters collected by the electronic device's sensors, and the device posture of the electronic device can be determined based on the sensing parameters. If it is determined based on the sensing parameters that the electronic device is in a holding state and the electronic device is facing the face of the target object, the image acquisition module of the electronic device is activated to acquire image data.

[0069] In other embodiments, the image acquisition module can be activated to acquire image data upon detection of a touch operation. For example, a preset control can be displayed on the target page of the electronic device. Upon detection of a touch operation on the preset control, the image acquisition module is activated to acquire image data, and the acquired image data is used to determine whether the target object is wearing glasses.

[0070] In some embodiments, after acquiring image data, it is determined whether the target object is wearing glasses based on the image data. In some embodiments, it is possible to determine whether the target object is wearing glasses based on a pre-trained image processing model. For example, the acquired image data can be input into the image processing model to obtain a result indicating whether the target is wearing glasses. Here, the image processing model may include a neural network model, etc., capable of processing the image data and obtaining a result indicating whether the target is wearing glasses.

[0071] It should be noted that eyewear devices can include: sunglasses (i.e., sunglasses), such as UV-protective glasses, polarized sunglasses, etc.; protective glasses, such as safety glasses, sports glasses, etc.; contact lenses, such as tinted contact lenses, etc.; and corrective glasses, such as glasses for nearsightedness, glasses for farsightedness, etc.

[0072] When it is determined that the target user is wearing glasses, the detection result of the glasses can be determined based on image data, and the target transformation matrix can be determined from a preset matrix set based on the detection result.

[0073] Here, the test results for the eyeglasses device can be used to indicate the attribute parameters of the lenses of the eyeglasses device. For example, the test results for the eyeglasses device may include at least one of the following: the type of eyeglasses device, the color of the eyeglasses device, the light transmission parameters of the eyeglasses device, etc.

[0074] In some embodiments, the matrix set stores preset attribute parameters and preset transformation matrices corresponding to the preset attribute parameters. A target transformation matrix can be determined from the preset matrix set based on the attribute parameters (detection attribute parameters) of the lens of the eyewear device indicated by the detection results. For example, the attribute parameters of the lens of the eyewear device can be compared with the preset attribute parameters corresponding to each preset transformation matrix in the matrix set, and the preset transformation matrix corresponding to the preset attribute parameter whose difference from the detection attribute parameter is less than a preset difference threshold can be determined as the target transformation matrix.

[0075] In other embodiments, the matrix set stores preset identifiers and corresponding preset transformation matrices. After detecting the eyewear device and obtaining a detection result, a detection identifier corresponding to the detection result can be determined. This detection identifier is then compared with each preset identifier in the matrix set, and a target transformation matrix is ​​determined based on the comparison result. For example, the preset transformation matrix corresponding to a preset identifier identical to the detection identifier can be determined as the target transformation matrix. The detection identifier can be used to identify at least one of the following: the type of eyewear device, the color of the eyewear device, the light transmission parameters of the eyewear device, etc.

[0076] In other embodiments, the matrix set stores preset types and corresponding preset transformation matrices. Taking the detection result of an eyeglass device as an example, after obtaining the type of the eyeglass device, a target transformation matrix can be determined from the preset matrix set based on the type of the eyeglass device. For example, after detecting the eyeglass device and determining its type, the type of the eyeglass device can be compared with preset types in the matrix set, and the preset transformation matrix corresponding to the preset type that matches the type of the eyeglass device can be determined as the target transformation matrix.

[0077] In some embodiments, the mapping relationship between the eyewear device and a preset transformation matrix can be determined in advance through testing. For example, a mapping relationship between the type of eyewear device and the preset transformation matrix can be established in advance. Thus, after determining the type of eyewear device, a preset transformation matrix corresponding to the type of eyewear device can be determined based on the type of eyewear device and the mapping relationship, and this preset transformation matrix corresponding to the type of eyewear device can be determined as the target transformation matrix. For example, when the detection result determines that the eyewear device is sunglasses, the preset transformation matrix corresponding to sunglasses in the matrix set can be determined as the target transformation matrix.

[0078] In some embodiments, determining a target transformation matrix from a preset set of matrices based on the detection results includes: determining the light transmission parameters of the eyewear device indicated by the detection results; wherein the light transmission parameters are related to the light transmission performance of the lenses of the eyewear device; determining the target transformation matrix from the set of matrices based on the light transmission parameters; wherein different preset transformation matrices correspond to different light transmission parameters.

[0079] It should be noted that light transmission parameters may include at least one of the following: light transmittance, refractive index, dispersion coefficient, reflectance, ultraviolet cutoff point, and light absorption parameters. When at least one of the following factors—the type of eyewear, the color of the lenses, the material of the lenses, or the thickness of the lenses—is different, the corresponding light transmission parameters will also differ, and the indicated light transmission performance will also vary.

[0080] In this embodiment of the disclosure, the light transmission parameters of the eyeglasses device can be determined based on the detection results of the eyeglasses device, and the target transformation matrix can be determined from the matrix set based on the light transmission parameters.

[0081] In some embodiments, a mapping relationship between the light transmittance parameters of the eyeglasses and a preset transformation matrix can be established in advance. Thus, after determining the light transmittance parameters of the eyeglasses, a preset transformation matrix corresponding to the light transmittance parameters of the eyeglasses can be determined based on the light transmittance parameters and the mapping relationship, and this preset transformation matrix is ​​determined as the target transformation matrix. For example, if the detection result determines that the light transmittance of the eyeglasses is 85%, the target transformation matrix corresponding to a light transmittance of 85% can be determined from the matrix set.

[0082] By associating the light transmission parameters of the eyewear device with a preset transformation matrix, the determined target transformation matrix can correspond to the light transmission parameters of the eyewear device. By flexibly selecting the corresponding target transformation matrix based on the light transmission parameters, the converted color value can be adapted to the light transmission parameters of the eyewear device, thereby reducing visual color distortion.

[0083] It should be noted that during image display, color values ​​in different color spaces can be converted using a transformation matrix (also known as a linear transformation matrix) for color correction. After color correction, related color processing such as brightness correction, color gamut mapping, or color temperature mapping can be achieved. For example, a transformation matrix can be used to convert color values ​​between the RGB color space and the XYZ color space.

[0084] Here, the RGB color space is related to the performance of the display; different displays will produce different color effects when displaying the same RGB values. The XYZ color space, on the other hand, is a standard color space independent of the display. When performing color gamut mapping (such as color gamut compression, tone compression, etc.), the XYZ color space allows for conversion between different color gamuts. In some embodiments, converting RGB values ​​to XYZ values ​​makes color gamut matching and compression easier, thereby ensuring consistency and accuracy of output colors across different displays.

[0085] In some embodiments, the deviation value of the light emitted by the display device passing through the eyeglasses device can be determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light passing through the eyeglasses device, and the reference transformation matrix can be corrected based on the deviation value to obtain a preset transformation matrix.

[0086] Viewing color values ​​through glasses after converting them from the native color space to the target color space using a target conversion matrix, and viewing them without glasses after converting them from the native color space to the target color space using a reference conversion matrix, produce the same visual effect. The reference conversion matrix is ​​a preset standard conversion matrix.

[0087] In this embodiment of the present disclosure, when it is detected that the target object is wearing glasses, a target conversion matrix can be determined from a preset matrix set based on the detection result of the glasses, and the color values ​​of the display screen of the electronic device in the native color space can be converted to the color values ​​in the target color space based on the target conversion matrix, and the image is displayed.

[0088] A preset conversion matrix is ​​determined in advance based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device. A target conversion matrix is ​​then determined from each preset conversion matrix based on the detection results of the glasses device. This allows the determined target conversion matrix to correspond to the glasses device worn by the user. The color display effect of the electronic device is automatically adjusted by the glasses device, thereby reducing visual color deviation when wearing the glasses device.

[0089] In some embodiments, the method further includes:

[0090] Acquire the first spectral distribution parameters of the initial light emitted from the display screen of the test device, and the second spectral distribution parameters of the initial light obtained through at least one test glasses device; wherein the type of test device is the same as the type of electronic device, and the second spectral distribution parameters are related to the light transmission parameters of the test glasses device;

[0091] For each test glasses device, a preset transformation matrix is ​​determined based on the first spectral distribution parameter and the second spectral distribution parameter;

[0092] A matrix set is formed based on each preset transformation matrix.

[0093] During the testing phase, the light emitted from the display screen of the testing device can be tested using optical instruments. For example, a first spectral distribution parameter of the initial light emitted from the display screen of the testing device and a second spectral distribution parameter obtained by the initial light passing through at least one testing eyeglass device can be obtained using a spectrometer. Different testing eyeglass devices have different attribute parameters, resulting in different second spectral distribution parameters. For example, the measured second spectral distribution parameter will differ depending on the light transmission parameters of the testing eyeglass devices.

[0094] like Figure 2 As shown, the spectral distribution parameters 202 of the initial light emitted by the display screen and the spectral distribution parameters 201 of the initial light obtained through the sunglasses are different.

[0095] After obtaining the first spectral distribution parameter and the second spectral distribution parameter, a preset transformation matrix can be determined based on the first spectral distribution parameter and the second spectral distribution parameter. Then, each preset transformation matrix obtained by the test equipment for different test glasses equipment can be obtained, and a matrix set can be formed based on each preset transformation matrix.

[0096] After obtaining the matrix set, the matrix set can be stored in an electronic device of the same type as the test device, for example, in the preset cache space of the electronic device. In this way, when the electronic device detects that the user is wearing glasses, it can directly determine the corresponding preset conversion matrix from the matrix set of the electronic device and use the determined preset conversion matrix as the target conversion matrix for color conversion.

[0097] In this embodiment of the present disclosure, during the testing phase, a preset conversion matrix corresponding to different glasses devices can be determined based on the spectral distribution parameters, and a matrix set can be constructed based on the preset conversion matrix. The preset conversion matrix is ​​determined in advance based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device, and the matrix set is constructed. In this way, when displaying the screen, the electronic device can select the corresponding preset conversion matrix from the matrix set based on different detection results, which can improve the flexibility of the screen display.

[0098] In some embodiments, determining a preset transformation matrix based on a first spectral distribution parameter and a second spectral distribution parameter includes: determining a first matrix based on the first spectral distribution parameter and determining a second matrix based on the second spectral distribution parameter. Exemplarily, the first matrix can be determined based on the first spectral distribution parameter and the third coordinate value of the reference pixel in the native color space, and the second matrix can be determined based on the second spectral distribution parameter and the third coordinate value of the reference pixel in the native color space. In some embodiments, determining the first matrix based on the first spectral distribution parameter and the third coordinate value of the reference pixel in the native color space includes: determining the first coordinate value of the reference pixel in the target color space based on the first spectral distribution parameter, and determining the first matrix based on the third coordinate value and the first coordinate value. Determining the second matrix based on the second spectral distribution parameter and the third coordinate value of the reference pixel in the native color space includes: determining the second coordinate value of the reference pixel in the target color space based on the second spectral distribution parameter, and determining the second matrix based on the third coordinate value and the second coordinate value.

[0099] In some embodiments, determining a preset transformation matrix based on a first spectral distribution parameter and a second spectral distribution parameter includes:

[0100] The first coordinate value of the reference pixel in the target color space is determined based on the first spectral distribution parameter, and the second coordinate value of the reference pixel in the target color space is determined based on the second spectral distribution parameter;

[0101] A preset transformation matrix is ​​determined based on the third, first, and second coordinate values ​​of the reference pixel in the native color space.

[0102] In some embodiments, the reference pixel can be a white dot on the screen of an electronic device, also referred to as a reference white dot. In some embodiments, the first spectral distribution parameter can be integrated to obtain the tristimulus value corresponding to the first spectral distribution parameter, and then the first coordinate value can be determined based on the tristimulus value corresponding to the first spectral distribution parameter; the second spectral distribution parameter can be integrated to obtain the tristimulus value corresponding to the second spectral distribution parameter, and then the second coordinate value can be determined based on the tristimulus value corresponding to the second spectral distribution parameter. The coordinate value is the chromaticity coordinate.

[0103] The formula for calculating the tristimulus value corresponding to a spectral distribution parameter by integrating the spectral distribution parameter can be as follows:

[0104]

[0105] In formula (1), Let X represent the spectral power distribution function of the light source, and let X, Y, and Z represent the tristimulus values.

[0106] The formula for determining coordinate values ​​based on the tristimulus values ​​corresponding to the spectral distribution parameters can be as follows:

[0107]

[0108] In formula (2), x, y, and z represent coordinate values.

[0109] In some embodiments, the spectral distribution parameters can be integrally calculated according to the CIE-2015 10° standard to obtain the corresponding coordinate values.

[0110] After obtaining the first coordinate value, a preset transformation matrix can be determined based on the third, first, and second coordinate values ​​of the reference pixel in the native color space.

[0111] In this embodiment of the present disclosure, during the process of obtaining the preset transformation matrix, firstly, by setting a reference pixel, the accuracy of the preset transformation matrix determined due to the influence of the pixel's own parameters can be reduced; secondly, by determining the first coordinate value of the white pixel in the first target color space and the second coordinate value of the reference pixel in the target color space, the color deviation value caused by the glasses device can be obtained, thereby enabling the obtained preset transformation matrix to correspond to the test glasses device.

[0112] In some embodiments, a preset transformation matrix is ​​determined based on the third coordinate value, the first coordinate value, and the second coordinate value of the reference pixel in the native color space, including:

[0113] The first matrix is ​​determined based on the third coordinate value and the first coordinate value, and the second matrix is ​​determined based on the third coordinate value and the second coordinate value.

[0114] Based on the first matrix and the second matrix, determine the preset transformation matrix.

[0115] For example, determining the first coordinate value of the reference pixel in the target color space based on the first spectral distribution parameter can be as follows: The second coordinate value of the reference pixel in the target color space can be determined based on the second spectral distribution parameters as follows: Given that the reference pixel of the display screen has a third coordinate value of [r] in the native color space. x r y ]、[g x g y ]、[b x b y The first coordinate value in the target color space is... The second coordinate value of the reference pixel in the target color space through the glasses device is

[0116] The third coordinate value of the reference pixel in the native color space can be represented as:

[0117]

[0118] The equation for color conversion can be expressed as:

[0119] W = [R,G,B]·ω (4);

[0120] Based on formula (4), we can obtain:

[0121] ω=[R,G,B] -1 ·W (5);

[0122] In formulas (4) and (5), [R,G,B] represents the coordinates of the reference pixel in the native color space, and W represents the coordinates of the reference pixel in the target color space. ω represents the transformation matrix.

[0123] In this embodiment, the third coordinate value and the first coordinate value of the reference pixel in the target color space can be substituted into formula (5) to obtain the first matrix; the third coordinate value and the second coordinate value of the reference pixel in the target color space can be substituted into formula (5) to obtain the second matrix.

[0124] Taking the native color space as RGB and the target color space as XYZ as an example, the first matrix can be represented as Matrix RGBtoXYZ_0 -1 The first matrix is ​​the transformation matrix from the original XYZ color space to the RGB color space of the display screen. The second matrix is ​​represented as Matrix. RGBtoXYZ_1 The second matrix is ​​the conversion matrix for colors transmitted through the glasses from the RGB color space to the XYZ color space.

[0125] After obtaining the first matrix and the second matrix, a preset transformation matrix can be determined based on the first matrix and the second matrix. For example, the preset transformation matrix can be obtained based on the product of the inverse matrix of the first matrix and the second matrix.

[0126] The preset transformation matrix can be represented as: M = Matrix XYZtoRGB_0 ×Matrix RGBtoXYZ_1 , among which, Matrix XYZtoRGB_0 =Matrix RGBtoXYZ_0 -1 .

[0127] Since the preset conversion matrix is ​​obtained based on the first matrix and the second matrix, it fully considers the relevant parameters of the original light of the display screen and the relevant parameters of the light passing through the glasses device. Thus, the preset conversion matrix can realize the transformation from the original state of the display screen to the target state that needs to be adjusted after wearing the glasses device.

[0128] In some embodiments, after obtaining each preset transformation matrix during the testing phase, a mapping relationship between each preset transformation matrix and the corresponding test glasses device can be established, and a matrix set can be constructed based on this mapping relationship. For example, the test glasses device can be identified, and a mapping relationship between the identification and the preset transformation matrix can be established. During the usage phase, if the detection result of the glasses device is obtained, the identification of the glasses device can be determined based on the detection result. The identification of the glasses device is compared with the preset identification, and the target transformation matrix is ​​determined from each preset transformation matrix based on the comparison result. For example, the preset transformation matrix corresponding to the preset identification that is the same as the identification of the glasses device is determined as the target transformation matrix.

[0129] After determining the target conversion matrix, the color values ​​of the electronic device's display screen in the native color space can be converted to the color values ​​in the target color space based on the target conversion matrix, and then the image is displayed. A preset conversion matrix is ​​determined in advance based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light passing through the glasses. The target conversion matrix is ​​then determined from these preset conversion matrices based on the detection results of the glasses. This ensures that the determined target conversion matrix corresponds to the glasses worn by the user, automatically adjusting the color display effect of the electronic device through the glasses, thereby reducing visual color deviation when wearing the glasses.

[0130] For example, when the front-facing camera of an electronic device detects that a user is wearing sunglasses, the preset conversion matrix corresponding to the sunglasses in the matrix set can be determined as the target conversion matrix. Based on the target conversion matrix, the color values ​​of the electronic device's display screen in the native color space are converted to the color values ​​in the target color space, and the image is displayed, so as to achieve the effect of consistent color perception by the human eye regardless of whether sunglasses are worn.

[0131] In some embodiments, the method further includes:

[0132] In response to the failure to detect a target object based on image data, or the detection that the target object is not wearing glasses, the color values ​​of the electronic device's display screen in the native color space are converted to the color values ​​in the target color space based on a preset reference conversion matrix, and the image is displayed; wherein, the reference conversion matrix and the preset conversion matrix are different.

[0133] It should be noted that the reference transformation matrix can be a preset standard transformation matrix.

[0134] In this embodiment of the disclosure, if no target object is detected, or if the target object is detected not wearing glasses, the color value of the electronic device's display screen in the native color space is converted to the color value in the target color space based on a preset reference conversion matrix.

[0135] In the absence of a target object or when the target object is not wearing glasses, directly converting the color values ​​of the electronic device's display screen from its native color space to the target color space based on the reference transformation matrix can ensure the visual authenticity of the colors displayed on the electronic device's display screen as much as possible.

[0136] Figure 3 This is a block diagram illustrating a display device according to an exemplary embodiment, such as... Figure 3 As shown, the display device 300 includes:

[0137] The first determining module 301 is configured to, in response to an electronic device detecting a target object wearing glasses based on acquired image data, determine a detection result for the glasses based on the image data.

[0138] The second determining module 302 is configured to determine a target conversion matrix from a preset matrix set based on the detection result; wherein the matrix set includes at least one preset conversion matrix, the preset conversion matrix being determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device;

[0139] The first conversion module 303 is configured to convert the color values ​​of the display screen of the electronic device in the native color space to the color values ​​in the target color space based on the target conversion matrix, and then display the image.

[0140] In some embodiments, the second determining module 302 is configured to:

[0141] Determine the light transmittance parameters of the eyeglasses device indicated by the test results; wherein the light transmittance parameters are related to the light transmittance performance of the lenses of the eyeglasses device;

[0142] The target transformation matrix is ​​determined from the matrix set based on the light transmission parameters; wherein the preset transformation matrix corresponds to different light transmission parameters.

[0143] In some embodiments, the device 300 further includes:

[0144] The acquisition module is configured to acquire a first spectral distribution parameter of the initial light emitted from the display screen of the test device, and a second spectral distribution parameter obtained by the initial light passing through at least one test glasses device; wherein the type of the test device is the same as the type of the electronic device, and the second spectral distribution parameter is related to the light transmission parameter of the test glasses device;

[0145] The third determining module is configured to determine a preset transformation matrix for each of the test glasses devices based on the first spectral distribution parameters and the second spectral distribution parameters;

[0146] The building module is configured to form the matrix set based on each of the preset transformation matrices.

[0147] In some embodiments, the third determining module is configured to:

[0148] The first coordinate value of the reference pixel in the target color space is determined based on the first spectral distribution parameter, and the second coordinate value of the reference pixel in the target color space is determined based on the second spectral distribution parameter.

[0149] The preset transformation matrix is ​​determined based on the third coordinate value, the first coordinate value, and the second coordinate value of the reference pixel in the native color space.

[0150] In some embodiments, the third determining module is configured to:

[0151] A first matrix is ​​determined based on the third coordinate value and the first coordinate value, and a second matrix is ​​determined based on the third coordinate value and the second coordinate value;

[0152] The preset transformation matrix is ​​determined based on the first matrix and the second matrix.

[0153] In some embodiments, the apparatus further includes:

[0154] The second conversion module is configured to, in response to the absence of detection of the target object based on the image data, or the detection that the target object is not wearing the glasses device, convert the color values ​​of the display screen of the electronic device in the native color space to the color values ​​in the target color space based on a preset reference conversion matrix, and then display the image.

[0155] The reference transformation matrix and the preset transformation matrix are different.

[0156] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0157] Figure 4 This is a structural block diagram illustrating a device 4000 according to an exemplary embodiment. For example, device 4000 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0158] Reference Figure 4 The device 4000 may include one or more of the following components: processing component 4002, memory 4004, power supply component 4006, multimedia component 4008, audio component 4010, input / output (I / O) interface 4012, sensor component 4014, and communication component 4016.

[0159] Processing component 4002 typically controls the overall operation of device 4000, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 4002 may include one or more processors 4020 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 4002 may include one or more modules to facilitate interaction between processing component 4002 and other components. For example, processing component 4002 may include a multimedia module to facilitate interaction between multimedia component 4008 and processing component 4002.

[0160] Memory 4004 is configured to store various types of data to support operation on device 4000. Examples of such data include at least one of the following: instructions for any application or method operating on device 4000, contact data, phonebook data, messages, pictures, and videos. Memory 4004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0161] Power supply component 4006 provides power to various components of device 4000. Power supply component 4006 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 4000.

[0162] Multimedia component 4008 includes a screen that provides an output interface between device 4000 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 4008 includes a front-facing camera and / or a rear-facing camera. When device 4000 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0163] Audio component 4010 is configured to output and / or input audio signals. For example, audio component 4010 includes a microphone (MIC) configured to receive external audio signals when device 4000 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 4004 or transmitted via communication component 4016. In some embodiments, audio component 4010 also includes a speaker for outputting audio signals.

[0164] I / O interface 4012 provides an interface between processing component 4002 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0165] Sensor assembly 4014 includes one or more sensors for providing state assessment of various aspects of device 4000. For example, sensor assembly 4014 may detect the on / off state of device 4000, the relative positioning of components, such as the display and keypad of device 4000, changes in position of device 4000 or one of its components, the presence or absence of user contact with device 4000, orientation or acceleration / deceleration of device 4000, and temperature changes of device 4000. Sensor assembly 4014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 4014 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 4014 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.

[0166] Communication component 4016 is configured to facilitate wired or wireless communication between device 4000 and other devices. Device 4000 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 4016 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 4016 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.

[0167] In an exemplary embodiment, the device 4000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0168] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 4004 including executable instructions or a computer program, which can be executed by the processor 4020 of the device 4000 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0169] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform any of the display methods described above in the embodiments of this disclosure. For example, the method includes:

[0170] In response to an electronic device detecting that a target object is wearing glasses based on acquired image data, the detection result for the glasses is determined based on the image data.

[0171] Based on the detection results, a target conversion matrix is ​​determined from a preset matrix set; wherein the matrix set includes at least one preset conversion matrix, and the preset conversion matrix is ​​determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device;

[0172] Based on the target conversion matrix, the color values ​​of the electronic device's display screen in the native color space are converted to the color values ​​in the target color space, and then the image is displayed.

[0173] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the display methods described above in this disclosure.

[0174] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0175] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A display method, characterized in that, include: In response to an electronic device detecting that a target object is wearing glasses based on acquired image data, the detection result for the glasses is determined based on the image data. Based on the detection results, a target conversion matrix is ​​determined from a preset matrix set; wherein the matrix set includes at least one preset conversion matrix, and the preset conversion matrix is ​​determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device; Based on the target conversion matrix, the color values ​​of the electronic device's display screen in the native color space are converted to the color values ​​in the target color space, and then the image is displayed.

2. The method according to claim 1, characterized in that, The step of determining the target transformation matrix from a preset matrix set based on the detection results includes: Determine the light transmittance parameters of the eyeglasses device indicated by the test results; wherein the light transmittance parameters are related to the light transmittance performance of the lenses of the eyeglasses device; The target transformation matrix is ​​determined from the matrix set based on the light transmission parameters; wherein the preset transformation matrix corresponds to different light transmission parameters.

3. The method according to claim 1, characterized in that, The method further includes: Acquire a first spectral distribution parameter of the initial light emitted from the display screen of the test device, and a second spectral distribution parameter obtained by the initial light passing through at least one test glasses device; wherein the type of the test device is the same as the type of the electronic device, and the second spectral distribution parameter is related to the light transmission parameter of the test glasses device; For each of the test glasses devices, a preset transformation matrix is ​​determined based on the first spectral distribution parameter and the second spectral distribution parameter; The matrix set is formed based on each of the preset transformation matrices.

4. The method according to claim 3, characterized in that, The step of determining the preset transformation matrix based on the first spectral distribution parameter and the second spectral distribution parameter includes: The first coordinate value of the reference pixel in the target color space is determined based on the first spectral distribution parameter, and the second coordinate value of the reference pixel in the target color space is determined based on the second spectral distribution parameter. The preset transformation matrix is ​​determined based on the third coordinate value, the first coordinate value, and the second coordinate value of the reference pixel in the native color space.

5. The method according to claim 4, characterized in that, Determining the preset transformation matrix based on the third coordinate value, the first coordinate value, and the second coordinate value of the reference pixel in the native color space includes: A first matrix is ​​determined based on the third coordinate value and the first coordinate value, and a second matrix is ​​determined based on the third coordinate value and the second coordinate value; The preset transformation matrix is ​​determined based on the first matrix and the second matrix.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: In response to the failure to detect the target object based on the image data, or the detection that the target object is not wearing the glasses device, the color values ​​of the display screen of the electronic device in the native color space are converted to the color values ​​in the target color space based on a preset reference conversion matrix, and the image is displayed. The reference transformation matrix and the preset transformation matrix are different.

7. A display device, characterized in that, include: The first determining module is configured to, in response to an electronic device detecting a target object wearing glasses based on acquired image data, determine a detection result for the glasses based on the image data. The second determining module is configured to determine a target transformation matrix from a preset matrix set based on the detection result; wherein the matrix set includes at least one preset transformation matrix, the preset transformation matrix being determined based on the spectral distribution parameters of the light emitted by the display device and the spectral distribution parameters of the light transmitted through the glasses device; The first conversion module is configured to convert the color values ​​of the display screen of the electronic device in the native color space to the color values ​​in the target color space based on the target conversion matrix, and then display the image.

8. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.