Image brightness analysis method and device, equipment, storage medium and product

Through the image brightness analysis method, the mapping image brightness value is quantized using the heat map parameter table, which solves the problem of low image brightness adjustment efficiency in the prior art, and realizes a more intuitive brightness distribution and a more efficient adjustment process.

CN119863409APending Publication Date: 2025-04-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311349712.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-17
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the prior art, the method of relying on designers to adjust the brightness of the target image with work experience leads to a low efficiency in image brightness adjustment.

Method used

A method for analyzing image brightness is provided. By acquiring image and heat map parameter tables, the brightness value results of pixel points are extracted, and the pixel color is matched in the reference brightness value to determine the adjustment pixel color, and finally the heat map display results are generated to quantify the mapping brightness value distribution.

Benefits of technology

By quantizing the mapping of brightness value distribution, the picture brightness layout distribution is simplified, making the light and dark distribution in the image more intuitive, and improving the accuracy and efficiency of subsequent image brightness adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863409A_ABST
    Figure CN119863409A_ABST
Patent Text Reader

Abstract

The invention discloses an image brightness analysis method and device, equipment, a storage medium and a product, and relates to the field of images. The method comprises the following steps: acquiring a first image and a thermodynamic diagram parameter table; extracting brightness value results respectively corresponding to the plurality of pixel points; determining a reference brightness value matched with the brightness value result in the plurality of reference brightness values, and determining adjusted pixel colors corresponding to the plurality of pixel points based on reference pixel colors corresponding to the plurality of reference brightness values; and generating a thermodynamic diagram display result corresponding to the first image based on the adjusted pixel colors corresponding to the plurality of pixel points. Namely, the brightness value result corresponding to each pixel point is quantized and mapped through the thermodynamic diagram parameter table, the brightness value distribution condition of the pixel points in the generated thermodynamic diagram display result is highlighted, and the accuracy and efficiency of subsequent image brightness adjustment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of images, and in particular to an image brightness analysis method, device, equipment, storage medium and product. Background Art

[0002] Image brightness refers to the intensity of light reflected by the objects contained in the image, which creates a visual experience for people. Taking the game scene as an example, in the process of making the game scene screen, the designer needs to adjust the brightness of the game scene screen to provide players with the best visual experience, for example: make the brightness value corresponding to the main part of the screen higher than the brightness value of the background area.

[0003] In the related art, the process of adjusting the image brightness is usually performed by designers observing the target image and adjusting the brightness value of each pixel in the target image based on their work experience.

[0004] However, in the related art, the method of adjusting the brightness of the target image based on the designers' work experience will result in low efficiency of image brightness adjustment. Summary of the invention

[0005] The embodiments of the present application provide a method, device, equipment, storage medium and product for analyzing image brightness, which can improve the efficiency of adjusting image brightness. The technical solution is as follows.

[0006] In one aspect, a method for analyzing image brightness is provided, the method comprising:

[0007] Acquire a first image and a heat map parameter table, wherein the first image includes a plurality of pixel points, and the heat map parameter table includes a plurality of reference brightness values ​​and reference pixel colors respectively corresponding to the plurality of reference brightness values, wherein the number of the reference brightness values ​​is less than the number of the pixel points;

[0008] Extracting brightness value results respectively corresponding to the plurality of pixel points, the brightness value results being used to indicate the brightness or darkness of the pixel points displayed in the first image;

[0009] Determine a reference brightness value that matches the brightness value result from among the multiple reference brightness values, and determine adjustment pixel colors corresponding to the multiple pixel points respectively based on reference pixel colors corresponding to the multiple reference brightness values ​​respectively;

[0010] A heat map display result corresponding to the first image is generated based on the adjusted pixel colors respectively corresponding to the multiple pixel points, and the heat map display result is used to display the distribution of brightness values ​​of pixels in the first image in the form of quantitative mapping.

[0011] In another aspect, a device for analyzing image brightness is provided, the device comprising:

[0012] An acquisition module, configured to acquire a first image and a thermal map parameter table, wherein the first image includes a plurality of pixels, and the thermal map parameter table includes a plurality of reference brightness values ​​and reference pixel colors corresponding to the plurality of reference brightness values, respectively, wherein the number of the reference brightness values ​​is less than the number of the pixels;

[0013] An extraction module, used for extracting brightness value results respectively corresponding to the plurality of pixel points, wherein the brightness value results are used for indicating the brightness or darkness of the pixel points displayed in the first image;

[0014] a determination module, configured to determine a reference brightness value matching the brightness value result from among the plurality of reference brightness values, and determine adjustment pixel colors corresponding to the plurality of pixel points respectively based on reference pixel colors corresponding to the plurality of reference brightness values ​​respectively;

[0015] A generation module is used to generate a heat map display result corresponding to the first image based on the adjusted pixel colors corresponding to the multiple pixel points respectively, and the heat map display result is used to display the distribution of pixel brightness values ​​in the first image in the form of quantitative mapping.

[0016] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the image brightness analysis method as described in any of the above-mentioned embodiments of the present application.

[0017] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the image brightness analysis method as described in any of the above-mentioned embodiments of the present application.

[0018] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the image brightness analysis method described in any of the above embodiments.

[0019] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0020] In the case of obtaining the first image and the heat map parameter table, the brightness value results corresponding to the multiple pixels in the first image are extracted, so as to determine the reference brightness value matching the brightness value result from the multiple reference brightness values ​​in the heat map parameter table, and based on the reference pixels corresponding to the multiple reference brightness values, the adjustment pixel colors corresponding to the multiple pixels are determined, so as to generate the heat map display result corresponding to the first image based on the adjustment pixel colors corresponding to the multiple pixels, which is used to display the distribution of the brightness values ​​of the pixels in the first image in the form of quantitative mapping. That is, by setting the heat map parameter table in which the number of reference brightness values ​​is less than the number of pixels in the first image, after obtaining the brightness value results corresponding to each pixel in the first image, the brightness value results corresponding to each pixel are quantitatively mapped through the heat map parameter table to obtain the adjustment pixel colors corresponding to each pixel, so as to highlight the distribution of the brightness values ​​of the pixels in the generated heat map display result, simplify the distribution of the brightness layout of the picture, make the light and dark distribution in the image more intuitive, and improve the accuracy and efficiency of the subsequent adjustment of the image brightness. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 It is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0023] Figure 2 is a flow chart of an image brightness analysis method provided by an exemplary embodiment of the present application;

[0024] Figure 3 is a flow chart of an image brightness analysis method provided by another exemplary embodiment of the present application;

[0025] Figure 4 is a flow chart of an image brightness analysis method provided by another exemplary embodiment of the present application;

[0026] Figure 5 is a schematic diagram of a process for generating a heat map display result provided by another exemplary embodiment of the present application;

[0027] Figure 6 is a schematic diagram of an image brightness analysis method provided by an exemplary embodiment of the present application;

[0028] Figure 7 is a schematic diagram of a hardware environment provided by another exemplary embodiment of the present application;

[0029] Figure 8 is a schematic diagram of an image brightness analysis method provided by an exemplary embodiment of the present application;

[0030] Fig. 9 is a structural block diagram of an image brightness analysis device provided by an exemplary embodiment of the present application;

[0031] Fig.10 is a structural block diagram of an image brightness analysis device provided by another exemplary embodiment of the present application;

[0032] Fig.11 It is a schematic diagram of the structure of a server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0034] First, the implementation environment of this application is introduced. Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, such as Figure 1 As shown, the implementation environment includes a terminal 110 and a server 120 , and the terminal 110 and the server 120 are connected via a communication network 130 .

[0035] In the embodiment of the present application, the implementation environment is introduced by taking the game design scenario as an example. An application with a game screen display function and a screen editing function is running in the terminal 110. During the running of the application, a first image is displayed in the terminal 110. When a heat map conversion operation is received, the terminal 110 sends the first image to the server 120, wherein the heat map conversion operation is used to request to obtain a heat map display result corresponding to the first image.

[0036] After receiving the first image, the server 120 extracts the brightness value results corresponding to the multiple pixels in the first image, and obtains a pre-stored heat map parameter table from the server 120, wherein the heat map parameter table includes multiple reference brightness values ​​and their corresponding reference pixel colors, determines a reference brightness value matching the brightness value result among the multiple reference brightness values, and determines the adjustment pixel colors corresponding to the multiple pixels based on the reference pixel colors corresponding to the multiple reference brightness values; generates a heat map display result corresponding to the first image based on the adjustment pixel colors corresponding to the multiple pixels, and feeds back the heat map display result to the terminal 110.

[0037] After receiving the heat map display result, the terminal 110 displays it to assist the designer in adjusting the image brightness in the first image.

[0038] Among them, the terminal 110 includes at least one of the terminals such as smart phones, tablet computers, portable laptops, desktop computers, smart speakers, smart wearable devices, smart voice interaction devices, smart home appliances, and vehicle-mounted terminals. The server 120 can be used in scenarios where command operations are implemented in the fields of smart transportation, vehicle-mounted terminals, and the Internet of Things.

[0039] It is worth noting that the above-mentioned communication network 130 can be implemented as a wired network or a wireless network, and the communication network 130 can be implemented as any one of a local area network, a metropolitan area network or a wide area network, which is not limited in the embodiments of the present application.

[0040] It is worth noting that the above-mentioned server 120 can be implemented as a cloud server in the cloud, where cloud technology (Cloud Technology) refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or local area network to achieve data calculation, storage, processing, and sharing.

[0041] In some embodiments, the server 120 may also be implemented as a node in a blockchain system.

[0042] It is worth noting that the embodiment of the present application provides an image brightness analysis method, which can be implemented by the terminal 110 alone, by the server 120 alone, or by the terminal 110 and the server 120 in collaboration.

[0043] Among them, when the terminal 110 and the server 120 collaborate to implement the solution provided by the embodiment of the present application, the terminal 110 and the server 120 can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application.

[0044] It is worth noting that the above-mentioned image brightness analysis method is not only applied to game design scenarios, but also to at least one of the scene types such as video creation scenarios and image generation scenarios.

[0045] It should be noted that before collecting relevant data of users and during the process of collecting relevant data of users, this application can display a prompt interface, pop-up window or output voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data of users after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of users are terminated, that is, the relevant data of users are not obtained. In other words, all user data collected by this application are collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant regions.

[0046] In combination with the above-mentioned noun introduction and implementation environment, the image brightness analysis method provided in the embodiment of the present application is described, and the method is performed by a server as an example. For illustration, please refer to Figure 2 , which shows a flow chart of an image brightness analysis method provided by an exemplary embodiment of the present application, the method comprising the following steps.

[0047] Step 210, obtaining a first image and a thermal map parameter table.

[0048] Among them, the first image includes multiple pixel points, the thermal map parameter table includes multiple reference brightness values ​​and reference pixel colors corresponding to the multiple reference brightness values, and the number of reference brightness values ​​is less than the number of pixel points.

[0049] Schematically, the first image is an image containing light and dark areas, wherein the light and dark areas are the light areas and dark areas included in the first image, and the light areas and the dark areas are used to make the user visually have a difference in light and dark, that is, for example: image a includes object 1, and the image brightness of the area corresponding to object 1 is brighter than the background area in image a (the area except object 1), then the area corresponding to object 1 is the light area, and the background area is the dark area.

[0050] Optionally, the first image is a grayscale image; or, the first image is a color image, which is not limited.

[0051] In some embodiments, a pixel point refers to the smallest basic unit element in an image, and the brightness value of the pixel point determines the image brightness of the area corresponding to the position of the pixel point in the first image, that is, the image brightness is related to the brightness value of the pixel point.

[0052] Among them, for grayscale images, grayscale refers to the degree of brightness of the image, that is, the color depth of the pixels in black and white images. Therefore, the color of each pixel is represented by a single channel value. In the 8-byte (bit) range, the channel value ranges from 0 to 255, 0 represents black, that is, the darkest pixel, 255 represents white, that is, the brightest pixel. If it is within the 16-bit range, the channel value range is between 0 and 1024, and the 32-bit range has a larger channel value range. Therefore, the high or low value corresponding to the pixel in the grayscale image represents the high or low brightness value of the pixel.

[0053] For color images, the color of each pixel is represented by R (Red, red channel) G (Green, green channel) B (Blue, blue channel). Within the 8-byte range, the value range of each color channel is between 0 and 255. According to the values ​​of the three color channels, the brightness corresponding to the pixel is obtained according to the specified value rules. If it is within the range of 16bit and 32bit, the channel value range is larger. Among them, when the RGB three channel values ​​of a pixel in a color image are equal, that value is the brightness value corresponding to the pixel.

[0054] In the embodiment of the present application, the value range of the color channel is implemented as an infinite interval between 0 and 1, which is used to unify the channel value ranges in different byte ranges.

[0055] Optionally, the reference pixel color is an RGB color, or the reference pixel color is a grayscale color, which is not limited.

[0056] Optionally, the first image is acquired in at least one of the following ways:

[0057] 1. Generate a first image through a painting program, that is, the first image is a painting image;

[0058] 2. Generate a target video through a video editing program, and capture a specified screen image as the first image, that is, the first image is a screenshot of the video screen;

[0059] 3. When a designated application is running on the terminal, a program running screen of the designated application is captured as the first image, that is, the first image is the program running screen.

[0060] It is worth noting that the above-mentioned method for acquiring the first image is only an illustrative example and is not limited to this in the embodiments of the present application.

[0061] In some embodiments, the heat map parameter table refers to a mapping table used for pixel color reference in the process of generating a heat map, that is, the reference pixel value and the reference pixel color in the heat map parameter table have a one-to-one mapping relationship.

[0062] Schematically, the reference brightness value in the heat map parameter table refers to the brightness value corresponding to the pre-set pixel point, and for the reference brightness value corresponding to the pixel point, the reference pixel color corresponding to the pixel point in the image is pre-set. For example: the heat map parameter table includes the reference brightness value (0.167) corresponding to the reference pixel color (0.0, 0.0, 0.0), and the reference brightness value (0.333) corresponding to the reference pixel color (0.0, 1.0, 1.0).

[0063] Schematically, in the process of designing a heat map parameter table, a mapping table of reference brightness values ​​and reference pixel colors is first set, and when the channel value range is from 0 to 1, a specified number of value divisions are performed between the range of 0 and 1 to obtain a specified number of reference brightness values, and based on the reference pixel colors corresponding to the specified number of reference brightness values ​​in the mapping table, a heat map parameter table is generated, in which the reference pixel values ​​correspond one-to-one to the reference pixel colors.

[0064] In some embodiments, in the process of designing the thermal map parameter table, the number of divisions of the reference brightness value is less than the number of pixels in the first image.

[0065] Step 220: extracting brightness value results corresponding to a plurality of pixel points.

[0066] The brightness value result is used to indicate the brightness or darkness of the pixel in the first image.

[0067] In some embodiments, the brightness value result of the pixel point is used to determine the brightness of the area where the pixel point is located in the first image, wherein the higher the brightness value, the brighter the area where the pixel point is located is displayed in the first image, and vice versa.

[0068] Schematically, for a grayscale image, the grayscale value result corresponding to a pixel is the value result corresponding to a single color channel.

[0069] Optionally, for a color image, the brightness value result extraction method includes at least one of the following methods:

[0070] 1. After obtaining the RGB value corresponding to the pixel, take the highest value among the three color channels as the brightness value corresponding to the pixel. For example, if the RGB value corresponding to pixel a is (0.21, 0.2, 0.32), the brightness value of pixel a is 0.32.

[0071] 2. After obtaining the RGB value corresponding to the pixel, the values ​​of the three color channels are averaged to obtain the average value as the brightness value corresponding to the pixel. For example, the RGB value corresponding to pixel b is (0.18, 0.2, 0.33), then the brightness value of pixel a is (0.18+0.2+0.33) / 3=0.24 (taking 2 decimal places as an example, 3 decimal places can also be taken, without limitation), which is the brightness value result corresponding to pixel b;

[0072] 3. After obtaining the RGB value corresponding to the pixel, substitute the values ​​corresponding to the three RGB channels into the specified value function through the preset specified value function, and the output result is the brightness value corresponding to the pixel. For example, the RGB value corresponding to the pixel c is (0.18, 0.24, 0.33), and the specified value function is 0.2*R+0.4*G+0.4*B. Then substitute the values ​​of the three RGB channels to obtain 0.2*0.18+0.4*0.24+0.4*0.33=0.26 (taking 2 decimal places as an example, 3 decimal places can also be taken, without limitation), as the brightness value result corresponding to the pixel c.

[0073] It is worth noting that the above-mentioned method for extracting brightness value results is only an illustrative example and is not limited to this in the embodiments of the present application.

[0074] That is, in the embodiment of the present application, for a color image, the brightness value of a pixel is determined by the initial pixel color (RGB value) corresponding to the pixel.

[0075] Step 230 , determining a reference brightness value that matches the brightness value result from among the multiple reference brightness values, and determining adjustment pixel colors corresponding to the multiple pixel points based on the reference pixel colors corresponding to the multiple reference brightness values.

[0076] In a feasible case, first, after obtaining the brightness value results corresponding to each pixel point in the first image, the brightness value results of the pixel points are first quantized according to the heat map parameter table, and a reference brightness value that matches the brightness value result among multiple reference brightness values ​​is determined, wherein the quantization process refers to finally corresponding multiple pixel points within a specified brightness value area to the same reference brightness value, thereby simplifying the numerical difference of the brightness values.

[0077] In another feasible case, taking 8 bits as an example, the brightness value corresponding to the pixel point ranges from 0 to 255. If the quantization number is 256, it is regarded as unquantized. That is, after obtaining the brightness value results corresponding to each pixel point, the reference brightness value that matches the brightness value result is directly determined from multiple reference brightness values.

[0078] Secondly, according to the mapping relationship between the reference brightness value and the reference pixel color in the heat map reference table, the brightness value result corresponding to the pixel point is mapped through the heat map parameter table to obtain the corresponding adjusted pixel color.

[0079] Optionally, for the pixel points in the first image, one or more reference brightness values ​​that match the brightness value result of the pixel point are determined from the heat map parameter table. For example, the brightness value result of pixel point a is 0.32, and the closest reference brightness value in the heat map parameter table is 0.333. Therefore, 0.333 is used as the reference brightness value matching pixel point a. For another example, the brightness value result of pixel point a is 0.32, and the reference brightness values ​​adjacent to 0.32 in the heat map parameter table are 0.167 and 0.333 respectively. Therefore, 0.167 and 0.333 are the two reference brightness values ​​matching pixel point a.

[0080] Optionally, after determining the reference brightness value that matches the pixel point, the reference pixel color corresponding to the reference brightness value is used as the adjusted pixel color corresponding to the pixel point; or, a color calculation formula is set in advance, and the reference pixel color corresponding to the reference brightness value is substituted to calculate the adjusted pixel color corresponding to the pixel point; or, a color calculation formula is set in advance, and the reference brightness value, reference pixel color and brightness value result are substituted to calculate the adjusted pixel color corresponding to the pixel point, and there is no limitation on this.

[0081] Illustratively, for a color image, the adjusted pixel color corresponding to the pixel point may be represented by an RGB value or a grayscale value.

[0082] Step 240: Generate a heat map display result corresponding to the first image based on the adjusted pixel colors corresponding to the plurality of pixel points.

[0083] The heat map display result is used to display the distribution of brightness values ​​of pixels in the first image in the form of quantitative mapping.

[0084] Schematically, the heat map display result refers to an image generated after multiple pixels are displayed with corresponding adjusted pixel colors.

[0085] Among them, quantization mapping refers to quantizing the pixels in the same brightness value area into discrete values ​​through the heat map parameter table, and then determining the relationship between the reference brightness value and the reference pixel color through the mapping between the reference brightness value and the reference pixel color, so that the pixels with different initial pixel colors can obtain the same adjusted pixel color through the heat map parameter table, so that when the number of reference pixel values ​​is less than the number of pixels, the color distribution in the heat map display result is simpler than the color distribution in the first image, that is, the number of color distribution in the heat map display result is less than the number of color distribution in the first image.

[0086] Optionally, the distribution of pixel brightness values ​​includes at least one of a distribution area position of the pixel in the first image, a distribution area size, and a brightness level of the pixel.

[0087] Among them, the distribution area position refers to the corresponding position of the area where the pixel point is located in the first image, the distribution area size refers to the range of the area where at least two pixels of the same adjusted pixel color are located in the first image, and the brightness of the pixel point refers to the brightness corresponding to the adjusted pixel color corresponding to the pixel point.

[0088] In some embodiments, after obtaining the heat map display result corresponding to the first image, the adjustment pixel colors in the heat map display result are classified to obtain the color classification result corresponding to the heat map display result, and the distribution of the brightness value of each pixel in the first image is determined according to the color classification result. For example, the heat map display result includes seven adjustment pixel colors, namely gray, green, cyan, blue, black, yellow and red. The area corresponding to the yellow and red pixels is regarded as the high-key area, the gray and green pixels are regarded as the mid-key area, and the area corresponding to the cyan, blue and black pixels is regarded as the low-key area. This is used as an auxiliary reference for designers to adjust the brightness value of the pixels in the first image in the future, including lowering the brightness value of the pixels with too bright brightness value, or raising the brightness value of the pixels with too dark brightness value.

[0089] In summary, the image brightness analysis method provided by the embodiment of the present application, when obtaining the first image and the heat map parameter table, extracts the brightness value results corresponding to multiple pixels in the first image, thereby determining the reference brightness value matching the brightness value result from the multiple reference brightness values ​​in the heat map parameter table, and based on the reference pixels corresponding to the multiple reference brightness values, determines the adjustment pixel colors corresponding to the multiple pixels, thereby generating the heat map display result corresponding to the first image based on the adjustment pixel colors corresponding to the multiple pixels, which is used to display the distribution of the brightness values ​​of the pixels in the first image in the form of quantitative mapping. That is, by setting the heat map parameter table in which the number of reference brightness values ​​is less than the number of pixels in the first image, after obtaining the brightness value results corresponding to each pixel in the first image, the brightness value results corresponding to each pixel are quantitatively mapped through the heat map parameter table to obtain the adjustment pixel colors corresponding to each pixel, thereby highlighting the distribution of the brightness values ​​of the pixels in the generated heat map display result, simplifying the layout distribution of the brightness of the picture, making the light and dark distribution in the image more intuitive, and improving the accuracy and efficiency of the subsequent adjustment of the image brightness.

[0090] In some embodiments, the method for obtaining the adjusted pixel color is described in detail. For example, please refer to Figure 3 , which shows a flow chart of an image brightness analysis method provided by an exemplary embodiment of the present application, that is, step 230 also includes steps 231 and 232, such as Figure 3 As shown, the method includes the following steps.

