CN111050162B - Color temperature test method, device, equipment and computer readable storage medium - Google Patents
Color temperature test method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111050162B CN111050162B CN201911401697.2A CN201911401697A CN111050162B CN 111050162 B CN111050162 B CN 111050162B CN 201911401697 A CN201911401697 A CN 201911401697A CN 111050162 B CN111050162 B CN 111050162B
- Authority
- CN
- China
- Prior art keywords
- value
- color temperature
- target
- rgb value
- rgb
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/02—Diagnosis, testing or measuring for television systems or their details for colour television signals
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Processing Of Color Television Signals (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
The invention discloses a color temperature test method, a device, equipment and a computer readable storage medium, wherein the color temperature test method comprises the following steps: acquiring a color temperature mode of a television, and acquiring an image corresponding to the color temperature mode to acquire a target image; calculating a target average RGB value of the target image; determining a test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value; wherein the RGB values include R values, G values, and B values. The invention solves the technical problem of how to improve the accuracy of the color temperature test.
Description
Technical Field
The present invention relates to the field of color temperature testing technologies, and in particular, to a color temperature testing method, apparatus, device, and computer readable storage medium.
Background
Color temperature is a measure of the color of a light source, which is called the color temperature of the black body when the radiation of the light source is identical in the visible range and in the absolute black body, and has the unit K (kelvin).
The color temperature of a television represents the color of the image displayed by the television. The aim of the television manufacturer to debug the color temperature is to restore the color of the original image as much as possible, and the color temperature is different under different brightness: under the irradiation of a high-color-temperature light source, if the brightness is not high, people can be in a cold atmosphere; under the irradiation of the low color temperature light source, the brightness is too high, and a feeling of sultriness is given to people.
When a video playing terminal such as a television on a target market plays a video program, the color temperature of the video program affects the watching comfort of a user, and the color temperatures corresponding to the color styles of different types of television programs are different, so that the television has three options of normal, cool and warm color temperature adjustment. However, the difference of visual observation of the user is small, so that a tester needs to subjectively observe the image by using a specific image, and the phenomena of inaccuracy and inconvenience exist. Therefore, how to improve the accuracy of the color temperature test becomes a technical problem to be solved urgently at present.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a color temperature testing method, a color temperature testing device, color temperature testing equipment and a computer storage medium, and aims to solve the technical problem of improving the accuracy of color temperature testing.
In order to achieve the above object, the present invention provides a color temperature testing method, wherein the display control method comprises:
acquiring a color temperature mode of a television, and acquiring an image corresponding to the color temperature mode to acquire a target image;
Calculating a target average RGB value of the target image;
determining a test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value; wherein the RGB values include R values, G values, and B values.
Optionally, the step of calculating a target average RGB value of the target image includes:
acquiring RGB values of all pixel points in the target image;
and if a target RGB value larger than a preset value exists in each RGB value, calculating a target average RGB value of the target image based on the target RGB value.
Optionally, the step of calculating a target average RGB value of the target image based on the target RGB value includes:
determining whether the target RGB value exists in plurality;
and if a plurality of target RGB values exist, calculating each target RGB value according to a preset average value algorithm to obtain the target average RGB value of the target image.
Optionally, the color temperature mode comprises a first mode; the standard RGB values include: a standard average RGB value and a first preset RGB value;
wherein, the step of determining the test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value comprises:
Calculating a first difference of the R-value in the target average RGB value and the R-value in the standard average RGB value;
calculating a first absolute difference value of the first difference value and an R value in the first preset RGB value;
and determining a test result of the color temperature mode according to the first absolute difference value and the error threshold value.
Optionally, the step of determining the test result of the color temperature mode according to the first absolute difference value and the error threshold includes:
judging whether the first absolute difference value is smaller than or equal to the error threshold value;
and if so, determining that the test result of the color temperature mode is qualified.
Optionally, the color temperature mode comprises a second mode; the standard RGB values include: a standard average RGB value and a second preset RGB value;
wherein, the step of determining the test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value comprises:
calculating a second difference between the B value in the target average RGB value and the B value in the standard average RGB value;
calculating a second absolute difference value between the second difference value and a B value in the second preset RGB value;
and determining the test result of the color temperature mode according to the second absolute difference value and the error threshold value.
Optionally, the step of determining the test result of the color temperature mode according to the second absolute difference value and the error threshold includes:
judging whether the second absolute difference value is less than or equal to the error threshold value;
and if so, determining that the test result of the color temperature mode is qualified.
In addition, to achieve the above object, the present invention also provides a color temperature testing apparatus, including:
the acquisition module is used for acquiring a color temperature mode of the television and acquiring an image corresponding to the color temperature mode to acquire a target image;
the calculation module is used for calculating a target average RGB value of the target image;
the determining module is used for determining a test result of the color temperature mode according to the target average RGB value, the standard average RGB value and the error threshold value; wherein the RGB values include R values, G values, and B values.
In addition, in order to achieve the above object, the present invention also provides a color temperature testing apparatus;
the color temperature test apparatus includes: a memory, a processor and a color temperature test program stored on the memory and executable on the processor, the color temperature test program when executed by the processor implementing the steps of the color temperature test method as described above.
In addition, to achieve the above object, the present invention also provides a computer storage medium;
the computer storage medium has a color temperature test program stored thereon, which when executed by a processor implements the steps of the color temperature test method as described above.
The embodiment of the invention provides a color temperature testing method, a color temperature testing device, color temperature testing equipment and a computer readable storage medium, wherein a target image is obtained by obtaining a color temperature mode of a television and carrying out image acquisition on an image corresponding to the color temperature mode; calculating a target average RGB value of the target image, and determining a test result of the color temperature mode according to the target average RGB value, a standard RGB value and an error threshold, wherein the RGB value comprises an R value, a G value and a B value. The method comprises the steps of obtaining an image picture corresponding to a color temperature mode of the television, adjusting the image picture according to the color temperature mode, collecting the image to obtain a target image, and determining a test result of the color temperature mode according to a target average RGB value of the target image. Therefore, the phenomenon that the detection of the color temperature effect of the color temperature mode is inaccurate due to the fact that specific images are required to be manually observed in the prior art is avoided, image acquisition is carried out on any image, manual interference is not required, manpower resources are saved, the image acquisition is not restricted by a tested image, and the accuracy of color temperature testing is improved.
Drawings
FIG. 1 is a schematic structural diagram of a color temperature testing apparatus for a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a color temperature testing method according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus module of the color temperature testing apparatus according to the present invention;
FIG. 4 is a flow chart of a color temperature testing method according to the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The color temperature testing equipment comprises video terminal equipment such as a television and the like.
As shown in fig. 1, the color temperature test apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the color temperature testing device may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or the backlight when the terminal device is moved to the ear. Of course, the color temperature testing device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and so on, which are not described herein again.
It will be understood by those skilled in the art that the color temperature test device configuration shown in fig. 1 does not constitute a limitation of the color temperature test device and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a color temperature test program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the color temperature test program stored in the memory 1005 and perform the following operations:
Acquiring a color temperature mode of a television, and acquiring an image corresponding to the color temperature mode to acquire a target image;
calculating a target average RGB value of the target image;
determining a test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value; wherein the RGB values include R values, G values, and B values. It should be noted that the standard RGB values and the error threshold values may be preset independently in advance.
The invention provides a color temperature test method, in one embodiment of the color temperature test method, the color temperature test method comprises the following steps:
step S10, acquiring a color temperature mode of the television, and acquiring an image corresponding to the color temperature mode to acquire a target image;
in the present embodiment, the color temperature testing method is mainly applied to a video playing terminal such as a television, and in the present embodiment, only the television is taken as an example for illustration, but the present embodiment is not limited to the television. And in this embodiment the television needs to have a function of adjusting the color temperature, namely three options of normal, cool and warm, respectively.
In this embodiment, the television acquires an input signal sent by any video signal generator, and displays a corresponding image according to the input signal when the input signal is acquired and contains white pixels, for example, when the input signal is an XX series, the television displays an image corresponding to the XX series. In a popular sense, the television is started to display normal image pictures. Wherein, the pixel is composed of small squares of the image, the small squares have a definite position and assigned color value, and the color and the position of the small squares determine the appearance of the image.
After the image picture is displayed by the television, a corresponding color temperature mode can be set in a television setting menu by sending a remote control code through the script, namely the color temperature mode is determined through the test script which is set in advance, and when the television receives the color temperature mode input by the test script, the color temperature of the image picture can be adjusted according to the color temperature mode. Note that, in the present embodiment, the color temperature mode includes at least a rom mode, a cool mode, and a normal mode. And the effect of image picture display is different in different color temperature modes.
And the video acquisition card is used for carrying out image acquisition on the adjusted image picture (namely the image corresponding to the color temperature mode) so as to obtain a target image. The video capture card is also called a video card, and is used for inputting video data or mixed data of video and audio output by analog cameras, video recorders, LD video disk players and televisions and the like into a computer, converting the video data or mixed data into digital data which can be distinguished by the computer, storing the digital data in the computer and converting the digital data into a video data file which can be edited and processed. The video acquisition card can be classified into a broadcast-grade video acquisition card, a professional-grade video acquisition card and a civil-grade video acquisition card according to the purposes.
Step S20, calculating a target average RGB value of the target image;
after the target image is acquired, the target image can be analyzed according to the realization principles of different color temperatures (for example, if the warm is reddish white to show a warm effect, and the cool is blue white to show a cooling effect). RGB may be R (Red ), G (Green ) and B (Blue ).
Traversing and inquiring RGB values of all pixel points in the target image, and judging whether the pixel points are similar white pixel points according to the RGB values, namely judging whether each RGB value is larger than a preset value (such as 220) in sequence, if the RGB value is larger than the preset value, taking the pixel points corresponding to the RGB values as the similar white pixel points. And adding the RGB values of the coordinates corresponding to all the white-like pixel points in the target image into a preset list of the television, such as list-normal, list-cool or list-arm. And calculating all RGB values in the list to obtain the target average RGB value of the target image. For example, when the color temperature mode set in the television setting menu by the script sending remote control codes is normal, and after a target image is collected by a video capture card, the RGB values of all pixel points are searched in a traversing manner, and when the pixel points are judged to be white-like (RGB is greater than 220), the RGB values of corresponding coordinates are added into a list-normal. Calculating all RGB values in the list-normal, namely calculating all R values in the list-normal to obtain an average R value; calculating all B values in the list-normal to obtain an average B value; all G values in the list-normal are calculated to get the average G value. And the average R value, the average B value, and the average G value are taken as target average RGB values. It should be noted that, in this embodiment, when the color temperature mode is cool or warm, the same method is also used to calculate the average RGB values of all the white-like pixels in the picture.
Step S30, determining a test result of the color temperature mode according to the target average RGB value, the standard RGB value, and an error threshold, wherein the RGB value includes an R value, a G value, and a B value.
In the present embodiment, the RGB values include an R value, a G value, and a B value. The standard RGB values may be preset, and may include: a standard average RGB value (set in advance by the user in normal mode), and a first preset RGB value (corresponding to the arm mode). Alternatively, the standard RGB values may include: a standard average RGB value (set in advance by the user in normal mode), and a second preset RGB value (corresponding to cool mode). Therefore, after the target average RGB value is calculated, the color temperature effect of the color temperature mode can be determined according to the realization principle of different color temperatures and the target average RGB value. Namely warm mode (reddish white), cool mode (bluish white) and normal average RGB values of normal mode are compared; and according to the design of the arm mode, the R value of the partial red is the R value (for example, X) in the first preset RGB value, the B value of the partial blue is the B value (for example, Y) in the second preset RGB value, and the error threshold value W. And when the color temperature mode is a rom mode, calculating the difference between the R value (R _ WARM) in the target average RGB value and the R value (R _ NORMAL) in the standard average RGB value of the white-like pixel point in a NORMAL mode. And calculates the absolute value of the difference between this difference and the X value. Namely, the absolute value of R _ WARM-R _ NORMAL-X is calculated. And then judging whether the absolute value is less than or equal to the W value, if so, judging that the setting effect of the rom mode is correct, namely when the color temperature mode is the rom mode, the test result is qualified. If not, judging that the setting effect of the rom mode fails, namely when the color temperature mode is the rom mode, the test result is unqualified. And when the color temperature mode is the COOL mode, calculating the difference between the B value (B _ COOL) in the target average RGB value and the B value (B _ NORMAL) in the standard average RGB value of the white-like pixel point in the NORMAL mode. And calculates the absolute value of the difference between this difference and the Y value. I.e. the absolute value of B _ COOL-B _ NORMAL-Y is calculated. And then judging whether the absolute value is less than or equal to the W value, if so, judging that the cool mode setting effect is correct, namely, when the color temperature mode is the cool mode, the test result is qualified.
In addition, to assist understanding of the principle of the color temperature mode test method in the present embodiment, the following description will be made by way of example.
For example, as shown in fig. 4, when a television starts to perform a color temperature test, a signal (including a white pixel) may be input to the television through any video signal generator, and then a color temperature mode is set for the television, for example, when a script sends a remote control code to set the color temperature mode to a warm mode in a television setting menu, a picture is collected through a video capture card, RGB values of all pixel points are searched in a traversal manner, and when it is determined that a white-like pixel point (RGB is greater than 220), the RGB value of a corresponding coordinate is added to a list, for example, list-arm. And calculating all RGB values in the list to obtain an average R value, a G value and a B value. Or when the color temperature mode is set to be the normal mode in the television setting menu by sending the remote control codes through the script, acquiring the picture through the video acquisition card, searching the RGB values of all the pixel points in a traversing way, and adding the RGB values of the corresponding coordinates into a list if the pixel points are judged to be white-like (RGB is more than 220), such as list-normal. And calculating all RGB values in the list to obtain an average R value, a G value and a B value. Or when the color temperature mode is set to be the cooling mode in the television setting menu by sending remote control codes through the script, acquiring pictures through a video acquisition card, searching RGB values of all pixel points in a traversing manner, and adding the RGB values of corresponding coordinates into a list if the pixel points are judged to be white-like (RGB is more than 220), such as list-cool. And calculating all RGB values in the list to obtain an average R value, a G value and a B value. Then according to the realization principle of different color temperatures, the warm mode is warm (reddish white), the cool mode is cool (bluish white), the contrast is carried out with the normal mode, and according to the design of the warm mode, the R value of reddish is X, the B value of cool is Y, and the error threshold value is W. Then calculating the absolute value of R _ WARM-R _ NORMAL-X, and determining whether the absolute value is less than or equal to an error threshold value, if so, determining that the WARM mode setting effect is correct; if not, it is determined that the warm mode setting effect is incorrect. Calculating the absolute value of B _ COOL-B _ NORMAL-Y, judging whether the absolute value is less than or equal to the value W, and if so, determining that the COOL mode setting effect is correct; if not, determining that the cool and refreshing mode setting effect is wrong. Until the color temperature effect test is finished.
The method comprises the steps of acquiring a color temperature mode of a television, and carrying out image acquisition on an image corresponding to the color temperature mode to acquire a target image; calculating a target average RGB value of the target image, and determining a test result of the color temperature mode according to the target average RGB value, a standard RGB value and an error threshold, wherein the RGB value comprises an R value, a G value and a B value. The method comprises the steps of obtaining a target image corresponding to a color temperature mode of the television, and determining a test result of the color temperature mode according to a target average RGB value of the target image. Therefore, the phenomenon that the detection of the color temperature effect of the color temperature mode is inaccurate due to the fact that specific images are required to be manually observed in the prior art is avoided, image acquisition is carried out on any image, manual interference is not required, manpower resources are saved, the image acquisition is not restricted by a tested image, and the accuracy of color temperature testing is improved.
Further, on the basis of the first embodiment of the present invention, a second embodiment of the color temperature testing method of the present invention is further provided, where this embodiment is step S30 of the first embodiment of the present invention, and the refinement of the step of calculating the target average RGB value of the target image includes:
Step a, acquiring RGB values of all pixel points in the target image;
in this embodiment, it is further required to obtain RGB values of all pixel points in the target image, and sequentially detect whether each RGB value is greater than a predetermined value (e.g., 220), that is, it is required to detect whether all R values are greater than the predetermined value, all G values are greater than the predetermined value, and all B values are greater than the predetermined value, and execute different operations according to different detection results.
And b, if a target RGB value larger than a preset value exists in each RGB value, calculating a target average RGB value of the target image based on the target RGB value.
When the target RGB values are found to be larger than the preset value through judgment, namely the R value in the target RGB values is larger than the preset value, the G value is larger than the preset value, and the B value is also larger than the preset value. The calculation of each target RGB value is required to obtain its average value, i.e. the target average RGB value of the target image.
In the embodiment, the target RGB value which is larger than the preset value in the target image is obtained, and the target average RGB value of the target image is calculated according to the target RGB value, so that a data basis is provided for the subsequent detection of the color temperature effect.
Specifically, the step of calculating the target average RGB value of the target image based on the target RGB value includes:
step c, determining whether a plurality of target RGB values exist;
when the target RGB values are acquired, it is also necessary to determine whether there are a plurality of target RGB values acquired in the target image, and if there are no plurality of target RGB values, the target RGB values are directly used as the average RGB values.
And d, if a plurality of target RGB values exist, calculating each target RGB value according to a preset average value algorithm to obtain the target average RGB value of the target image.
When a plurality of target RGB values are found through judgment, each target RGB value can be calculated according to a preset average value algorithm to obtain a target average RGB value of the target image.
In this embodiment, when a plurality of target RGB values are determined, the target average RGB value is directly calculated according to a preset average algorithm, so that the accuracy of the obtained target average RGB value is ensured.
Further, on the basis of any one of the first to second embodiments of the present invention, there is further provided a third embodiment of the color temperature test method of the present invention, where the third embodiment is the step S30 of the first embodiment of the present invention, and the refinement of the step of determining the test result of the color temperature pattern according to the target average RGB value, the standard average RGB value and the error threshold value includes:
Step e, calculating a first difference value of the R value in the target average RGB value and the R value in the standard average RGB value;
in the present embodiment, the color temperature mode includes a first mode, and the first mode may be a rom mode. The standard RGB values include a standard average RGB value (i.e., a standard average RGB value corresponding to the normal mode) and a first preset RGB value (i.e., a first preset RGB value corresponding to the first mode).
Before detecting the color temperature effect of the current color temperature mode, a standard average RGB value (which may be preset) in the television needs to be obtained, that is, the standard average RGB value of the target image when the color temperature mode is normal, where the standard average RGB value is also obtained by obtaining RGB values corresponding to white-like pixels in the target image in normal mode in the same manner as described above, and calculating an average value of the RGB values to obtain the standard average RGB value. After the standard average RGB value is obtained, a difference value between the R value in the target average RGB value and the R value in the standard average RGB value, that is, a first difference value, needs to be calculated.
Step f, calculating a first absolute difference value of the first difference value and the R value in the first preset RGB value;
and g, determining a test result of the color temperature mode according to the first absolute difference value and an error threshold.
In this embodiment, after the first difference is obtained through calculation, the R value in the first preset RGB value in the rom mode, that is, X, needs to be determined according to that the R value when the rom mode in the tv is designed to be reddish is X. And calculating a difference value between the first difference value and the R value in the first preset RGB value, taking an absolute value of the difference value as a first absolute difference value, and determining a test result of the color temperature mode according to whether the first absolute difference value and the error threshold value meet certain conditions.
In this embodiment, when the color temperature mode is determined as the first mode, a first difference between an R value in the target average RGB value and an R value in the standard average RGB value is calculated, a first absolute difference between the first difference and an R value in the first preset RGB value is calculated, and then the test result of the color temperature mode is determined according to the first absolute difference, so that the accuracy of the test result of the color temperature mode is improved.
Specifically, the step of determining the test result of the color temperature mode according to the first absolute difference value and the error threshold includes:
step h, judging whether the first absolute difference value is less than or equal to the error threshold value;
in this embodiment, it is further required to obtain an error threshold W (where the error threshold W may be an arbitrary value set by a user in advance), and determine whether the first absolute difference is smaller than or equal to the error threshold W, and if so, determine that the color temperature effect of the current color temperature mode is not good. And if the color temperature is smaller than or equal to the preset color temperature, the color temperature effect of the current color temperature mode is qualified.
And k, if so, determining that the test result of the color temperature mode is qualified.
When the first absolute difference value is found to be smaller than or equal to the error threshold value W through judgment, the test result is qualified when the current color temperature mode is the warm mode.
In this embodiment, when it is determined that the first absolute difference is smaller than or equal to the error threshold, the test result of the color temperature mode is determined to be qualified, so that the accuracy of the test result of the color temperature mode is improved.
Further, the step of determining the test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold includes:
step m, calculating a second difference value of the B value in the target average RGB value and the B value in the standard average RGB value;
in this embodiment, the color temperature mode includes a second mode, and the second mode may be a cool mode. The standard RGB values include a standard average RGB value (i.e., a standard average RGB value corresponding to the normal mode) and a second preset RGB value (i.e., a second preset RGB value corresponding to the second mode).
In this embodiment, before detecting the color temperature effect of the current color temperature mode, a standard average RGB value needs to be obtained, where the standard average RGB value may be obtained by obtaining RGB values corresponding to white-like pixels in a target image in a normal mode in the same manner as described above, and calculating an average value of the RGB values to obtain the standard average RGB value. After the standard average RGB value is obtained, a difference between the B value in the target average RGB value and the B value in the standard average RGB value, that is, a second difference, needs to be calculated.
N, calculating a second absolute difference value of the second difference value and a B value in the second preset RGB value;
and k, determining a test result of the color temperature mode according to the second absolute difference value and an error threshold.
In this embodiment, it is further required to determine the B value in the second preset RGB value in the cool mode, that is, Y, according to the fact that the B value when the cool mode is designed to be blue is Y. And calculating the difference between the second difference and the B value in the second preset RGB value, taking the absolute value of the difference as a second absolute difference, and determining the test result of the color temperature mode according to whether the second absolute difference and the error threshold meet certain conditions.
In this embodiment, when the color temperature mode is determined to be the second mode, a second difference between the B value in the target average RGB value and the B value in the standard average RGB value is calculated, a second absolute difference between the second difference and the B value in the second preset RGB value is calculated, and then the test result of the color temperature mode is determined according to the second absolute difference, so that the accuracy of the test result of the color temperature mode is improved.
Specifically, the step of determining the test result of the color temperature mode according to the second absolute difference and the error threshold includes:
Step g, judging whether the second absolute difference value is less than or equal to the error threshold value;
in this embodiment, it is further required to obtain an error threshold W (where the error threshold W may be an arbitrary value set by a user in advance), and determine whether the second absolute difference is smaller than or equal to the error threshold W, and if so, determine that the color temperature effect of the current color temperature mode is not good. And if the color temperature is smaller than or equal to the preset color temperature, the color temperature effect of the current color temperature mode is qualified.
And h, if so, determining that the test result of the color temperature mode is qualified.
When the second absolute difference is found to be less than or equal to the error threshold W through judgment, it can be considered that the test result is qualified when the current color temperature mode is the cool mode.
In this embodiment, when it is determined that the second absolute difference is smaller than or equal to the error threshold, the test result of the color temperature mode is determined to be qualified, so that the accuracy of the test result of the color temperature mode is improved.
In addition, referring to fig. 3, an embodiment of the present invention further provides a color temperature testing apparatus, where the color temperature testing apparatus includes:
the acquisition module A10 is used for acquiring a color temperature mode of a television and acquiring an image corresponding to the color temperature mode to acquire a target image;
A calculating module A20, for calculating a target average RGB value of the target image;
the determining module A30 is used for determining the test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value; wherein the RGB values include R values, G values, and B values.
Optionally, the calculating module a20 is configured to:
acquiring RGB values of all pixel points in the target image;
and if a target RGB value larger than a preset value exists in each RGB value, calculating a target average RGB value of the target image based on the target RGB value.
Optionally, the calculating module a20 is configured to:
determining whether the target RGB value exists in plurality;
and if a plurality of target RGB values exist, calculating each target RGB value according to a preset average value algorithm to obtain the target average RGB value of the target image.
Optionally, the color temperature mode comprises a first mode; the standard RGB values comprise a standard average RGB value and a first preset RGB value; the determining module a30 is further configured to:
calculating a first difference of the R-value in the target average RGB value and the R-value in the standard average RGB value;
calculating a first absolute difference value of the first difference value and an R value in the first preset RGB value;
And determining a test result of the color temperature mode according to the first absolute difference value and the error threshold value.
Optionally, the determining module a30 is further configured to:
judging whether the first absolute difference value is smaller than or equal to the error threshold value;
and if so, determining that the test result of the color temperature mode is qualified.
Optionally, the color temperature mode comprises a second mode; the standard RGB values include: a standard average RGB value and a second preset RGB value; the determining module a30 is further configured to:
calculating a second difference between the B value in the target average RGB value and the B value in the standard average RGB value;
calculating a second absolute difference value between the second difference value and a B value in the second preset RGB value;
and determining the test result of the color temperature mode according to the second absolute difference value and the error threshold value.
Optionally, the determining module a30 is further configured to:
judging whether the second absolute difference value is smaller than or equal to the error threshold value;
and if so, determining that the test result of the color temperature mode is qualified.
The steps implemented by the functional modules of the color temperature testing apparatus can refer to the embodiments of the color temperature testing method of the present invention, and are not described herein again.
The present invention also provides a color temperature test apparatus, including: a memory, a processor, a communication bus, and a color temperature test program stored on the memory:
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the color temperature test program to realize the steps of the color temperature test method in each embodiment.
The present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being further executable by one or more processors for implementing the steps of the above-described color temperature test embodiments.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the color temperature testing method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A color temperature test method, characterized in that the color temperature test method comprises the steps of:
acquiring a color temperature mode of a television, and acquiring an image corresponding to the color temperature mode to acquire a target image;
calculating a target average RGB value of the target image, wherein calculating the target average RGB value of the target image comprises: traversing and inquiring RGB values of all pixel points in the target image, if a target RGB value larger than a preset value exists in each RGB value, taking the pixel point corresponding to the target RGB value as a white-like pixel point, storing the target RGB values corresponding to all the white-like pixel points into a preset list, and if only one target RGB value exists in the preset list, taking the target RGB value in the preset list as a target average RGB value;
determining a test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value;
wherein the RGB values include R values, G values, and B values.
2. The color temperature test method of claim 1, wherein the step of calculating the target average RGB value of the target image comprises:
acquiring RGB values of all pixel points in the target image;
And if a target RGB value larger than a preset value exists in each RGB value, calculating a target average RGB value of the target image based on the target RGB value.
3. The color temperature test method of claim 2, wherein the step of calculating a target average RGB value for the target image based on the target RGB value comprises:
determining whether the target RGB value exists in plurality;
and if a plurality of target RGB values exist, calculating each target RGB value according to a preset average value algorithm to obtain the target average RGB value of the target image.
4. The color temperature test method of claim 3, wherein the color temperature mode comprises a first mode; the standard RGB values include: a standard average RGB value and a first preset RGB value;
wherein, the step of determining the test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value comprises:
calculating a first difference of the R-value in the target average RGB value and the R-value in the standard average RGB value;
calculating a first absolute difference value of the first difference value and an R value in the first preset RGB value;
and determining a test result of the color temperature mode according to the first absolute difference value and the error threshold value.
5. The color temperature test method of claim 4, wherein the step of determining the test result of the color temperature pattern based on the first absolute difference value and the error threshold comprises:
judging whether the first absolute difference value is smaller than or equal to the error threshold value;
and if so, determining that the test result of the color temperature mode is qualified.
6. The color temperature test method of claim 3, wherein the color temperature mode comprises a second mode; the standard RGB values include: a standard average RGB value and a second preset RGB value;
wherein, the step of determining the test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value comprises:
calculating a second difference between the B value in the target average RGB value and the B value in the standard average RGB value;
calculating a second absolute difference value between the second difference value and a B value in the second preset RGB value;
and determining the test result of the color temperature mode according to the second absolute difference value and the error threshold value.
7. The color temperature test method of claim 6, wherein the step of determining the test result of the color temperature pattern based on the second absolute difference value and the error threshold comprises:
Judging whether the second absolute difference value is less than or equal to the error threshold value;
and if so, determining that the test result of the color temperature mode is qualified.
8. A color temperature test apparatus, characterized in that the color temperature test apparatus comprises:
the acquisition module is used for acquiring a color temperature mode of the television and acquiring an image corresponding to the color temperature mode to acquire a target image;
a calculating module, configured to calculate a target average RGB value of the target image, wherein the calculating the target average RGB value of the target image includes: traversing and inquiring RGB values of all pixel points in the target image, if a target RGB value larger than a preset value exists in each RGB value, taking the pixel point corresponding to the target RGB value as a white-like pixel point, storing the target RGB values corresponding to all the white-like pixel points into a preset list, and if only one target RGB value exists in the preset list, taking the target RGB value in the preset list as a target average RGB value;
the determining module is used for determining a test result of the color temperature mode according to the target average RGB value, the standard RGB value and the error threshold value; wherein the RGB values include R values, G values, and B values.
9. A color temperature test apparatus, characterized in that the color temperature test apparatus comprises: memory, processor and a color temperature test program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the color temperature test method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a color temperature test program which, when executed by a processor, implements the steps of the color temperature test method of any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911401697.2A CN111050162B (en) | 2019-12-27 | 2019-12-27 | Color temperature test method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911401697.2A CN111050162B (en) | 2019-12-27 | 2019-12-27 | Color temperature test method, device, equipment and computer readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111050162A CN111050162A (en) | 2020-04-21 |
| CN111050162B true CN111050162B (en) | 2022-07-29 |
Family
ID=70242441
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911401697.2A Active CN111050162B (en) | 2019-12-27 | 2019-12-27 | Color temperature test method, device, equipment and computer readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111050162B (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101340596A (en) * | 2007-07-04 | 2009-01-07 | 深圳Tcl新技术有限公司 | Device and system for adjusting white balance |
| CN104683778A (en) * | 2015-02-10 | 2015-06-03 | 四川长虹电器股份有限公司 | Automatic white balance online regulation system and method for flat-panel display product |
| CN104767984A (en) * | 2015-03-25 | 2015-07-08 | 广东欧珀移动通信有限公司 | Method and terminal for adjusting color temperature of flash light |
| CN107529051A (en) * | 2017-07-31 | 2017-12-29 | 努比亚技术有限公司 | Method, equipment and the computer for adjusting color temp can storage mediums |
| CN110430409A (en) * | 2019-06-25 | 2019-11-08 | 深圳康佳电子科技有限公司 | A kind of automatic adjustment method of LCD TV white balance and system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108234971B (en) * | 2018-02-09 | 2019-11-05 | 上海小蚁科技有限公司 | White balance parameter determines method, white balance adjustment method and device, storage medium, terminal |
-
2019
- 2019-12-27 CN CN201911401697.2A patent/CN111050162B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101340596A (en) * | 2007-07-04 | 2009-01-07 | 深圳Tcl新技术有限公司 | Device and system for adjusting white balance |
| CN104683778A (en) * | 2015-02-10 | 2015-06-03 | 四川长虹电器股份有限公司 | Automatic white balance online regulation system and method for flat-panel display product |
| CN104767984A (en) * | 2015-03-25 | 2015-07-08 | 广东欧珀移动通信有限公司 | Method and terminal for adjusting color temperature of flash light |
| CN107529051A (en) * | 2017-07-31 | 2017-12-29 | 努比亚技术有限公司 | Method, equipment and the computer for adjusting color temp can storage mediums |
| CN110430409A (en) * | 2019-06-25 | 2019-11-08 | 深圳康佳电子科技有限公司 | A kind of automatic adjustment method of LCD TV white balance and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111050162A (en) | 2020-04-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108091288B (en) | Test method, terminal and computer-readable storage medium for uniformity of display screen | |
| US8471924B2 (en) | Information processing apparatus for remote operation of an imaging apparatus and control method therefor | |
| US9826208B2 (en) | Method and system for generating weights for use in white balancing an image | |
| US9756222B2 (en) | Method and system for performing white balancing operations on captured images | |
| US20160295189A1 (en) | Image processing device, imaging device, image processing method, program, and recording medium | |
| CN105389809B (en) | Display performance testing method, system and device | |
| CN110572642A (en) | Automatic testing method of display device, display device and storage medium | |
| CN111160267B (en) | Image processing method, terminal and storage medium | |
| CN112333502B (en) | Smart TV display method, smart TV and computer readable storage medium | |
| CN104270579A (en) | Terminal application interface pixel adjusting method and terminal | |
| CN109104608B (en) | TV performance testing method, device and computer readable storage medium | |
| CN111294651A (en) | Still picture anti-afterimage method and device based on play data stream and storage medium | |
| CN111050162B (en) | Color temperature test method, device, equipment and computer readable storage medium | |
| CN107179181B (en) | Display screen uniformity testing method, terminal and computer readable storage medium | |
| JP2017059927A (en) | User terminal, color correction system, and color correction method | |
| CN112995492A (en) | Parameter adjusting method and device, image acquisition system and computer readable storage medium | |
| CN109141249B (en) | Distance measuring method and computer-readable storage medium | |
| US8019153B2 (en) | Wide luminance range colorimetrically accurate profile generation method | |
| CN110933392B (en) | Television color temperature modulation method, television and storage medium | |
| CN109525839B (en) | HDMI compatibility testing method and device, mobile terminal and readable storage medium | |
| CN117240981A (en) | Color correction method, device and storage medium for extended reality photography | |
| US12394394B2 (en) | Display control apparatus used for color matching between reference image pickup apparatus and adjustment image pickup apparatus, control method therefor, and storage medium storing control program therefor | |
| CN105118408A (en) | Method, device, and system for adjusting white balance of display device | |
| CN113223186B (en) | Processing method, equipment, product and device for realizing augmented reality | |
| CN117499608A (en) | White balance adjustment method, white balance adjustment device, server, display device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |