Image processing method and system and electronic equipment

By generating dynamic mapping files based on a scene detection model and adjusting the brightness of image pixels, the problem of poor display effect in the image processing process in the prior art is solved, and high-quality HDR image display that matches the scene is achieved.

CN121815089APending Publication Date: 2026-04-07LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, a fixed type of Gain Map is used to combine with the base SDR image during image processing, which results in the generated HDR image failing to match the scene corresponding to the current image, leading to poor display quality.

Method used

By determining the control strategy corresponding to the scene of the image based on the scene detection model, a dynamic mapping file is generated, the brightness information of each pixel is adjusted, and a second image matching the scene is generated.

Benefits of technology

It improves image display quality, making the generated HDR images more realistic and enhancing the display effect of the screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121815089A_ABST
    Figure CN121815089A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and system and electronic equipment, and the method comprises the steps: obtaining a first image which is used for presenting a scene picture; determining a control strategy corresponding to a scene picture of the first image based on the first image; obtaining a mapping file formed by brightness additional information of each pixel based on the first image based on a control strategy corresponding to the scene picture of the first image; and generating a second image based on the first image and the mapping file, wherein the second image is provided for a display screen to output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and more particularly to an image processing method, system, and electronic device. Background Technology

[0002] Gain mapping is an image processing technique that allows displays to render photos (images) with a high dynamic range (HDR) effect while preserving the standard dynamic range (SDR). This results in richer brightness and color details in the displayed image. Gain mapping typically consists of a base SDR image and a paired gain map. By combining the base SDR image with the paired gain map, a high-quality HDR image can be obtained.

[0003] However, currently, in the process of image processing, a fixed type of Gain Map is used to combine with the basic SDR image. Summary of the Invention

[0004] In view of the above, this application provides an image processing method, system, and electronic device, the specific solutions of which are as follows:

[0005] An image processing method, comprising:

[0006] Obtain a first image, which is used to present a scene;

[0007] Based on the first image, determine the control strategy corresponding to the scene scene of the first image;

[0008] Based on the control strategy corresponding to the scene of the first image, a mapping file is obtained that consists of additional brightness information for each pixel of the first image.

[0009] A second image is generated based on the first image and the mapping file, and the second image is used to provide output to the display screen.

[0010] Furthermore, different scene screens correspond to different control strategies, and different control strategies result in different mapping files.

[0011] Furthermore, the step of determining the control strategy corresponding to the scene image based on the first image includes:

[0012] Based on the first image and the scene detection model, a configuration table corresponding to the scene of the first image is determined, and the configuration table is used to generate the mapping file;

[0013] The scene detection model includes: determining the target object corresponding to the first image and the scene priority based on image analysis, where different scene priorities correspond to different target objects.

[0014] Furthermore, obtaining the mapping file based on the brightness-added information of each pixel of the first image using the control strategy corresponding to the scene of the first image includes:

[0015] A first intermediate image is generated based on the configuration table corresponding to the scene image of the first image and the first image itself.

[0016] Furthermore, the step of obtaining a mapping file based on the brightness-added information of each pixel of the first image using the control strategy corresponding to the scene image of the first image also includes:

[0017] Obtain the brightness and contrast information of the first image;

[0018] Based on the brightness and contrast information of the first image, a first coefficient and a second coefficient for changing the overall image brightness and contrast are determined.

[0019] The first intermediate graph is processed based on the first coefficient and the second coefficient to generate a second intermediate graph.

[0020] Furthermore, the step of processing the first intermediate graph based on the first coefficient and the second coefficient to generate the second intermediate graph includes:

[0021] Based on the contrast information, at least three different brightness ranges are determined;

[0022] Based on the brightness information, a first coefficient and a second coefficient are determined from the at least three different brightness intervals to determine a target brightness interval that matches the brightness information;

[0023] Different contrast ratios correspond to at least three different brightness ranges.

[0024] Furthermore, the step of obtaining a mapping file based on the brightness-added information of each pixel of the first image using the control strategy corresponding to the scene image of the first image also includes:

[0025] Obtain the dynamic control rate value;

[0026] Based on the dynamic control rate value and the second intermediate graph, a third intermediate graph is generated, which serves as a mapping file.

[0027] Furthermore, the first image is a frame from a video file.

[0028] The target object included in the first image of the first frame is different from the target object included in the first image of the second frame, indicating that the scene of the first image of the first frame is different from the scene of the first image of the second frame.

[0029] The mapping file for the second image in the first frame is different from the mapping file for the second image in the second frame.

[0030] An image processing system, comprising:

[0031] The first obtaining unit is used to obtain a first image, which is used to present a scene.

[0032] The determining unit is used to determine a control strategy corresponding to the scene scene of the first image based on the first image;

[0033] The second obtaining unit is used to obtain a mapping file based on the brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene of the first image.

[0034] The generation unit is used to generate a second image based on the first image and the mapping file, and the second image is used to provide the display screen for output.

[0035] An electronic device, comprising:

[0036] A display screen is used to show the output.

[0037] The processor is configured to: acquire a first image, which is used to present a scene; determine a control strategy corresponding to the scene of the first image based on the first image; acquire a mapping file based on the brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene of the first image; and generate a second image based on the first image and the mapping file, which is used to provide the second image to a display screen for output. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart of an image processing method disclosed in an embodiment of this application;

[0040] Figure 2a This is a schematic diagram of a first image obtained according to an embodiment of this application;

[0041] Figure 2b This is a schematic diagram of a mapping file corresponding to a scene image of the first image, as disclosed in an embodiment of this application.

[0042] Figure 2c This is a schematic diagram of a second image generated based on a first image and a mapping file, as disclosed in an embodiment of this application.

[0043] Figure 3 This is a flowchart of an image processing method disclosed in an embodiment of this application;

[0044] Figure 4a This is a schematic diagram illustrating a method for determining a configuration table based on a first image and a scene detection model, as disclosed in an embodiment of this application.

[0045] Figure 4b This is a schematic diagram illustrating another method for determining a configuration table based on a first image and scene detection model disclosed in an embodiment of this application;

[0046] Figure 5 This is a flowchart of an image processing method disclosed in an embodiment of this application;

[0047] Figure 6 This is a schematic diagram of three different brightness ranges determined based on contrast information, as disclosed in an embodiment of this application.

[0048] Figure 7 This is a flowchart of an image processing method disclosed in an embodiment of this application;

[0049] Figure 8 This is a schematic diagram of the structure of an image processing system disclosed in an embodiment of this application;

[0050] Figure 9 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation

[0051] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0052] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0053] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0054] This application discloses an image processing method, the flowchart of which is shown below. Figure 1 As shown, it includes:

[0055] Step S11: Obtain the first image, which is used to present a scene.

[0056] Step S12: Determine the control strategy corresponding to the scene image based on the first image;

[0057] Step S13: Based on the control strategy corresponding to the scene of the first image, obtain a mapping file composed of the brightness additional information of each pixel of the first image;

[0058] Step S14: Generate a second image based on the first image and the mapping file. The second image is used to provide output to the display screen.

[0059] Gain Map technology is an image processing technique that allows a single photograph to retain both Standard Dynamic Range (SDR) and High Dynamic Range (HDR) information, thereby automatically presenting the best display effect of the photograph based on the capabilities of the display device. Gain Map technology typically consists of a base SDR image and a Gain Map that is paired with the base SDR image. By combining the base SDR image with the paired Gain Map, a high-quality HDR image can be obtained.

[0060] However, currently, in the image processing process, a fixed type of Gain Map is combined with the base SDR image. For example, regardless of the image type or scene, the Gain Map is determined based on the image's brightness, and the HDR image is obtained using the brightness-based Gain Map. This results in the final HDR image not matching the scene corresponding to the current image.

[0061] Based on this, in this solution, after obtaining the first image, the scene presented by the first image is determined. Then, a control strategy corresponding to the scene of the first image is determined, and a mapping file composed of the brightness additional information of each pixel of the first image is obtained based on the control strategy. This allows a second image to be generated based on the first image and the mapping file, so that when the display screen outputs the second image, the output second image matches the scene it presents, thereby improving the display effect of the second image.

[0062] The first image can be an SDR image, and the second image can be an HDR image. The mapping file is the Gainmap. If the display used to output the image is capable of outputting an SDR image, the first image is directly output when there is an image output requirement. If the display used to output the image is capable of outputting an HDR image, the second image is directly output when there is an image output requirement.

[0063] The image processing method disclosed in this embodiment is applied to an electronic device. Specifically, it is executed during the image acquisition process. That is, when the electronic device receives the user's image acquisition command, the image acquired by the electronic device is the first image. However, the first image is not stored. Instead, a mapping file is obtained based on the first image to generate a second image. The generated second image is then stored. In other words, the second image is stored in response to the image acquisition command.

[0064] Alternatively, the image processing method disclosed in this embodiment can also be a process of processing an existing image. In this case, the first image can be an image acquired by an image acquisition device and stored in an image library, or an image received by an electronic device after being output by another device, or an image obtained from the cloud; or it can be an image generated by a rendering engine, such as an image generated by the rendering engine of a game or 3D software.

[0065] Obtain the first image, which presents a scene. For example, Image 1 presents a scene with trees as the main subject, Image 2 presents a scene of several children playing football, and Image 3 presents a scene of sunrise at the seaside. Different images may present different scenes.

[0066] After determining the scene displayed in the first image, the control strategy corresponding to that scene can be directly determined. Specifically, multiple control strategies can be pre-set, and after determining the scene of the first image, one of the multiple control strategies can be selected as the control strategy corresponding to the first image based on the scene of the first image. Alternatively, after determining the scene of the first image, a control strategy can be generated based on the scene of the first image according to the generation rules of the control strategy, and this control strategy is completely matched with the scene of the first image.

[0067] For example, if the scene of the first image is a bright snowy landscape, then the corresponding control strategy might be to suppress the gain in the highlight areas while enhancing the midtone details. Or, if the scene of the first image is a human face image, then the corresponding control strategy could be to prioritize the gain adjustment of the skin tone of the face to avoid the face being too bright or too dark.

[0068] Specifically, determining the control strategy corresponding to the scene in the first image can be achieved by: analyzing the first image to determine the scene corresponding to it, and then determining the control strategy corresponding to the scene in the first image based on that scene. Specifically, determining the scene in the first image can be achieved by: identifying target features included in the first image, and determining the scene corresponding to the first image based on these target features. Target features are features in the image used to characterize the scene. When multiple target features exist in the first image, one can be selected as the scene feature, and the scene corresponding to that scene feature is determined as the scene corresponding to the first image.

[0069] For example, if the target features in the first image include a face and the sky, then the face can be identified as the scene feature of the first image, and the scene of the first image can be identified as the scene corresponding to the face scene feature; or if the target features in the first image include sunrise, the sky and motion, then sunrise can be identified as the scene feature of the first image, and the scene of the first image can be identified as the scene corresponding to the sunrise scene feature, and so on.

[0070] After determining the control strategy corresponding to the scene of the first image, a mapping file is obtained based on the control strategy. The mapping file is composed of the brightness additional information of each pixel of the first image. The mapping file includes the brightness adjustment coefficient or intensity of each pixel in the base image (e.g., the first image). After combining the mapping file with the base image (e.g., the first image), a second image is obtained. The second image is obtained by adjusting the brightness adjustment coefficient or intensity of each pixel in the first image according to the corresponding pixel in the mapping file, so that when the second image is output and displayed, its display effect will be significantly better than that of the first image.

[0071] The mapping file is used to restore the display effect of the first area and the second area of ​​the first image on the display screen. That is, when the second image is displayed on the screen, the display effect of different areas of the second image is closer to the effect in the actual scene corresponding to that image. For example: Figure 2a The first image (SDR image) is a night view of a building entrance. Based on the analysis of the scene in the first image, a mapping file corresponding to the scene in the first image is determined, such as... Figure 2b As shown, this is a mapping file (Gainmap image) corresponding to the scene in the first image. By combining the first image (SDR image) with the mapping file (Gainmap image), a second image (SDR image) can be obtained, as shown below. Figure 2c As shown, the second image is generated based on the first image and the mapping file. Figure 2a and Figure 2c The comparison clearly shows that... Figure 2c The display effect is relative to Figure 2a In other words, it is closer to the actual night view of the building entrance, and the brightness of the lights and signs is more in line with the actual brightness of the building entrance.

[0072] The image processing method disclosed in this embodiment, after obtaining a first image for presenting a scene, determines a control strategy corresponding to the scene in the first image, obtains a mapping file based on the brightness information of each pixel in the first image, and generates a second image based on the first image and the mapping file. The second image is then provided to the display screen for output. In this solution, when it is necessary to generate a second image based on the first image, the corresponding control strategy can be determined based on the scene presented by the first image, and a corresponding mapping file can be further determined so that a second image matching the scene in the first image can be generated based on the mapping file. This ensures that the generated second image matches the scene presented by the first image, avoiding situations where the second image does not match the scene in the first image.

[0073] Furthermore, in the image processing method disclosed in this embodiment, different scene images correspond to different control strategies, and different control strategies result in different mapping files.

[0074] When there are multiple first images, the scene images included in the different first images are different, and the scenes corresponding to the different scene images are also different. Different scenes correspond to different control strategies, and correspondingly, they also correspond to different mapping files.

[0075] For example, if the scene corresponding to the first image 1 is a group photo of three people, then the scene of the first image 1 is a portrait. If the scene corresponding to the first image 2 is a natural landscape of a beach, then the scene of the first image 2 is a landscape. Then, the control strategy for the first image 1 can be: highlight the portrait area and adjust the gain of the face area; while the control strategy for the first image 2 can be: suppress the gain of the highlight areas of the beach or sponge to prevent overexposure. The control strategies for the first image 1 and the first image 2 are completely different. Therefore, when obtaining the mapping file based on the control strategy, the brightness information of the pixels in different areas of the first image will also be completely different, which will lead to different mapping files.

[0076] Therefore, in this embodiment, the mapping file is different depending on the scene in the first image. The mapping file is dynamically changing, which makes the second image generated for each first image and the corresponding mapping file more consistent with the scene of the first image, and more effectively restores the actual scene of the first image, thereby improving the display effect of the second image.

[0077] This embodiment discloses an image processing method, the flowchart of which is as follows: Figure 3 As shown, it includes:

[0078] Step S31: Obtain the first image, which is used to present a scene.

[0079] Step S32: Based on the first image and the scene detection model, determine the configuration table corresponding to the scene of the first image. The configuration table is used to generate a mapping file. The scene detection model includes: determining the target object corresponding to the first image and the scene priority based on the scene priority through image analysis. Different scene priorities correspond to different target objects.

[0080] Step S33: Obtain a mapping file composed of brightness additional information of each pixel in the first image based on the configuration table corresponding to the scene picture of the first image;

[0081] Step S34: Generate a second image based on the first image and the mapping file. The second image is used to provide output to the display screen.

[0082] After obtaining a first image for presenting a scene, a control strategy corresponding to the scene in the first image is determined based on the first image. Based on the control strategy corresponding to the scene in the first image, a mapping file composed of brightness additional information of each pixel in the first image is obtained. A second image is generated based on the first image and the mapping file. The second image is provided to the display screen for output, ensuring that the generated second image can match the scene presented by the first image and avoiding the situation where the second image does not match the scene in the first image.

[0083] The control strategy corresponding to the scene of the first image can be specifically implemented using a scene detection model. Specifically, based on the first image and the scene detection model, a configuration table corresponding to the scene of the first image is determined. The configuration table is used to generate a mapping file. The scene detection model includes: determining the target object corresponding to the first image and the scene priority based on scene priority through image analysis. Different scene priorities correspond to different target objects.

[0084] The scene detection model can detect the scene corresponding to the first image. The scene can be represented by the target object. That is, the scene detection model can determine the target object based on the scene priority, so as to determine the configuration table corresponding to the target object.

[0085] For example: if the target object can be a human face, then when the target object is a human face, the corresponding scene can be determined to be a face scene; if the target object can be light flow, then when the target object is light flow, the corresponding scene can be determined to be a motion scene; if the target object can be food, then when the target object is food, the corresponding scene can be determined to be a food scene; if the target object can be text, then when the target object is text, the corresponding scene can be determined to be a text scene; if the target object can be the sky, then when the target object is the sky, the corresponding scene can be determined to be a sky scene; if the target object can be a feature representing sunrise, then when the target object has a feature representing sunrise, the corresponding scene can be determined to be a sunrise scene; if the target object can be sunset, then when the target object is sunset, the corresponding scene can be determined to be a sunset scene; if the target object can be a feature representing night, then when the target object has a feature representing night, the corresponding scene can be determined to be a night scene.

[0086] Furthermore, when the target object is determined to be the sky, it is also necessary to determine whether the current scene matches a sunrise or sunset scene. Only when it is determined that the current scene does not match a sunrise or sunset scene can it be determined that the current scene is a sky scene. If the current scene matches a sunrise scene, the current scene can be directly determined to be a sunrise scene. If the current scene matches a sunset scene, the current scene can be directly determined to be a sunset scene.

[0087] Pre-set scene priorities, meaning different target objects correspond to different scene priorities. For example: face > light flow > food > text > sky > sunrise / sunset > night. That is, the scene priority of face is higher than that of light flow, light flow is higher than that of food, food is higher than that of text, text is higher than that of sky, sky is higher than that of sunrise / sunset, and sunrise / sunset is higher than that of night.

[0088] When the scene detection model determines that a face exists in the first image, it can directly determine the face as the target object based on the pre-set scene priority and determine the corresponding scene as a face scene. After determining the face scene, it can determine the configuration table corresponding to the face scene so as to generate the mapping file corresponding to the first image. If the scene detection model determines that the object corresponding to the highest scene priority in the first image is food according to the scene priority, then the food is determined as the target object and the scene corresponding to the first image is determined as a food scene so as to determine the configuration table corresponding to the food scene, etc.

[0089] Specifically, in the image processing method disclosed in this embodiment, the configuration table corresponding to the scene of the first image is determined based on the first image and the scene detection model. Specifically, the first image is directly input into the scene detection model, and the scene detection model performs image analysis and scene detection. That is, the scene detection model determines the target object in the first image according to the scene priority. After determining the target object in the first image, the configuration table corresponding to the target object is determined so as to generate the corresponding mapping file.

[0090] like Figure 4a The diagram shows a configuration table determined based on a first image and a scene detection model. After obtaining the first image, the first image is input into the scene detection model, which performs image analysis and scene detection. The scene detection model outputs the scene corresponding to the first image. Then, a configuration table matching the first image is determined based on the scene corresponding to the first image.

[0091] After obtaining the first image, the scene detection model analyzes it according to a pre-defined scene priority, from highest to lowest priority. First, it determines whether the first image contains a face (the highest priority in scene priorities). If it does, the face is directly identified as the target object, and the scene corresponding to the face is determined. Then, the configuration table for that scene is determined. If the first image does not contain a face, it continues to determine whether the first image contains optical flow (the second highest priority in scene priorities), from highest to lowest priority. If it does, the optical flow is directly identified as the target object, and the scene corresponding to the optical flow is determined. Then, the configuration table for that scene is determined. If neither a face nor optical flow is found in the first image, it continues to determine whether the first image contains food, and so on, until the target object corresponding to the first image is determined. Based on the scene corresponding to the target object in the first image, the corresponding configuration table is determined.

[0092] In addition, in the image processing method disclosed in this embodiment, determining the configuration table corresponding to the scene of the first image based on the first image and the scene detection model can also be as follows: First, the first image is analyzed to obtain the analysis result, which includes at least one object included in the first image. Then, the analysis result is sent to the scene detection model, which determines the target object from the at least one object included in the first image according to the scene priority. After determining the target object in the first image, the configuration table corresponding to the target object is determined so as to generate the corresponding mapping file.

[0093] like Figure 4b The diagram shows a configuration table determined based on a first image and a scene detection model. After obtaining the first image, the first image is analyzed to determine the analysis result. The analysis result is then input into the scene detection model. After scene detection, the scene detection model outputs the scene corresponding to the first image. Subsequently, a configuration table matching the first image is determined based on the scene corresponding to the first image.

[0094] The first image is analyzed to determine the objects included in it. This can be achieved through a recognition algorithm, specifically by using a general recognition algorithm to identify the objects included in the first image. For example, if the first image includes food and sky, then the general recognition algorithm is used to analyze the first image to obtain the analysis result. This analysis result indicates that the first image includes two objects: food and sky. This analysis result is then input into the scene detection model. The scene detection model determines the objects included in the analysis result according to the scene priority. For example, the scene detection model first judges the analysis result of the first image to determine whether the first image includes a face. If the analysis result shows that the first image does not include a face, then the scene detection model continues to determine whether the first image includes optical flow. If the analysis result shows that the first image does not include optical flow, then the scene detection model continues to determine whether the first image includes food. If the analysis result shows that the first image includes food, then the food is directly identified as the target object, and the scene corresponding to the food target object is determined. This scene is used as the output of the scene detection model so that the corresponding configuration table can be determined based on the scene of the first image.

[0095] Alternatively, when analyzing the first image, a dedicated recognition algorithm for each object can be used. That is, a face recognition algorithm can be used to identify whether a face exists in the first image, an optical flow recognition algorithm can be used to identify whether optical flow exists in the first image, and a sky recognition algorithm can be used to identify whether a sky exists in the first image, etc. Then, the recognition results of each recognition algorithm are input into the scene detection model. The scene detection model determines the target object based on the recognition results of each recognition algorithm, and further determines the scene corresponding to the target object. The scene is used as the output of the scene detection model so that the corresponding configuration table can be determined based on the scene of the first image.

[0096] The configuration table is used to generate the mapping file. Different scenarios correspond to different configuration tables. Specifically, different configuration tables can be preset for different scenarios so that after determining the scenario of the first image, the configuration table corresponding to the scenario of the first image can be directly selected from the preset configuration tables corresponding to different scenarios, and the mapping file can be generated using the selected configuration table.

[0097] Specifically, the configuration table can be a gamma table, which is mainly used for efficient and non-linear adjustment of image pixel values. Its core purpose is to perform gamma correction, and the data in the gamma table is obtained based on the gamma curve. In this embodiment, the configuration table is used to influence the overall brightness curve of the first image. The mapping file generated based on the gamma table can correct the brightness and contrast of the first image to ensure the display effect of the second image generated based on the first image and the mapping file when it is output.

[0098] In digital image processing and display technology, the gamma curve is a special brightness response curve determined by specific parameters in a display device or image processing system. This curve describes the relationship between pixel brightness and its corresponding numerical value. By adjusting the gamma value, the shape of the curve can be changed, thereby affecting the brightness and contrast of the image, and thus the final display effect. By adjusting the gamma value, details in dark / bright areas can be enhanced (e.g., increasing the brightness of dark areas and suppressing the exposure of bright areas), improving the overall contrast and sense of depth of the image. In addition, the human eye's perception of brightness is non-linear, while the brightness acquisition of a camera sensor is linear. The gamma curve can convert linear data into a non-linear brightness distribution that conforms to human eye perception, making the transition between light and dark areas in the image more natural. Furthermore, different displays and sensors have different brightness responses. The gamma curve can calibrate the brightness data output by the camera, making the color and brightness of the captured image more consistent when displayed on different displays.

[0099] Specifically, the first image is processed based on the configuration table. Specifically, the brightness of the pixels in the first image is input into the gamma curve, and the output value is the adjusted brightness of the pixel. The gamma table stores the adjusted brightness of the pixel.

[0100] Furthermore, in the image processing method disclosed in this embodiment, obtaining a mapping file composed of brightness additional information of each pixel of the first image based on the configuration table corresponding to the scene of the first image can be specifically as follows: generating a first intermediate image based on the configuration table corresponding to the scene of the first image and the first image.

[0101] In the image processing method disclosed in this embodiment, after determining the configuration table corresponding to the scene of the first image, a mapping file can be directly generated based on the configuration table. That is, the generation of the mapping file is only related to the configuration table determined based on the scene of the first image, and is not related to other information.

[0102] Alternatively, after determining the configuration table corresponding to the scene of the first image, a mapping file is not directly generated. Instead, a first intermediate image is generated based on the configuration table and the first image, and then a mapping file is generated based on the first intermediate image, so that a second image can be generated based on the first image and the mapping file. In this embodiment, the mapping file is not only related to the configuration table determined based on the scene of the first image, but also to other information, such as the brightness and darkness contrast of the image and the brightness information of the environment corresponding to the image, to ensure that the generated mapping file can make corresponding adjustments to the bright and dark areas in the first image; or, the mapping file is also related to the brightness and darkness of each pixel in the image, to ensure that the generated mapping file can make corresponding adjustments to the brightness and darkness of each pixel in the first image.

[0103] Specifically, when the target object in the first image is determined according to the scene priority, and the configuration table corresponding to the first image is determined accordingly to generate a mapping file, a second image is generated based on the first image and the mapping file, and the second image is displayed on the display screen, its display effect is related to the target object determined based on the scene priority. Furthermore, the display effect of the second image displayed on the HDR display screen is better than the display effect of the first image.

[0104] For example, if the target object of the first image determined by scene priority is a face (corresponding to a face scene), then the contrast of the final second image displayed on the screen is lower than the contrast of the first image. Furthermore, the face area in the second image does not need to be brightened compared to the first image; brightness protection prevents overexposure of the face area. As another example, if the target object of the first image determined by scene priority is sunrise or sunset, then the contrast of the second image displayed on the screen is usually higher than the contrast of the first image. Moreover, compared to the first image, the highlight areas in the second image are brightened, and the shadow areas are darkened to emphasize the interplay of light and shadow. For example, if the target object of the first image determined by scene priority is food, the contrast of the second image displayed on the screen should be appropriate, with no significant difference compared to the first image. However, the area where the food is located in the second image should be appropriately brightened to highlight the food. Alternatively, if the target object of the first image determined by scene priority is a night scene, the contrast of the final second image displayed on the screen should be lower than the contrast of the first image. Furthermore, the light source areas and dark areas in the second image should be appropriately brightened compared to the first image. Another example is the target object of the first image determined by scene priority. For example, if the target object of the first image is determined to be the sky, the contrast of the second image displayed on the screen will be higher than that of the first image. Furthermore, the sky area in the second image will be brightened under high dynamic range compared to the first image, making the sky in the second image more closely resemble the effect of the sky in a real environment. Conversely, if the target object of the first image is text, the contrast of the second image displayed on the screen will be higher than that of the first image. Furthermore, the text area in the second image will be brightened compared to the first image, while non-text areas will be darkened to highlight the text area. For example, if the scene corresponding to the first image determined by scene priority is a high dynamic range scene, then the contrast of the final second image displayed on the screen should be medium contrast. In addition, compared with the first image, the bright areas and dark areas in the second image should be brightened so that the overall brightness of the second image is improved compared with the first image. For example, if the scene corresponding to the first image determined by scene priority is a motion scene, then the contrast of the final second image displayed on the screen is lower than the contrast of the first image displayed on the screen. Furthermore, compared with the first image, the medium and bright areas in the second image should be darkened to improve the performance of the moving subject.

[0105] The image processing method disclosed in this embodiment, after obtaining a first image for presenting a scene, determines a configuration table corresponding to the scene in the first image based on the first image and a scene detection model, so as to obtain a mapping file based on the configuration table, and further generates a second image based on the first image and the mapping file. The scene detection model includes: determining the target objects corresponding to the first image and scene priorities through image analysis based on scene priorities, thereby determining the configuration table corresponding to the target objects; different scene priorities correspond to different target objects. This solution accurately determines the target objects included in the first image through the first image and the scene detection model, and further determines the configuration table used to generate the mapping file, ensuring the accuracy of the determination of the target objects and the configuration table, thereby ensuring the accuracy of the mapping file and improving the display effect of the second image.

[0106] Furthermore, in the image processing method disclosed in this embodiment, the first image can be a single image frame or a frame from a video file.

[0107] When the first image is a frame in a video file, any of the multiple frames in the video file can be used as the first image. In this case, the target object included in the first frame is different from the target object included in the second frame, the scene representing the first frame is different from the scene representing the second frame, and correspondingly, the mapping file of the first frame is also different from the mapping file of the second frame.

[0108] In a video file, even two consecutive frames may contain different target objects. For example, if a user is filming a video of a subject against a sunrise background, the first frame of the video may not show the subject but only the sunrise. In this case, the target object of the first image in the first frame is the sunrise. However, if the subject is captured in the second frame of the video, then the target object of the first image in the second frame is the subject's face. In this case, the target object of the two consecutive first images has changed.

[0109] When the target object changes in two consecutive first images, the scene of those two consecutive first images changes. At this time, due to the change in the scene, the resulting mapping file also changes. That is, if the sunrise is the target object in the first frame of the first image, then the scene of the first frame of the first image, the configuration table determined based on the scene of the first image, and the generated mapping file are all generated with the sunrise as the target object. If the face is the target object in the second frame of the first image, then the scene of the second frame of the first image, the configuration table determined based on the scene of the first image, and the generated mapping file are all generated with the face as the target object.

[0110] Furthermore, for two consecutive frames of first images with different target objects, when generating the mapping file for the second frame of the first image, the mapping file of the first frame of the first image can be referenced to avoid the problem of large brightness changes between the generated second frame of the second image and the first frame of the second image, which would affect the user's viewing experience.

[0111] This embodiment discloses an image processing method, the flowchart of which is as follows: Figure 5 As shown, it includes:

[0112] Step S51: Obtain a first image, which is used to present a scene.

[0113] Step S52: Based on the first image and the scene detection model, determine the configuration table corresponding to the scene of the first image. The scene detection model includes: determining the target object corresponding to the first image and the scene priority based on the scene priority through image analysis. Different scene priorities correspond to different target objects.

[0114] Step S53: Generate a first intermediate image based on the configuration table corresponding to the scene image of the first image and the first image;

[0115] Step S54: Obtain the brightness and contrast information of the first image;

[0116] Step S55: Determine a first coefficient and a second coefficient for changing the overall image brightness and contrast based on the brightness and contrast information of the first image.

[0117] Step S56: Process the first intermediate graph based on the first coefficient and the second coefficient to generate the second intermediate graph;

[0118] Step S57: Obtain a mapping file based on the brightness additional information of each pixel of the first image, based on the second intermediate image;

[0119] Step S58: Generate a second image based on the first image and the mapping file. The second image is used to provide output to the display screen.

[0120] After obtaining a first image for presenting a scene, a control strategy corresponding to the scene in the first image is determined based on the first image. Based on the control strategy corresponding to the scene in the first image, a mapping file composed of brightness additional information of each pixel in the first image is obtained. A second image is generated based on the first image and the mapping file. The second image is provided to the display screen for output, ensuring that the generated second image can match the scene presented by the first image and avoiding the situation where the second image does not match the scene in the first image.

[0121] Specifically, determining the control strategy corresponding to the scene image based on the first image can be achieved by: determining a configuration table corresponding to the scene image based on the first image and the scene detection model; correspondingly, generating the mapping file can be achieved by: generating a first intermediate image based on the configuration table and the first image; determining a first coefficient and a second coefficient for changing the brightness and contrast of the overall image based on the obtained brightness and contrast information of the first image; processing the first intermediate image based on the first coefficient and the second coefficient to generate a second intermediate image, so as to obtain the mapping file based on the second intermediate image.

[0122] After obtaining the first image, it needs to be analyzed to determine its contrast and brightness information. The contrast and brightness information of the first image can be determined based on the metadata of the first image. In this case, the contrast and brightness information of the first image are determined after the first image is generated and will not change. Alternatively, the brightness information of the first image can be determined based on the metadata of the first image, while the contrast information of the first image needs to be determined by analyzing the brightness histogram of the first image.

[0123] Specifically, the brightness information of the first image can be: Lux Index, which is the unit of illuminance, that is, the luminous flux received per unit area. Lux Index can objectively reflect the brightness of the environment as perceived by the human eye. This value is used to determine the current shooting environment and can be directly measured by hardware sensors (such as ambient light sensors). The larger the Lux Index value, the darker the environment, and the smaller the Lux Index value, the brighter the environment.

[0124] The contrast information of the first image can be: Automatic Dynamic Range Compression (ADRC) value, which reflects the ratio between the brightest and darkest pixels in the first image, and is used to characterize the brightness consistency of pixels in the first image. If the brightness consistency of pixels in the first image is high, that is, the difference between the brightness of the brightest and darkest pixels in the first image is small, then the ADRC value is small; if the brightness consistency of pixels in the first image is low, that is, the difference between the brightness of the brightest and darkest pixels in the first image is large, then the ADRC value is large.

[0125] The first image can determine a set of brightness and contrast information. Based on this set of brightness and contrast information, a first coefficient and a second coefficient can be determined. The first coefficient is used to change the overall brightness of the first image, and the second coefficient is used to change the overall contrast of the first image.

[0126] After determining the first coefficient and the second coefficient, the first intermediate image is processed based on the first coefficient and the second coefficient to obtain the second intermediate image. The first intermediate image is generated based on the configuration table corresponding to the scene of the first image and the first image. In the process of processing the first intermediate image to obtain the second intermediate image, the brightness of each pixel in the first intermediate image can be multiplied by the second coefficient. Then, the brightness of each pixel is added to the first coefficient. The result is the second intermediate image, which includes the brightness value of each pixel after adjustment based on the first coefficient and the second coefficient.