[0091] Step 231, in the process of determining the adjusted pixel color corresponding to the ith pixel, the brightness value result corresponding to the ith pixel is matched with a plurality of reference brightness values ​​to determine a reference brightness value that matches the brightness value result corresponding to the ith pixel.

[0092] Wherein, i is a positive integer.

[0093] Illustratively, in this embodiment, a process of obtaining the adjusted pixel color of the i-th pixel among a plurality of pixels is taken as an example for description.

[0094] Optionally, when the first image includes multiple pixels, the adjusted pixel colors corresponding to the multiple pixels are obtained simultaneously; or, according to the pixel distribution pattern of the multiple pixels in the first image, the adjusted pixel colors corresponding to the multiple pixels in the first image are obtained in sequence, and there is no limitation on this.

[0095] Optionally, there is a single reference brightness value that matches the brightness value result corresponding to the i-th pixel; or there are multiple different reference brightness values ​​that match the brightness value result corresponding to the i-th pixel.

[0096] In some embodiments, the brightness value result corresponding to the i-th pixel point is matched with multiple reference brightness values ​​to determine a first reference brightness value and a second reference brightness value corresponding to the brightness value result. The brightness value result is between the first reference brightness value and the second reference brightness value. The first reference brightness value corresponds to a first reference color, and the second brightness value corresponds to a second reference color.

[0097] Illustratively, the first reference brightness value and the second reference brightness value are two reference brightness values ​​adjacent to the brightness value result corresponding to the i-th pixel point, that is, the brightness value result corresponding to the i-th pixel point is between the first reference brightness value and the second reference brightness value.

[0098] Optionally, the arrangement of the first reference brightness value, the second reference brightness value, and the brightness value of the i-th pixel from small to large includes: the first reference brightness value, the brightness value of the i-th pixel, the second reference brightness value; or the second reference brightness value, the brightness value of the i-th pixel, the first reference brightness value. That is, the first reference brightness value and the second reference brightness value are only used to represent two reference brightness values ​​adjacent to the brightness value result, and are irrelevant to the size of the reference brightness values.

[0099] Schematically, by matching the brightness value result corresponding to the i-th pixel with a plurality of reference brightness values ​​in the thermal intensity parameter table, a first reference brightness value and a second reference brightness value matching the brightness value result corresponding to the i-th pixel are determined. Schematically, the thermal intensity parameter table is shown in Table 1 below.

[0100] Table 1

[0101] Reference brightness value Reference pixel color 0.000 (0.0,0.0,0.0) 0.167 (0.0,0.0,1.0) 0.333 (0.0,1.0,1.0) 0.500 (0.5,0.5,0.5) 0.667 (0.0,1.0,0.0) 0.831 (1.0,1.0,0.0) 1.000 (1.0,0.0,0.0)

[0102] In this embodiment, as shown in Table 1, the thermal map parameter table includes seven reference brightness values ​​and reference pixel colors corresponding to the seven reference brightness values. If the brightness value corresponding to the i-th pixel point is 0.32, the first reference brightness value that matches the brightness value result of the i-th pixel point can be obtained through Table 1 as 0.167, and the second reference brightness value is 0.333.

[0103] In some embodiments, a brightness quantization quantity is obtained, where the brightness quantization quantity is used to indicate the quantity of reference brightness values; and a quantized brightness value corresponding to the i-th pixel is determined based on a rounding function and the brightness quantization quantity.

[0104] In an optional case, after obtaining the brightness value result corresponding to the i-th pixel point, the brightness value result is firstly quantized in a hierarchical manner, wherein hierarchical quantization refers to pre-setting a plurality of different brightness quantization quantities, and through the brightness quantization quantities, the pixel points of the plurality of different brightness value results are finally quantized into discrete value results whose number is smaller than the brightness value results, wherein there are at least two pixel points corresponding to the same quantized brightness value.

[0105] Schematically, the brightness quantization quantity is used to determine the discreteness of the brightness value results corresponding to multiple pixel points. The greater the brightness quantization quantity, the higher the discreteness of the quantized result.

[0106] In this embodiment, the brightness quantization number is equal to the number of reference brightness values ​​as an example for explanation (the brightness quantization number and the number of reference brightness values ​​may be equal or different), that is, for the case where the heat map parameter table is the above Table 1, the brightness quantization number is obtained as 7, and a quantization function is generated by a rounding function and the brightness quantization number, and the brightness value corresponding to the i-th pixel is substituted into the quantization function to calculate the quantized brightness value corresponding to the i-th pixel. Among them, the rounding function refers to a function that takes the integer part of a value with a decimal point. The quantization function can refer to the following formula 1:

[0107]

[0108] Among them, L represents the brightness quantization result, floor(V*N) represents the rounding function, V represents the brightness value result corresponding to the pixel point, and N represents the brightness quantization number.

[0109] Taking the i-th pixel as an example, according to Formula 1, first obtain the product result between the brightness value result corresponding to the i-th pixel and the brightness quantization quantity, and obtain the corresponding rounding result of the product result through the rounding function, so as to use the quotient between the rounding result and the brightness quantization quantity as the quantized brightness value corresponding to the i-th pixel. That is, obtain the product result between the brightness value result corresponding to the i-th pixel and the brightness quantization quantity; round the product result through the rounding function to obtain the rounding result, and the rounding function is a function used to round the output result; determine the quantized brightness value corresponding to the i-th pixel based on the rounding result and the brightness quantization quantity.

[0110] In this embodiment, if the brightness value corresponding to the i-th pixel point is 0.33 and the brightness quantization number is 7, the product result is 0.33*7=2.31. The rounding function can obtain a rounding result of 2. According to the quotient between the rounding result and the brightness quantization number, 0.29 (the two decimal places are taken, and other digits can also be taken, without limitation) is obtained as the quantized brightness value result.

[0111] Step 232 , determining the adjusted pixel color corresponding to the i-th pixel point based on the reference brightness value, the adjusted pixel color corresponding to the reference brightness value, and the brightness value result.

[0112] In some embodiments, the adjusted pixel color corresponding to the i-th pixel point is determined based on the interpolation relationship among the first reference brightness value, the first reference color, the second reference brightness value, the second reference color, and the brightness value result.

[0113] Schematically, interpolation refers to constructing a function passing through these points based on the function values ​​of known data points, which is used to estimate the function value between known data points and is a function approximation algorithm.

[0114] In this embodiment, an interpolation function is pre-set, and the first reference brightness value, the reference pixel color corresponding to the first reference brightness value, the second reference brightness value, the reference pixel color corresponding to the second reference brightness value, and the quantized brightness value are substituted into the interpolation function to calculate the adjusted pixel color corresponding to the i-th pixel point. The interpolation function is shown in the following formula 2.

[0115]

[0116] Formula 2 can be abbreviated as p=Lut(L).

[0117] Among them, p means adjusting the pixel color, P l represents the maximum reference brightness value smaller than the brightness value result, that is, the first reference brightness value, P r represents the minimum reference brightness value greater than the brightness value result, that is, the second reference brightness value, K l represents the first reference pixel color, K r represents the second reference pixel color, and L represents the reference brightness value.

[0118] In summary, the image brightness analysis method provided by the embodiment of the present application, when obtaining the first image and the heat map parameter table, extracts the brightness value results corresponding to multiple pixels in the first image, thereby determining the reference brightness value matching the brightness value result from the multiple reference brightness values ​​in the heat map parameter table, and based on the reference pixels corresponding to the multiple reference brightness values, determines the adjustment pixel colors corresponding to the multiple pixels, thereby generating the heat map display result corresponding to the first image based on the adjustment pixel colors corresponding to the multiple pixels, which is used to display the distribution of the brightness values ​​of the pixels in the first image in the form of quantitative mapping. That is, by setting the heat map parameter table in which the number of reference brightness values ​​is less than the number of pixels in the first image, after obtaining the brightness value results corresponding to each pixel in the first image, the brightness value results corresponding to each pixel are quantitatively mapped through the heat map parameter table to obtain the adjustment pixel colors corresponding to each pixel, thereby highlighting the distribution of the brightness values ​​of the pixels in the generated heat map display result, simplifying the layout distribution of the brightness of the picture, making the light and dark distribution in the image more intuitive, and improving the accuracy and efficiency of the subsequent adjustment of the image brightness.