[0127] For example: if the first coefficient is determined to be -10 and the second coefficient is 0.4 based on the brightness and contrast information of the first image, then the brightness of each pixel in the first intermediate image needs to be multiplied by 0.4, and then -10 is added to the resulting value, i.e., 10 is subtracted, to obtain the final adjusted brightness value of each pixel.

[0128] After processing the first intermediate image based on the first and second coefficients, a second intermediate image is obtained. A mapping file is then obtained based on the second intermediate image. Finally, a second image is generated based on the first image and the mapping file. In this process, not only is the overall brightness corrected based on the first image to obtain the first intermediate image, but the first intermediate image is also adjusted based on the brightness and darkness contrast of the image (contrast information of the first image) and the brightness information of the environment corresponding to the image (brightness information of the first image) to obtain the second intermediate image. The mapping file obtained from this process generates the second image. When the second image is displayed and output, its display effect can be presented more effectively.

[0129] Specifically, determining the mapping file based on the second intermediate image can be done by using the second intermediate image as the mapping file to generate the second image, or by combining the second intermediate image with other information to obtain the mapping file.

[0130] Furthermore, in the image processing method disclosed in this embodiment, determining a first coefficient and a second coefficient for changing the overall image brightness and contrast based on the brightness and contrast information of the first image can be specifically as follows:

[0131] Based on contrast information, at least three different brightness ranges are determined; based on brightness information, a first coefficient and a second coefficient are determined from the at least three different brightness ranges to determine a target brightness range that matches the brightness information, wherein different contrasts correspond to at least three different brightness ranges.

[0132] When determining the first coefficient and the second coefficient based on the brightness and contrast information of the first image, a set of data (at least three different brightness ranges) can be determined first based on the contrast information. Then, a brightness range can be selected from the determined set of data according to the brightness information as the target brightness range. The selected target brightness range matches the brightness information to achieve accurate determination of the first coefficient and the second coefficient.

[0133] like Figure 6 The diagram shows three different brightness ranges determined based on contrast information, where the ADRC contrast ratio is determined to be between 1 and 1.2 (e.g., ...). Figure 6 As shown in 61, the contrast information starts from 1 and ends at 1.2), then the following three brightness ranges can be determined; then the brightness information is determined. If the brightness information Lux Index is between 0 and 240 (e.g., ...), the brightness ranges can be determined. Figure 6 As shown in Figure 62, the brightness information starts from 0 and ends at 240. Therefore, the second coefficient contrast can be determined to be 0.4, and the first coefficient brightness to be -10.0. If the brightness information Lux Index is between 280 and 360 (e.g., ...), then... Figure 6 As shown in Figure 63, the brightness information starts at 280 and ends at 360. Therefore, the second coefficient contrast can be determined to be 0.6, and the first coefficient brightness to be -5.0. If the brightness information Lux Index is between 400 and 900 (e.g., ...), then... Figure 6 As shown in 64, the brightness information starts from 400 and ends at 900. Therefore, the second coefficient contrast is determined to be 0.6, and the first coefficient brightness is determined to be 0.0.

[0134] In this embodiment, when different first images have contrast information in different ranges, their corresponding at least three different brightness ranges will be different, meaning that the contrast information can no longer be utilized. Figure 6 The brightness range shown determines the first and second coefficients; if the contrast information of different first images is within the same range (e.g., all between 1 and 1.2), then for each different first image, the following formula can be used. Figure 6 The brightness range shown determines the first and second coefficients; however, when the brightness information falls within different ranges, it will change from... Figure 6 Select the first and second coefficients corresponding to different brightness ranges.

[0135] Furthermore, in the image processing method disclosed in this embodiment, when generating the mapping file based on the above method, it is necessary to first determine whether the first image is in a specific scene. The specific scene can be a face scene. In a face scene, the first image includes a face. Then, the area of ​​the face in the first image is determined. When processing the first intermediate image based on the first coefficient and the second coefficient to obtain the second intermediate image, the face area in the first intermediate image is not processed according to the first coefficient and the second coefficient. That is, the face area in the obtained second intermediate image still retains the data of the face area in the first intermediate image, so as to protect the face area data and avoid blurring or other problems caused by adjusting the face area data according to the first coefficient and the second coefficient.

[0136] The image processing method disclosed in this embodiment, after obtaining a first image for presenting a scene, determines a configuration table corresponding to the scene of the first image based on the first image and a scene detection model. A first intermediate image is generated based on the configuration table and the first image. A first coefficient and a second coefficient for changing the overall brightness and contrast of the first image are determined based on the obtained brightness and contrast information of the first image. The first intermediate image is then processed based on the first and second coefficients to generate a second intermediate image, thereby obtaining a mapping file for generating a second image. In this scheme, the mapping file is not only related to the configuration table corresponding to the scene of the first image, but also to the brightness and contrast information of the first image. This ensures that, in addition to correcting the overall brightness of the first image through the configuration table, the brightness and contrast information of the first image can also be used to adjust each pixel in the first image accordingly. This ensures that the second image generated based on the mapping file conforms to the brightness and contrast information of the first image, thus guaranteeing the display effect of the second image.

[0137] This embodiment discloses an image processing method, the flowchart of which is as follows: Figure 7 As shown, it includes:

[0138] Step S71: Obtain a first image, which is used to present a scene.

[0139] Step S72: Based on the first image and the scene detection model, determine the configuration table corresponding to the scene of the first image. The scene detection model includes: determining the target object corresponding to the first image and the scene priority based on the scene priority through image analysis. Different scene priorities correspond to different target objects.

[0140] Step S73: Generate a first intermediate image based on the configuration table corresponding to the scene image of the first image and the first image;

[0141] Step S74: Obtain the brightness and contrast information of the first image;

[0142] Step S75: Determine a first coefficient and a second coefficient for changing the overall image brightness and contrast based on the brightness and contrast information of the first image.

[0143] Step S76: Process the first intermediate graph based on the first coefficient and the second coefficient to generate the second intermediate graph;

[0144] Step S77: Obtain the dynamic control law value;

[0145] Step S78: Based on the dynamic control rate value and the second intermediate graph, generate the third intermediate graph and use the third intermediate graph as a mapping file;

[0146] Step S79: Generate a second image based on the first image and the mapping file. The second image is used to provide output to the display screen.

[0147] After obtaining a first image for presenting a scene, a control strategy corresponding to the scene in the first image is determined based on the first image. Based on the control strategy corresponding to the scene in the first image, a mapping file composed of brightness additional information of each pixel in the first image is obtained. A second image is generated based on the first image and the mapping file. The second image is provided to the display screen for output, ensuring that the generated second image can match the scene presented by the first image and avoiding the situation where the second image does not match the scene in the first image.