[0119] In this embodiment, for the ith pixel point, the brightness value result corresponding to the ith pixel point is matched with multiple reference brightness values ​​to determine the reference brightness value that matches the brightness value result corresponding to the ith pixel point, and then the adjusted pixel color corresponding to the ith pixel point is determined based on the matched reference brightness value, the adjusted pixel color and the brightness value result, and the ith pixel point can be mapped to the thermal map parameter table, thereby enhancing the display of the brightness of each area in the image and improving the accuracy of the image brightness display.

[0120] In this embodiment, by determining two adjacent brightness value results corresponding to the ith pixel point, the adjustment pixel color corresponding to the ith pixel point is determined based on the interpolation relationship, thereby improving the accuracy of obtaining the adjustment pixel color.

[0121] In this embodiment, by setting the brightness quantization quantity and quantizing the brightness values ​​corresponding to the pixels, the brightness values ​​within the same interval can be classified as the same quantized brightness values, which simplifies the subsequent calculation process of adjusting the pixel color.

[0122] In this embodiment, after obtaining the product result between the brightness value result corresponding to the i-th pixel point and the brightness quantization quantity, the rounding result corresponding to the product result is determined according to the rounding function, and the quantized brightness value corresponding to the i-th pixel point is determined according to the rounding result and the brightness quantization quantity. This can make the numerical range of the quantized brightness value corresponding to each pixel point more concentrated, thereby highlighting the distribution of the brightness values ​​of the pixels in the final heat map display result, which is used to improve efficiency when performing subsequent brightness adjustment.

[0123] In some embodiments, the image adjustment process after obtaining the heat map display result is described in detail. For example, please refer to Figure 4 That is, step 220 also includes step 221 and step 222, step 240 also includes step 241 to step 242, and step 240 also includes step 250 and step 260, which shows a flow chart of an image brightness analysis method provided by an exemplary embodiment of the present application, as shown in FIG. Figure 4 As shown, the method includes the following steps.

[0124] Step 221 , in the process of obtaining the brightness value result corresponding to the n-th pixel point, obtain multiple color channel values ​​corresponding to the n-th pixel point.

[0125] The color channel value refers to the numerical result corresponding to the pixel point on the color channel, and n is a positive integer.

[0126] Schematically, taking the first image as a color image as an example, each pixel in the first image uses a channel value corresponding to the RGB three channels to represent the pixel color corresponding to the pixel.

[0127] In this embodiment, in the process of obtaining the brightness value result corresponding to the nth pixel point, first, the initial pixel color of the nth pixel point in the first image is obtained, that is, the RGB three color channel values ​​of the nth pixel point in the first image are obtained. In an exemplary embodiment, the initial pixel color of the nth pixel point is (0.32, 0.16, 0.07).

[0128] Step 222, by performing brightness conversion on multiple color channel values, a brightness value result corresponding to the nth pixel point is obtained.

[0129] Optionally, the brightness value result is extracted in at least one of the following ways:

[0130] 1. After obtaining the RGB value corresponding to the pixel, take the highest value among the three color channels as the brightness value corresponding to the pixel. For example, if the RGB value corresponding to pixel a is (0.21, 0.2, 0.32), the brightness value of pixel a is 0.32.

[0131] 2. After obtaining the RGB value corresponding to the pixel, the values ​​of the three color channels are averaged to obtain the average value as the brightness value corresponding to the pixel. For example, the RGB value corresponding to pixel b is (0.18, 0.2, 0.33), then the brightness value of pixel a is (0.18+0.2+0.33) / 3=0.24 (taking 2 decimal places as an example, 3 decimal places can also be taken, without limitation), which is the brightness value result corresponding to pixel b;

[0132] 3. After obtaining the RGB value corresponding to the pixel, substitute the values ​​corresponding to the three RGB channels into the specified value function through the preset specified value function, and the output result is the brightness value corresponding to the pixel. For example, the RGB value corresponding to the pixel c is (0.18, 0.24, 0.33), and the specified value function is 0.2*R+0.4*G+0.4*B. Then substitute the values ​​of the three RGB channels to obtain 0.2*0.18+0.4*0.24+0.4*0.33=0.26 (taking 2 decimal places as an example, 3 decimal places can also be taken, without limitation), as the brightness value result corresponding to the pixel c.

[0133] It is worth noting that the above-mentioned method for extracting brightness value results is only an illustrative example and is not limited to this in the embodiments of the present application.

[0134] In this embodiment, a maximum value formula is used to select the maximum value among the three RGB color channel values ​​as the brightness value result corresponding to the nth pixel point, and its formula is shown in the following formula 3.

[0135] Formula 3: V = max((R, G, B)

[0136] Among them, V represents the brightness value result corresponding to the pixel point.

[0137] Step 230 , determining a reference brightness value that matches the brightness value result from among the multiple reference brightness values, and determining adjustment pixel colors corresponding to the multiple pixel points based on the reference pixel colors corresponding to the multiple reference brightness values.

[0138] The content of adjusting the pixel color in step 230 has been described in detail in the above embodiment, and will not be repeated in this embodiment.

[0139] Step 241: Obtain pixel positions of a plurality of pixels in the first image.

[0140] Schematically, the first image is composed of pixels arranged at a certain interval, so the pixel position is the arrangement position of the multiple pixels in the first image.

[0141] Step 242 , displaying a heat map display result corresponding to the first image based on the pixel position and the adjusted pixel colors corresponding to the plurality of pixels.

[0142] Schematically, according to the arrangement order of the plurality of pixels in the first image and the pixel colors of the plurality of pixels are adjusted respectively, the heat map display result corresponding to the first image is displayed.

[0143] Step 250: determine a subject area in the first image.

[0144] Schematically, the main area in the first image refers to the area where the main object in the first image is located, wherein the main object refers to the main object that is focused on in the first image, which is the visual center of the user's sight when the user sees the first image and the main embodiment of the image content.

[0145] In some embodiments, an image recognition model is obtained, where the image recognition model is a neural network model pre-trained for subject recognition; the first image is input into the image recognition model for subject recognition, and the subject area in the first image is output.

[0146] Illustratively, an image recognition model for subject recognition of an input image is pre-trained, a first image is input into the trained image recognition model, and an image recognition result is output, wherein the image recognition result includes a subject area in the first image.

[0147] Step 260 , in response to the adjusted brightness value corresponding to the main body area meeting the brightness adjustment requirement, the brightness value result of the pixel point in the main body area is adjusted to obtain a second image.

[0148] In some embodiments, the heat map display result includes adjusted brightness values ​​corresponding to a plurality of pixel points, and the adjusted brightness value is a brightness value result obtained by adjusting the pixel color.

[0149] In this embodiment, when obtaining the heat map display result corresponding to the first image, the heat map display result includes a brightness value result obtained by adjusting the pixel color, that is, the adjusted brightness value.

[0150] If the adjusted brightness value corresponding to the main body area meets the brightness adjustment requirement, the brightness value result of the pixel point in the main body area is adjusted to obtain the second image.

[0151] In some embodiments, the first image also includes a background area; in response to the adjusted brightness value corresponding to the main area not reaching a preset brightness threshold, the adjusted brightness value corresponding to the main area is increased, and the adjusted brightness value corresponding to the background area is reduced to obtain a second image.

[0152] Schematically, the background area refers to the area in the first image other than the main part. When the adjusted brightness value corresponding to the main area does not reach a preset brightness threshold, the adjusted brightness value corresponding to the main area is enhanced and the adjusted brightness value corresponding to the background area is reduced, thereby obtaining an adjusted second image.

[0153] For illustration, please refer to Figure 5 , which shows a schematic diagram of a heat map display result generation process provided by an exemplary embodiment of the present application, such as Figure 5As shown, firstly, a first image 510 is acquired, and the brightness value results corresponding to a plurality of pixel points in the first image 510 are extracted to obtain a grayscale image 520 corresponding to the first image 510. After quantizing the brightness value results in the grayscale image 520, a quantized brightness image 530 including the quantized brightness values ​​is obtained. Finally, a heat map display result 540 corresponding to the first image 510 is generated through a heat map parameter table and the above-mentioned interpolation function. Figure 5 The difference in pixel brightness between different images is expressed by the difference in grayscale values.

[0154] In summary, the image brightness analysis method provided by the embodiment of the present application, when obtaining the first image and the heat map parameter table, extracts the brightness value results corresponding to multiple pixels in the first image, thereby determining the reference brightness value matching the brightness value result from the multiple reference brightness values ​​in the heat map parameter table, and based on the reference pixels corresponding to the multiple reference brightness values, determines the adjustment pixel colors corresponding to the multiple pixels, thereby generating the heat map display result corresponding to the first image based on the adjustment pixel colors corresponding to the multiple pixels, which is used to display the distribution of the brightness values ​​of the pixels in the first image in the form of quantitative mapping. That is, by setting the heat map parameter table in which the number of reference brightness values ​​is less than the number of pixels in the first image, after obtaining the brightness value results corresponding to each pixel in the first image, the brightness value results corresponding to each pixel are quantitatively mapped through the heat map parameter table to obtain the adjustment pixel colors corresponding to each pixel, thereby highlighting the distribution of the brightness values ​​of the pixels in the generated heat map display result, simplifying the layout distribution of the brightness of the picture, making the light and dark distribution in the image more intuitive, and improving the accuracy and efficiency of the subsequent adjustment of the image brightness.

[0155] In this embodiment, by acquiring multiple color channel values ​​corresponding to the n-th pixel point, the brightness value result corresponding to the n-th pixel point is obtained by performing brightness conversion on the multiple color channel values, thereby improving the accuracy of the brightness value result.

[0156] In this embodiment, by obtaining the pixel positions of multiple pixels in the first image, the heat map display result corresponding to the first image is displayed according to the pixel positions and adjusting the pixel colors, so that each display area in the heat map display result corresponds to the first image.

[0157] In this embodiment, by determining the main body area in the first image, the brightness value result of the pixel point in the main body area is adjusted when the adjustment brightness value corresponding to the main body area meets the brightness adjustment requirement, so as to obtain the second image and improve the efficiency of image brightness adjustment.

[0158] In this embodiment, the subject recognition efficiency can be improved by pre-training the image recognition model.

[0159] In this embodiment, when the adjusted brightness value corresponding to the main area does not reach the preset brightness threshold, the adjusted brightness value corresponding to the main area is increased and the adjusted brightness value of the background area is reduced, so as to obtain a second image, which can realize automatic brightness adjustment and improve the efficiency of image brightness adjustment.

[0160] For illustration, please refer to Figure 6 , which shows a schematic diagram of an image brightness analysis method provided by an exemplary embodiment of the present application, and takes the method applied in a game production scenario as an example for explanation, such as Figure 6 As shown, the method includes the following contents.

[0161] Step 610, obtaining a first image and a thermal map parameter table.

[0162] In game production, start the game scene in the game engine (game production program) and turn on the brightness check mode. For example, please refer to Figure 7 , which shows a schematic diagram of a hardware environment provided by an exemplary embodiment of the present application, such as Figure 7 As shown, the current display server 700 includes a central processing unit (CPU) 710 and a graphics processing unit (GPU) 720. The image brightness analysis method provided in the present application can be implemented in the central processing unit 710 or the graphics processing unit 720. The implementation in the graphics processing unit 720 is taken as an example for explanation. The current central processing unit 710 processes the application stage, including the game program development process, and the graphics processing unit 720 processes the geometry stage, the rasterization stage, and the post-processing stage. Among them, the geometry stage is mainly responsible for most polygon operations and vertex operations, including vertex shading, coordinate transformation, generation of primitives, projection, clipping, screen mapping and other processes. The rasterization stage is a stage of directly converting primitives into pixels to generate fragments. In the post-processing stage, it includes standard post-processing and heat map stages. In the last step (heat map stage) of the post-processing stage, the image brightness analysis method provided in the embodiment of the present application is executed, and finally the input image corresponding to the game scene screen is output.

[0163] Schematically, a game scene screen is obtained as a first image, and a pre-set generated heat map parameter table is obtained.

[0164] Step 620: extracting brightness value results corresponding to a plurality of pixel points in the first image.

[0165] In an illustrative manner, the RGB color channel values ​​corresponding to a plurality of pixel points in the first image are obtained, and the maximum value of the RGB color channel values ​​corresponding to the pixel points is determined by the above formula three as the brightness value result corresponding to the pixel point.

[0166] Step 630 , performing hierarchical quantization on the brightness values ​​corresponding to the plurality of pixel points to obtain quantized brightness values ​​corresponding to the plurality of pixel points.

[0167] Indicatively, after obtaining the brightness value results corresponding to the multiple pixel points, the multiple brightness value results are hierarchically quantized using the above formula 2, thereby obtaining the quantized brightness values ​​corresponding to the multiple pixel points.

[0168] Step 640, mapping the multiple quantized brightness values ​​to a heat map parameter table.

[0169] Through the above formula 1, multiple quantized brightness values ​​are mapped to the heat map parameter table, and the adjustment parameter colors corresponding to the multiple quantized brightness values ​​are output.

[0170] Step 650: output the heat map display result.

[0171] Illustratively, the graphics processor 720 outputs a heat map display result 730 according to the adjustment parameter colors corresponding to the plurality of pixel points.

[0172] For illustration, please refer to Figure 8 , which shows a schematic diagram of an image brightness analysis method provided by an exemplary embodiment of the present application, such as Figure 8 As shown, the first image 810 is obtained, and the brightness value result 812 corresponding to the target pixel 811 in the first image 810 is extracted as an example. After the initial pixel color corresponding to the target pixel 811 is obtained, the brightness value result 812 is obtained by using the maximum value formula, and the quantized brightness value 813 corresponding to the brightness value result 812 is obtained by using the rounding function and the brightness quantization quantity. The first reference brightness value 814 and the second reference brightness value 815 matching the quantized brightness value 813 are determined according to the heat map parameter table 830, and the adjusted pixel color 821 corresponding to the target pixel 811 is obtained according to the first reference pixel color corresponding to the first reference brightness value 814 and the second reference pixel color corresponding to the second reference brightness value 815. Finally, the heat map display result 820 corresponding to the first image 810 is determined according to the adjusted pixel color corresponding to each pixel. The heat map display result 820 is used to provide designers with a reference in the process of adjusting the image brightness, or the heat map display result 820 is used to automatically adjust the image brightness.

[0173] In summary, the image brightness analysis method provided by the embodiment of the present application, when obtaining the first image and the heat map parameter table, extracts the brightness value results corresponding to multiple pixels in the first image, thereby determining the reference brightness value matching the brightness value result from the multiple reference brightness values ​​in the heat map parameter table, and based on the reference pixels corresponding to the multiple reference brightness values, determines the adjustment pixel colors corresponding to the multiple pixels, thereby generating the heat map display result corresponding to the first image based on the adjustment pixel colors corresponding to the multiple pixels, which is used to display the distribution of the brightness values ​​of the pixels in the first image in the form of quantitative mapping. That is, by setting the heat map parameter table in which the number of reference brightness values ​​is less than the number of pixels in the first image, after obtaining the brightness value results corresponding to each pixel in the first image, the brightness value results corresponding to each pixel are quantitatively mapped through the heat map parameter table to obtain the adjustment pixel colors corresponding to each pixel, thereby highlighting the distribution of the brightness values ​​of the pixels in the generated heat map display result, simplifying the layout distribution of the brightness of the picture, making the light and dark distribution in the image more intuitive, and improving the accuracy and efficiency of the subsequent adjustment of the image brightness.

[0174] Based on the original game rendering screen, this application quantifies and maps, enhances the brightness of each area in the screen, highlights the distribution of screen brightness, makes the analysis of screen brightness simple and obvious, eliminates the uncertainty of human factors, and more intuitively displays the light and dark areas in the screen, and can show the relative area and position of light and dark, reflecting the screen brightness information more comprehensively. At the same time, due to the use of heat maps, the results are more obvious, eliminating the deviation caused by different visual sensitivity.

[0175] Fig. 9 is a structural block diagram of an image brightness analysis device provided by an exemplary embodiment of the present application, such as Fig. 9 As shown, the device comprises:

[0176] An acquisition module 910 is used to acquire a first image and a heat map parameter table, wherein the first image includes a plurality of pixels, and the heat map parameter table includes a plurality of reference brightness values ​​and reference pixel colors corresponding to the plurality of reference brightness values, respectively, wherein the number of the reference brightness values ​​is less than the number of the pixels;

[0177] An extraction module 920, configured to extract brightness value results corresponding to the plurality of pixel points, wherein the brightness value results are used to indicate the brightness or darkness of the pixel points in the first image;

[0178] A determination module 930 is used to determine a reference brightness value that matches the brightness value result from the multiple reference brightness values, and determine the adjustment pixel colors corresponding to the multiple pixel points respectively based on the reference pixel colors respectively corresponding to the multiple reference brightness values;

[0179] The generation module 940 is used to generate a heat map display result corresponding to the first image based on the adjusted pixel colors corresponding to the multiple pixel points respectively, and the heat map display result is used to display the distribution of pixel brightness values ​​in the first image in the form of quantitative mapping.

[0180] In some embodiments, Fig.10 As shown, the determination module 930 includes:

[0181] A matching unit 931 is used to match the brightness value result corresponding to the i-th pixel with the multiple reference brightness values ​​in the process of determining the adjusted pixel color corresponding to the i-th pixel, and determine a reference brightness value that matches the brightness value result corresponding to the i-th pixel, where i is a positive integer;

[0182] The determining unit 932 is configured to determine the adjusted pixel color corresponding to the i-th pixel point based on the reference brightness value, the adjusted pixel color corresponding to the reference brightness value, and the brightness value result.

[0183] In some embodiments, the matching unit 931 is further configured to match the brightness value result corresponding to the i-th pixel point with the multiple reference brightness values ​​to determine a first reference brightness value and a second reference brightness value corresponding to the brightness value result, the brightness value result is between the first reference brightness value and the second reference brightness value, the first reference brightness value corresponds to a first reference color, and the second brightness value corresponds to a second reference color;

[0184] The determination unit 932 is used to determine the adjusted pixel color corresponding to the i-th pixel point based on the first reference brightness value, the first reference pixel color, the second reference brightness value, the second reference pixel color and the interpolation relationship between the brightness value results.

[0185] In some embodiments, the acquisition module 910 is further used to acquire a brightness quantization quantity, where the brightness quantization quantity is used to indicate the quantity of the reference brightness values; determine the quantized brightness value corresponding to the i-th pixel point based on a rounding function and the brightness quantization quantity, where the rounding function is a function used to round the output result;

[0186] The determination module 930 is further used to determine the adjusted pixel color corresponding to the i-th pixel point based on the interpolation relationship between the first reference brightness value, the first reference pixel color, the second reference brightness value, the second reference pixel color and the quantized brightness value.

[0187] In some embodiments, the determination module 930 is also used to obtain the product result between the brightness value result corresponding to the i-th pixel point and the brightness quantization quantity; round the product result through the rounding function to obtain a rounding result; and determine the quantized brightness value corresponding to the i-th pixel point based on the rounding result and the brightness quantization quantity.

[0188] In some embodiments, the extraction module 920 is also used to obtain multiple color channel values ​​corresponding to the nth pixel point in the process of obtaining the brightness value result corresponding to the nth pixel point, where the color channel value refers to the numerical result corresponding to the pixel point on the color channel, and n is a positive integer; by performing brightness conversion on the multiple color channel values, the brightness value result corresponding to the nth pixel point is obtained.

[0189] In some embodiments, the generation module 940 is also used to obtain pixel positions of the multiple pixel points in the first image; and display the heat map display result corresponding to the first image based on the pixel positions and the adjusted pixel colors corresponding to the multiple pixel points.

[0190] In some embodiments, the heat map display result includes the adjusted brightness values ​​corresponding to the plurality of pixel points, respectively, and the adjusted brightness value is a brightness value result obtained by adjusting the pixel color;

[0191] The device also includes:

[0192] The determination module 930 is further configured to determine a subject area in the first image;

[0193] The adjustment module 950 is used to adjust the brightness value result of the pixel points in the main body area in response to the adjusted brightness value corresponding to the main body area meeting the brightness adjustment requirement to obtain a second image.

[0194] In some embodiments, the determination module 930 is also used to obtain an image recognition model, which is a neural network model pre-trained for subject recognition; the first image is input into the image recognition model for subject recognition, and the subject area in the first image is output.

[0195] In some embodiments, the first image also includes a background area;

[0196] The adjustment module 950 is used to increase the adjusted brightness value corresponding to the main area and reduce the adjusted brightness value corresponding to the background area in response to the adjusted brightness value corresponding to the main area not reaching a preset brightness threshold, so as to obtain the second image.

[0197] In summary, the image brightness analysis device provided by the embodiment of the present application, after obtaining the video text content and multiple video frames corresponding to the video content, extracts the text feature representation corresponding to the video text content, and extracts the video feature representations corresponding to the multiple video frames, respectively, and fuses the multiple video feature representations and text feature representations with the first feature to obtain the fused sub-feature representation, and then fuses the fused sub-feature representations corresponding to the multiple video feature representations again with the second feature, and finally obtains the fused feature representation corresponding to the video content, and finally classifies and predicts the video content according to the fused feature representation, so as to obtain the category corresponding to the video content. That is, by extracting the feature representations (text feature representations and video feature representations) corresponding to the video content in different modes, the text feature representation and the video feature representation corresponding to each video frame are multimodally fused (first feature fusion), so that the semantic information in each video frame can be better captured through the text content, so that the fused feature representation finally obtained is more in line with the video content, thereby improving the accuracy of the category prediction corresponding to the video content.

[0198] It should be noted that the image brightness analysis device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the image brightness analysis device provided in the above embodiment and the image brightness analysis method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0199] Fig.11 The following is a schematic diagram showing the structure of a server provided by an exemplary embodiment of the present application. Specifically:

[0200] The server 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory (RAM) 1102 and a read only memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The server 1100 also includes a mass storage device 1106 for storing an operating system 1113, application programs 1114, and other program modules 1115.

[0201] The mass storage device 1106 is connected to the central processing unit 1101 through a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1106 and its associated computer-readable media provide non-volatile storage for the server 1100. That is, the mass storage device 1106 may include a computer-readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0202] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1104 and mass storage device 1106 can be collectively referred to as memory.

[0203] According to various embodiments of the present application, the server 1100 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 1100 can be connected to the network 1112 through the network interface unit 1111 connected to the system bus 1105, or the network interface unit 1111 can be used to connect to other types of networks or remote computer systems (not shown).

[0204] The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.

[0205] An embodiment of the present application also provides a computer device, which includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the image brightness analysis method provided by the above-mentioned method embodiments.

[0206] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the image brightness analysis method provided by the above-mentioned method embodiments.

[0207] The embodiment of the present application also provides a computer program product, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the image brightness analysis method described in any of the above embodiments.

[0208] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0209] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0210] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for analyzing image brightness, characterized in that: The method comprises: Acquire a first image and a heat map parameter table, wherein the first image includes a plurality of pixel points, and the heat map parameter table includes a plurality of reference brightness values ​​and reference pixel colors respectively corresponding to the plurality of reference brightness values, wherein the number of the reference brightness values ​​is less than the number of the pixel points; Extracting brightness value results respectively corresponding to the plurality of pixel points, the brightness value results being used to indicate the brightness or darkness of the pixel points displayed in the first image; Determine a reference brightness value that matches the brightness value result among the multiple reference brightness values, and determine the adjustment pixel colors corresponding to the multiple pixel points respectively based on the reference pixel colors corresponding to the multiple reference brightness values ​​respectively; A heat map display result corresponding to the first image is generated based on the adjusted pixel colors respectively corresponding to the multiple pixel points, and the heat map display result is used to display the distribution of brightness values ​​of pixels in the first image in the form of quantitative mapping.