[0148] Specifically, determining the control strategy corresponding to the scene image based on the first image can be achieved by: determining a configuration table corresponding to the scene image based on the first image and the scene detection model; correspondingly, generating the mapping file can be achieved by: generating a first intermediate image based on the configuration table and the first image; determining a first coefficient and a second coefficient for changing the overall image brightness and contrast based on the obtained brightness and contrast information of the first image; processing the first intermediate image based on the first coefficient and the second coefficient to generate a second intermediate image; and generating a third intermediate image based on the obtained dynamic control rate value and the second intermediate image, using the third intermediate image as the mapping file.

[0149] The dynamic control ratio value is used to characterize the brightness expansion capability of the second image relative to the first image. Specifically, it can be expressed as: dynamic ratio = kHlgMaxNits / kSdrWhiteNits, where ratio is the control ratio, kHlgMaxNits is the maximum pixel brightness, and kSdrWhiteNits is the base pixel brightness.

[0150] The maximum pixel brightness is a fixed value of 1000, which represents the peak brightness of the display device (HDR display device) and can be fixed at 1000 nits. The base pixel brightness is a variable value, which represents the reference brightness of white in SDR (Standard Dynamic Range), and the unit is nits. Its range can be 201-403 nits. If the base pixel brightness value is low, it means that the white of SDR is defined darker. It is usually used to process images that are inherently dark, such as night scenes, to avoid the problem of the overall image being over-brightened and causing the image to appear gray. If the base pixel brightness value is high, it means that the white of SDR is defined brighter. It is usually used to process images that are inherently difficult to brighten, such as snow scenes and beaches, to preserve sufficient brightness levels.

[0151] When the maximum pixel brightness is 1000 nits and the basic pixel brightness range is 201-403 nits, the dynamic control rate value can range from 2.48 to 4.97.

[0152] The determination of the base pixel brightness value can be based on the contrast information of the first image. The correspondence between different contrast information and the base pixel brightness value can be pre-set. After obtaining the first image, the contrast information of the first image is determined, and then the correspondence is queried. Based on the correspondence, the base pixel brightness value corresponding to the contrast information of the first image is determined. Then, the quotient between the maximum pixel brightness and the base pixel brightness is determined as the dynamic control rate value. After determining the dynamic control rate value, the second intermediate image is adjusted based on the dynamic control rate value to obtain the third intermediate image, i.e., the mapping file, so that the second image can be generated based on the mapping file, so that the second image can have a better display effect when displayed.

[0153] Specifically, for generating the mapping file, a configuration table corresponding to the scene in the first image can be determined directly based on the first image and the scene detection model, and the mapping file can be generated directly based on the configuration table; alternatively, the first coefficient and the second coefficient can be determined directly based on the brightness and contrast information of the first image, and the mapping file can be generated using the first coefficient and the second coefficient; or the mapping file can be generated directly based on the dynamic control rate value; or the mapping file can be generated based on the configuration table, the first coefficient, and the second coefficient, or the configuration table and the dynamic control rate value, or the first coefficient, the second coefficient, and the dynamic vacancy rate value; of course, the mapping file can also be generated based on the configuration table, the first coefficient, the second coefficient, and the dynamic control rate value.

[0154] The process of generating a mapping file based on a configuration table, a first coefficient, a second coefficient, and a dynamic control rate value can be specifically as follows: A configuration table corresponding to the scene frame of the first image is determined based on the first image and the scene detection model; a first intermediate image is generated based on the configuration table corresponding to the scene frame of the first image and the first image; then, a first coefficient and a second coefficient for changing the overall image's brightness and contrast are used based on the obtained brightness and contrast information of the first image; the first intermediate image is then processed based on the first and second coefficients to obtain a second intermediate image; finally, the second intermediate image is processed based on the obtained dynamic control rate value to obtain a third intermediate image, which is the mapping file Gainmap. In this embodiment, the process of processing the first image to obtain a mapping file for generating the second image can be divided into three stages. The first stage is to obtain a first intermediate image based on the first image. The second stage is to continue analyzing the first image to obtain a second intermediate image based on the first intermediate image. The third stage is to obtain a third intermediate image, i.e., the mapping file, based on the mapping file obtained from the above three stages. When the second image is generated and displayed using the mapping file, the display effect of the second image can be closer to the effect presented in the real environment when the first image was obtained, thereby ensuring that the display effect of the second image is better.

[0155] For example, if the first image is processed according to the above three stages, and the scene determined in the first stage is a sunrise or sunset scene, then after the above three stages of processing, the final generated second image, when displayed, can better highlight the light and shadow atmosphere compared to the first image, so as to more closely resemble the real sunrise or sunset scene presentation.

[0156] For example, if the first image is processed according to the above three stages, and the scene determined in the first stage is a night scene, then after the above three stages of processing, the final generated second image, when displayed, will have brighter bright areas and darker dark areas compared to the first image, making it closer to a realistic night scene presentation.

[0157] The image processing method disclosed in this embodiment, after obtaining a first image for presenting a scene, determines a configuration table corresponding to the scene of the first image based on the first image and a scene detection model. A first intermediate image is generated based on the configuration table and the first image. A first coefficient and a second coefficient for changing the overall brightness and contrast of the first image are determined based on the obtained brightness and contrast information of the first image. The first intermediate image is then processed based on the first and second coefficients to generate a second intermediate image. A third intermediate image is obtained based on the obtained dynamic control rate value and the second intermediate image. This third intermediate image is used as a mapping file to generate a second image. In this scheme, the mapping file is not only related to the configuration table corresponding to the scene of the first image, but also to the brightness and contrast information of the first image, and further to the dynamic control rate value. This ensures that, in addition to correcting the overall brightness of the first image through the configuration table, the brightness and contrast information of the first image can be used to adjust each pixel in the first image accordingly. Furthermore, the control rate value is set to a dynamic control rate value to ensure that the second image generated based on the mapping file conforms to the brightness and contrast information of the first image, thereby guaranteeing the display effect of the second image.

[0158] This embodiment discloses an image processing system, the schematic diagram of which is shown below. Figure 8 As shown, it includes:

[0159] The system comprises a first obtaining unit 81, a determining unit 82, a second obtaining unit 83, and a generating unit 84.

[0160] The first obtaining unit 81 is used to obtain a first image, and the first image is used to present a scene.

[0161] The determining unit 82 is used to determine the control strategy corresponding to the scene picture of the first image based on the first image;

[0162] The second obtaining unit 83 is used to obtain a mapping file composed of brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene picture of the first image;

[0163] The generation unit 84 is used to generate a second image based on the first image and the mapping file, and the second image is used to provide the display screen for output.

[0164] Furthermore, different scene screens correspond to different control strategies, and different control strategies result in different mapping files.