2. The method according to claim 1, characterized in that The step of determining a reference brightness value that matches the brightness value result from among the multiple reference brightness values, and determining the adjustment pixel colors corresponding to the multiple pixel points respectively based on the reference pixel colors corresponding to the multiple reference brightness values ​​respectively, comprises: In the process of determining the adjusted pixel color corresponding to the i-th pixel point, matching the brightness value result corresponding to the i-th pixel point with the multiple reference brightness values ​​to determine a reference brightness value that matches the brightness value result corresponding to the i-th pixel point, where i is a positive integer; The adjusted pixel color corresponding to the i-th pixel point is determined based on the reference brightness value, the adjusted pixel color corresponding to the reference brightness value, and the brightness value result.

3. The method according to claim 2, characterized in that The matching the brightness value result corresponding to the i-th pixel point with the multiple reference brightness values ​​to determine a reference brightness value that matches the brightness value result corresponding to the i-th pixel point includes: Matching the brightness value result corresponding to the i-th pixel point with the multiple reference brightness values, determining a first reference brightness value and a second reference brightness value corresponding to the brightness value result, wherein the brightness value result is between the first reference brightness value and the second reference brightness value, the first reference brightness value corresponds to a first reference color, and the second brightness value corresponds to a second reference color; The determining the adjusted pixel color corresponding to the i-th pixel point based on the reference brightness value, the adjusted pixel color corresponding to the reference brightness value, and the brightness value result includes: An adjusted pixel color corresponding to the i-th pixel point is determined based on an interpolation relationship among the first reference brightness value, the first reference pixel color, the second reference brightness value, the second reference pixel color, and the brightness value result.

4. The method according to claim 3, characterized in that Before determining the adjusted pixel color corresponding to the i-th pixel point based on the reference pixel color corresponding to the first reference brightness value, the reference pixel color corresponding to the second reference brightness value, and the brightness value result, the method further includes: Acquire a brightness quantization quantity, where the brightness quantization quantity is used to indicate the quantity of the reference brightness values; Determine the quantized brightness value corresponding to the i-th pixel point based on a rounding function and the brightness quantization quantity, wherein the rounding function is a function for performing rounding processing on an output result; The determining the adjusted pixel color corresponding to the i-th pixel point based on the interpolation relationship between the reference pixel color corresponding to the first reference brightness value, the reference pixel color corresponding to the second reference brightness value, and the brightness value result includes: An adjusted pixel color corresponding to the i-th pixel point is determined based on an interpolation relationship among the first reference brightness value, the first reference pixel color, the second reference brightness value, the second reference pixel color, and the quantized brightness value.

5. The method according to claim 4, characterized in that The determining the quantized brightness value corresponding to the i-th pixel point based on the rounding function and the brightness quantization quantity includes: Obtaining the product result between the brightness value result corresponding to the i-th pixel point and the brightness quantization quantity; The product result is rounded by the rounding function to obtain a rounding result; The quantized brightness value corresponding to the i-th pixel is determined based on the rounding result and the brightness quantization quantity.

6. The method according to any one of claims 1 to 5, characterized in that: The extracting the brightness value results corresponding to the plurality of pixel points respectively includes: In the process of obtaining the brightness value result corresponding to the n-th pixel point, a plurality of color channel values ​​corresponding to the n-th pixel point are obtained, where the color channel value refers to the numerical result corresponding to the pixel point on the color channel, and n is a positive integer; By performing brightness conversion on the multiple color channel values, a brightness value result corresponding to the n-th pixel point is obtained.

7. The method according to any one of claims 1 to 5, characterized in that: The generating a heat map display result corresponding to the first image based on adjusting pixel colors corresponding to the plurality of pixel points respectively includes: Obtaining pixel positions of the plurality of pixels in the first image; The heat map display result corresponding to the first image is displayed based on the pixel position and the adjusted pixel colors respectively corresponding to the multiple pixel points.

8. The method according to any one of claims 1 to 5, characterized in that: The heat map display result includes the adjusted brightness values ​​corresponding to the plurality of pixel points respectively, and the adjusted brightness value is the brightness value result obtained by adjusting the pixel color; After the heat map display result corresponding to the first image is generated based on the adjusted pixel colors corresponding to the plurality of pixel points, the method further includes: determining a subject area in the first image; In response to the adjusted brightness value corresponding to the main body area meeting the brightness adjustment requirement, the brightness value result of the pixel point in the main body area is adjusted to obtain a second image.

9. The method according to claim 6, characterized in that The determining the subject area in the first image includes: Acquire an image recognition model, wherein the image recognition model is a neural network model pre-trained for subject recognition; The first image is input into the image recognition model for subject recognition, and the subject area in the first image is obtained as output.

10. The method according to claim 8, characterized in that The first image also includes a background area; In response to the adjusted brightness value corresponding to the main body area not meeting the preset brightness requirement, adjusting the brightness value result of the pixel point in the main body area to obtain the second image includes: In response to the adjusted brightness value corresponding to the main body area not reaching the preset brightness threshold, the adjusted brightness value corresponding to the main body area is increased, and the adjusted brightness value corresponding to the background area is decreased to obtain the second image.

11. An image brightness analysis device, characterized in that: The device comprises: An acquisition module, configured to acquire a first image and a thermal map parameter table, wherein the first image includes a plurality of pixels, and the thermal map parameter table includes a plurality of reference brightness values ​​and reference pixel colors corresponding to the plurality of reference brightness values, respectively, wherein the number of the reference brightness values ​​is less than the number of the pixels; An extraction module, used for extracting brightness value results respectively corresponding to the plurality of pixel points, wherein the brightness value results are used for indicating the brightness or darkness of the pixel points displayed in the first image; a determination module, configured to determine a reference brightness value matching the brightness value result from among the plurality of reference brightness values, and determine adjustment pixel colors corresponding to the plurality of pixel points respectively based on reference pixel colors corresponding to the plurality of reference brightness values ​​respectively; A generation module is used to generate a heat map display result corresponding to the first image based on the adjusted pixel colors corresponding to the multiple pixel points respectively, and the heat map display result is used to display the distribution of pixel brightness values ​​in the first image in the form of quantitative mapping.

12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the image brightness analysis method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the image brightness analysis method according to any one of claims 1 to 10.

14. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the image brightness analysis method according to any one of claims 1 to 10.