[0165] Furthermore, the determining unit is used for:

[0166] Based on the first image and the scene detection model, a configuration table corresponding to the scene scene of the first image is determined. The configuration table is used to generate a mapping file. The scene detection model includes: determining the target object corresponding to the first image and the scene priority based on scene priority through image analysis. Different scene priorities correspond to different target objects.

[0167] Furthermore, the second obtaining unit is used for:

[0168] A first intermediate image is generated based on the configuration table corresponding to the scene image of the first image and the first image itself.

[0169] Furthermore, the second obtaining unit is also used for:

[0170] Obtain brightness and contrast information of a first image; determine a first coefficient and a second coefficient for changing the overall image brightness and contrast based on the brightness and contrast information of the first image; process the first intermediate image based on the first coefficient and the second coefficient to generate a second intermediate image.

[0171] Furthermore, the second obtaining unit is used for:

[0172] Based on contrast information, at least three different brightness ranges are determined; based on brightness information, a first coefficient and a second coefficient are determined from the at least three different brightness ranges to determine a target brightness range that matches the brightness information; wherein, different contrasts correspond to at least three different brightness ranges.

[0173] Furthermore, the second obtaining unit is also used for:

[0174] Obtain the dynamic control rate value; based on the dynamic control rate value and the second intermediate graph, generate the third intermediate graph, which serves as the mapping file.

[0175] Furthermore, the first image is a frame in the video file, and the target object included in the first frame is different from the target object included in the first frame of the second frame. The scene representing the first frame of the first image is different from the scene representing the first frame of the second image. The mapping file of the first frame of the second image is different from the mapping file of the second frame of the second image.

[0176] The image processing system disclosed in this embodiment is implemented based on the image processing method disclosed in the above embodiments, and will not be described again here.

[0177] The image processing system disclosed in this embodiment, after obtaining a first image for presenting a scene, determines a control strategy corresponding to the scene in the first image, obtains a mapping file based on the brightness information of each pixel in the first image, and generates a second image based on the first image and the mapping file. The second image is then provided to the display screen for output. In this solution, when it is necessary to generate a second image based on the first image, the corresponding control strategy can be determined based on the scene presented by the first image, and a corresponding mapping file can be further determined so that a second image matching the scene in the first image can be generated based on the mapping file. This ensures that the generated second image matches the scene presented by the first image, avoiding situations where the second image does not match the scene in the first image.

[0178] This embodiment discloses an electronic device, the structural schematic diagram of which is shown below. Figure 9 As shown, it includes:

[0179] Display screen 91 and processor 92.

[0180] The display screen 91 is used to display the output;

[0181] The processor 92 is used to obtain a first image, which is used to present a scene; determine a control strategy corresponding to the scene of the first image based on the first image; obtain a mapping file composed of brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene of the first image; and generate a second image based on the first image and the mapping file, which is used to provide the second image to the display screen for output.

[0182] The electronic device disclosed in this embodiment is implemented based on the image processing method disclosed in the above embodiments, and will not be described again here.

[0183] The electronic device disclosed in this embodiment, after obtaining a first image for presenting a scene, determines a control strategy corresponding to the scene of the first image, obtains a mapping file based on the brightness additional information of each pixel of the first image based on the control strategy, and generates a second image based on the first image and the mapping file. The second image is then provided to the display screen for output. In this solution, when it is necessary to generate a second image based on the first image, the corresponding control strategy can be determined based on the scene presented by the first image, and the corresponding mapping file can be further determined so that a second image matching the scene of the first image can be generated based on the mapping file. This ensures that the generated second image matches the scene presented by the first image, avoiding the situation where the second image does not match the scene in the first image.

[0184] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0185] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0186] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0187] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. An image processing method, comprising: Obtain a first image, which is used to present a scene; Based on the first image, determine the control strategy corresponding to the scene scene of the first image; Based on the control strategy corresponding to the scene of the first image, a mapping file is obtained that consists of additional brightness information for each pixel of the first image. A second image is generated based on the first image and the mapping file, and the second image is used to provide output to the display screen.

2. According to the method described in claim 1, different scene screens correspond to different control strategies, and different control strategies result in different mapping files.

3. The method according to claim 2, wherein determining the control strategy corresponding to the scene image based on the first image includes: Based on the first image and the scene detection model, a configuration table corresponding to the scene of the first image is determined, and the configuration table is used to generate the mapping file; The scene detection model includes: determining the target object corresponding to the first image and the scene priority based on image analysis, where different scene priorities correspond to different target objects.

4. The method according to claim 3, wherein obtaining the mapping file based on the brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene image of the first image includes: A first intermediate image is generated based on the configuration table corresponding to the scene image of the first image and the first image itself.

5. The method according to claim 4, wherein obtaining the mapping file based on the brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene of the first image further includes: Obtain the brightness and contrast information of the first image; Based on the brightness and contrast information of the first image, a first coefficient and a second coefficient for changing the overall image brightness and contrast are determined. The first intermediate graph is processed based on the first coefficient and the second coefficient to generate a second intermediate graph.

6. The method according to claim 5, wherein processing the first intermediate graph based on the first coefficient and the second coefficient to generate the second intermediate graph comprises: Based on the contrast information, at least three different brightness ranges are determined; Based on the brightness information, a first coefficient and a second coefficient are determined from the at least three different brightness intervals to determine a target brightness interval that matches the brightness information; Different contrast ratios correspond to at least three different brightness ranges.

7. The method according to claim 6, wherein obtaining the mapping file based on the brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene image of the first image further includes: Obtain the dynamic control rate value; Based on the dynamic control rate value and the second intermediate graph, a third intermediate graph is generated, which serves as a mapping file.

8. The method according to claim 3, wherein the first image is a frame from a video file. The target object included in the first image of the first frame is different from the target object included in the first image of the second frame, indicating that the scene of the first image of the first frame is different from the scene of the first image of the second frame. The mapping file for the second image in the first frame is different from the mapping file for the second image in the second frame.

9. An image processing system, comprising: The first obtaining unit is used to obtain a first image, which is used to present a scene. The determining unit is used to determine a control strategy corresponding to the scene scene of the first image based on the first image; The second obtaining unit is used to obtain a mapping file based on the brightness additional information of each pixel of the first image based on the control strategy corresponding to the scene of the first image. The generation unit is used to generate a second image based on the first image and the mapping file, and the second image is used to provide the display screen for output.

10. An electronic device, comprising: A display screen is used to show the output. A processor is used to obtain a first image, which is used to present a scene. Based on the first image, a control strategy corresponding to the scene of the first image is determined; based on the control strategy corresponding to the scene of the first image, a mapping file composed of brightness additional information of each pixel of the first image is obtained; A second image is generated based on the first image and the mapping file, and the second image is used to provide output to the display screen.