WO2024055531A1 - Illuminometer value identification method, electronic device, and storage medium - Google Patents

Illuminometer value identification method, electronic device, and storage medium Download PDF

Info

Publication number
WO2024055531A1
WO2024055531A1 PCT/CN2023/078535 CN2023078535W WO2024055531A1 WO 2024055531 A1 WO2024055531 A1 WO 2024055531A1 CN 2023078535 W CN2023078535 W CN 2023078535W WO 2024055531 A1 WO2024055531 A1 WO 2024055531A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
preset
image
numerical
display area
Prior art date
Application number
PCT/CN2023/078535
Other languages
French (fr)
Chinese (zh)
Inventor
林俞竹
周璇
吴晓霞
Original Assignee
深圳创维-Rgb电子有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳创维-Rgb电子有限公司 filed Critical 深圳创维-Rgb电子有限公司
Publication of WO2024055531A1 publication Critical patent/WO2024055531A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/1444Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/19007Matching; Proximity measures
    • G06V30/19013Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching

Definitions

  • the present application relates to the technical field of televisions, and in particular to an illumination count value identification method, electronic equipment and storage media.
  • TVs are often equipped with the function of automatically adjusting the screen brightness or automatically adjusting the color temperature through light-sensing components.
  • the current light-sensing components have problems such as low recognition accuracy and low installation position, it is usually necessary to perform functional mapping processing on the values measured by the light-sensing components based on the values of the illuminance meter.
  • observers often need to observe and record the values of the illuminance meter when the ambient brightness and color temperature change over a wide range.
  • the ambient light will be blocked and the illuminance count will be reduced.
  • the accuracy of the value, and if observed from the side, it may cause erroneous observation and recording of the value, and the reduced accuracy of the final observed illumination count value will result in the inability to correctly adjust the screen color temperature after the final light-sensing data brightness.
  • the main purpose of this application is to provide an illumination count value identification method, electronic device and storage medium, aiming to solve the technical problem of low accuracy of illumination count values observed in the prior art.
  • the illumination counting value identification method includes:
  • Illuminance count values are identified from the numerical image.
  • the step of identifying the numerical display area in the illuminance meter image includes:
  • a numerical display area is determined.
  • the preset color threshold includes a preset red threshold, a preset green threshold, and a preset blue threshold. Based on the preset color threshold, the illuminance meter image is binarized to obtain the illuminance.
  • the steps to calculate a binary map include:
  • the step of determining the numerical display area according to each of the connected domains includes:
  • the minimum circumscribed quadrilateral of the target connected domain is determined as the numerical display area in the illuminance meter image.
  • the step of converting the viewing angle of the numerical display area to obtain a numerical image includes:
  • the color value of each of the null value pixel points is determined to obtain a numerical image.
  • the step before the step of performing coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, the step further includes:
  • the initial coordinates and perspective coordinates of each representative point are substituted into the perspective transformation algorithm to determine a preset perspective transformation matrix.
  • the step of identifying illumination count values from the numerical image includes:
  • the numerical recognition results are arranged and combined to obtain the illumination count value.
  • the method further includes:
  • a light-sensing mapping curve is generated.
  • the electronic device is a physical device.
  • the electronic device includes: a memory, a processor, and the illumination count value identification stored on the memory and operable on the processor.
  • the program of the method when the program of the illumination count value identification method is executed by the processor, can implement the steps of the illumination count value identification method as described above.
  • This application also provides a storage medium, the storage medium is a computer-readable storage medium, and the computer-readable storage medium
  • the storage medium stores a program for implementing the illumination count value identification method.
  • the program for the illumination count value identification method is executed by the processor, the above-mentioned steps of the illumination count value identification method are implemented.
  • the present application also provides a computer program product, which includes a computer program that implements the above-mentioned steps of the illumination count value identification method when executed by a processor.
  • the present application provides an illuminance counting value identification method, electronic device and storage medium.
  • an illuminance counting value identification method By acquiring an illuminance meter image, identifying the numerical display area in the illuminance meter image, the image of the numerical display area on the illuminance meter is obtained, and then through Convert the viewing angle of the numerical display area to obtain a numerical image, thereby realizing the viewing angle correction of the image in the numerical display area, so that the illuminance meter image collected from the side can be converted into a front view, and then the illuminance meter image collected from the side can be converted into a front view, and then the numerical image can be obtained by
  • the illuminance count value is obtained through identification, which realizes the accurate identification of the illuminance count value in the illuminance meter image collected from the side.
  • the squint of the human eye can be effectively reduced.
  • the error generated improves the accuracy of identification of illumination count values, and overcomes the technical problem of low accuracy of illumination count values observed in the prior art.
  • Figure 1 is a schematic structural diagram of an electronic device of the hardware operating environment involved in the illumination count value identification method in the embodiment of the present application;
  • Figure 2 is a schematic flow chart of an embodiment of the illumination count value identification method of the present application.
  • Figure 3 is a schematic diagram of an implementation manner of the binary diagram of the illuminance meter in this application;
  • Figure 4 is a schematic diagram of another implementation of the binary diagram of the illuminance meter in this application.
  • Figure 5 is a schematic diagram of an implementation manner of the numerical display area in the illuminance meter image in this application;
  • Figure 6 is a schematic diagram of another implementation of the binary diagram of the illuminance meter in this application.
  • Figure 7 is a schematic diagram of an implementation method of the light sensing mapping curve in this application.
  • Figure 8 is a schematic flow chart of another embodiment of the illumination count value identification method of the present application.
  • Figure 9 is a schematic diagram of an implementation manner of perspective transformation in this application.
  • Figure 10 is a schematic diagram of an implementation of the numerical display area before perspective conversion in this application.
  • Figure 11 is a schematic diagram of an implementation manner of the numerical image after perspective conversion in this application.
  • Figure 1 is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present application.
  • the terminal in the embodiment of this application may be a PC, a smartphone, a tablet, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer III) player, or an MP4 (Moving Picture Experts) Group Audio Layer IV, a dynamic image expert compresses standard audio layer 3) for mobile terminal devices such as players and portable computers.
  • MP3 Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer III
  • MP4 Moving Picture Experts Group Audio Layer IV
  • a dynamic image expert compresses standard audio layer 3
  • the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard).
  • the user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may include standard wired interfaces and wireless interfaces (such as WI-FI interfaces).
  • the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • the terminal may also include a camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio circuit, WiFi module, etc.
  • sensors such as light sensors, motion sensors and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor.
  • the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light.
  • the proximity sensor may turn off the display screen and/or when the mobile terminal moves to the ear. Backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes).
  • the mobile terminal can detect the magnitude and direction of gravity when stationary, and can be used to identify mobile terminal posture applications (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., here No longer.
  • mobile terminal posture applications such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., here No longer.
  • terminal structure shown in FIG. 1 does not limit the terminal, and may include more or fewer components than shown, or combine certain components, or arrange different components.
  • memory 1005 which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and an illumination count value identification application program.
  • the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server;
  • the user interface 1003 is mainly used to connect to the client (user) and communicate with the client;
  • the processor 1001 can be used to call the illumination count value recognition application stored in memory 1005 and perform the following operations:
  • Illuminance count values are identified from the numerical image.
  • processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
  • a numerical display area is determined.
  • processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
  • processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
  • the minimum circumscribed quadrilateral of the target connected domain is determined as the numerical display area in the illuminance meter image.
  • processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
  • x, y, 1 are the initial coordinates
  • X, Y, Z are the intermediate conversion coordinates
  • X', Y', Z' are the perspective coordinates
  • the color value of each of the null value pixel points is determined to obtain a numerical image.
  • processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
  • the initial coordinates and perspective coordinates of each representative point are substituted into the perspective transformation algorithm to determine a preset perspective transformation matrix.
  • processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
  • the numerical recognition results are arranged and combined to obtain the illumination count value.
  • processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
  • a light-sensing mapping curve is generated.
  • an embodiment of the present application provides an illumination count value identification method.
  • the illumination count value identification method includes the following steps:
  • Step S10 obtain the illuminance meter image
  • the illuminance meter is an instrument that measures optical parameters such as illuminance, brightness, and color temperature.
  • the illuminance meter image is an image containing all or part of the area of the illuminance meter.
  • the illuminance meter The meter image at least includes the numerical display area of the illuminance meter, and may also include other areas of the illuminance meter, such as the housing, the light sensor, etc.
  • the numerical display area is the area on the illuminance meter that displays the measurement results.
  • the numerical display area It can be part or all of the display area of the illuminance meter.
  • the illumination meter is photographed by an image acquisition device to obtain an image of the illumination meter, wherein the image is captured
  • the set of equipment includes cameras, video cameras, etc. For example, you can use a camera to take pictures of the values displayed on the illuminance meter under different illuminances, or you can use a camera to capture the changing process of the illuminance meter values under different illuminances, and then intercept each illumination intensity from the video. corresponding image.
  • Step S20 identify the numerical display area in the illuminance meter image
  • image recognition technology is used to perform image recognition on the numerical display area in the illuminance meter image according to the shape, specification, color, etc. of the numeric value display area, and determine the numeric value display area in the illuminance meter image. numerical display area.
  • the numerical display area can also be cut from the illuminance meter image, retaining the numerical display area, and removing Other parts outside the numerical display area to avoid patterns, words, numbers, etc. in other parts except the numerical display area from interfering with the subsequent illumination counting value recognition process, and at the same time, it can also reduce the subsequent viewing angle
  • the calculation amount of conversion and illumination count value recognition is reduced, and the recognition efficiency is improved.
  • the step of identifying the numerical display area in the illuminance meter image includes:
  • Step S21 Binarize the illuminance meter image based on a preset color threshold to obtain a binary image of the illuminance meter;
  • a color threshold is set in advance based on the color difference between the numerical display area and other areas in the illuminance meter image, and each pixel point in the illuminance meter image is compared with the color threshold. , perform image segmentation on the illuminance meter image based on a preset color threshold to obtain a binary image of the illuminance meter composed of two colors, where the two colors in the binary image of the illuminance meter can be any two different colors.
  • the color can be specifically set according to actual needs, which is not limited in this embodiment.
  • the preset color threshold can be determined based on the actual color difference between the numerical display area and other areas. For example, if the numerical display area If the green component is significantly larger than other areas, the green threshold can be determined based on the difference in the green value of the image, and the image can be binarized based on the green threshold. If the white component of the numerical display area is significantly larger than other areas, the green threshold can be determined based on the green value of the image. The color difference sets the green threshold, red threshold and blue threshold, and the image is binarized based on the green threshold, red threshold and blue threshold.
  • the preset color threshold includes a preset red threshold, a preset green threshold, and a preset blue threshold. Based on the preset color threshold, the illuminance meter image is binarized to obtain the illuminance.
  • the steps for calculating binary images include:
  • Step S211 obtain the color value of each pixel in the illuminance meter image, where the color value includes a red value, a green value and a blue value;
  • Step S212 Compare each color value with a preset color threshold, and determine that the red value is less than or equal to the preset red threshold, the blue value is less than or equal to the preset blue threshold, and the green value is greater than or equal to the preset green threshold. target pixel;
  • Step S213 assign the color value of each target pixel point to a preset first color value, and assign the color value of other pixels except each of the target pixel points to a preset second color value, to obtain Illuminance meter binary diagram.
  • the illuminance meter image adopts the RGB color mode.
  • the color value of each pixel in the illuminance meter image includes a red value, a green value and a blue value.
  • the preset color Thresholds include preset red threshold, preset green threshold and preset blue threshold.
  • each pixel point in the light meter image is traversed, the color value of each pixel point in the light meter image is obtained, each color value is compared with a preset color threshold, and the red color of each pixel point is determined.
  • the value is less than or equal to the preset red threshold, whether the blue value is less than or equal to the preset blue threshold, and whether the green value is greater than or equal to the preset green threshold
  • the red value is less than or equal to the preset red threshold
  • the blue value is less than or Pixels that are equal to the preset blue threshold and whose green value is greater than or equal to the preset green threshold are determined as target pixels
  • the color value of each target pixel is assigned to the preset first color value
  • each of the target pixels is divided into The color values of other pixels other than the target pixel are assigned to the preset Assume the second color value to obtain the binary image of the illuminance meter.
  • Step S22 traverse the binary image of the illuminance meter and determine at least one connected domain corresponding to the preset first color value in the binary image of the illuminance meter;
  • all pixels of the binary image of the illuminance meter are traversed, and according to the preset connected domain algorithm, at least one corresponding to the preset first color value in the binary image of the illuminance meter is determined.
  • a connected domain wherein the connected domain can be all connected domains, a maximum connected domain, or a connected domain with an area greater than a preset area threshold.
  • the step of determining at least one connected domain corresponding to the preset first color value in the binary image of the illuminance meter according to the preset connected domain algorithm may further include: determining each Whether the area of the connected domain is greater than or equal to the preset area threshold, the initial connected domain whose area is greater than or equal to the preset area threshold is retained, and the initial connected domain whose area is smaller than the preset area threshold is filtered out to reduce interference.
  • Figure 3 is a schematic diagram of an implementable manner of the binary diagram of the illuminance meter in this application
  • Figure 4 is another binary diagram of the illuminance meter in this application.
  • the first color value is preset to be the color value corresponding to white.
  • the connected domain of white is filtered according to the preset area threshold to obtain the second value of the illuminance meter as shown in Figure 4. picture.
  • Step S23 Determine a numerical display area based on each connected domain.
  • the target connected domain corresponding to the numerical display area is determined from each of the connected domains according to the specifications, shape and/or position of each of the connected domains, and then determined based on the target connected domain.
  • the position, specification and/or shape of the numerical display area, etc., for example, the geometric center of the target connected domain can be used as the geometric center of the numerical display area, and the numerical display can be determined according to the preset graphic of the numerical display area. area, the smallest preset external graphic corresponding to the target connected domain can also be determined as the numerical display area.
  • the specifications, shape, position and other information of the connected domain can be based on the actual conditions of the illuminance meter. The situation is determined, and this embodiment does not limit this.
  • the step of determining the numerical display area according to each of the connected domains includes:
  • Step S231 perform image recognition on each of the connected domains according to the specifications and shape of the preset reference area, and determine the target connected domain with the highest similarity to the preset reference area from each of the connected domains;
  • Step S232 Determine the minimum circumscribed quadrilateral of the target connected domain as the numerical display area in the illuminance meter image.
  • the specifications and shape of the preset reference area are determined based on the actual shape and specifications of the numerical display area, the positional relationship between the numerical display area and the image acquisition device, etc., for example, if If the actual shape of the numerical display area is a rectangle, then the numerical display area in the illuminance meter image is a quadrilateral. If the actual shape of the numerical display area is a circle, then the numerical display area in the illuminance meter image is an ellipse.
  • Figure 5 is a schematic diagram of an implementable manner of the numerical display area in the illuminance meter image in this application.
  • the minimum value determined according to the white connected domain in Figure 4 The circumscribed quadrilateral is the area selected by the white quadrilateral frame in Figure 5. That is, the area within the white quadrilateral frame in Figure 5 is the numerical display area.
  • Step S30 perform perspective conversion on the numerical display area to obtain a numerical image
  • the numerical display area is converted in perspective according to a preset perspective conversion algorithm to obtain a numerical image, wherein the numerical image can be an image corresponding to the numerical display area after perspective conversion.
  • the image may also be an image obtained by converting the viewing angle of the illuminance meter image.
  • the numerical image may be a front view of the image corresponding to the numerical display area, or there may be a certain conversion deviation from the front view.
  • the viewing angle may include image rotation. For example, if the illuminance meter is hung upside down, the numerical display area needs to be rotated 180 degrees before the accurate value can be recognized.
  • the perspective conversion method includes image rotation.
  • the perspective conversion method is Methods can also include parallel projection, perspective projection, etc., which can be determined based on actual needs, test results, etc.
  • Step S40 identify the illumination count value from the numerical image
  • the numerical characters in the numerical image can be recognized through image recognition, text recognition, etc. to obtain the illumination count value. It should be noted that if the numerical image is the numerical value If the image corresponding to the display area is an image after perspective conversion, the numerical characters in the numerical image can be directly identified to obtain the illumination count value. If the numerical image is an image after perspective conversion of the illuminance meter image, Then, the step of identifying the illumination count value from the numerical image is to identify the illumination count value from the numerical display area of the numerical image.
  • the step of identifying illumination count values from the numerical image includes:
  • Step S41 Binarize the numerical image to obtain a numerical binary image
  • Step S42 Perform character segmentation processing on the numerical binary image to obtain at least one character binary image
  • Step S43 perform similarity matching between each of the character binary images and a preset character template, and determine the numerical recognition results corresponding to each of the character binary images according to the character template with the highest similarity;
  • Step S44 Arrange and combine the numerical recognition results to obtain the illumination count value.
  • the numerical display area in the numerical image is binarized to obtain a numerical binary image
  • the numerical binary image is The rows and columns of the image are traversed respectively.
  • the target row or the target column is used as a boundary, and the numerical binary map is processed according to at least one determined boundary.
  • Perform character segmentation processing to obtain at least one character binary image.
  • Each of the character binary images is quantized into a dot matrix of 0 and 1, subtracted from the preset character template's quantized dot matrix of 0 and 1, and all points are The absolute values of the corresponding differences are accumulated, and the accumulated sum is determined as the error value.
  • the character template with the highest similarity is determined from each of the character templates, and the character template with the highest similarity is The corresponding numerical characters are determined as the corresponding numerical recognition results of each of the character binary diagrams.
  • the illumination count value can be obtained, wherein the numerical binary diagram is the A binary image of the image corresponding to the numerical display area.
  • the preset character template is an image of a standard front view corresponding to a combination of one or more of numbers, symbols, Chinese, English and other characters.
  • the illumination count value includes Color temperature, brightness, illuminance, etc. It should be noted that if the numerical display area includes more than one illuminance count value, the corresponding illuminance count value can be determined according to the positional relationship of each of the illuminance count values in the numerical display area. specific value.
  • the numerical binary image is subjected to character segmentation processing to obtain eight character binary images, and the eight character binary images are combined with the preset character template. Similarity matching can determine that the numerical recognition results are “1”, “1", “0.”, “5", “6", “1", “2” and “1”, among which, if preset Determine the brightness in the first line and the color temperature in the second line, then you can determine the brightness as "110.5" and the color temperature as "6121".
  • the step further includes:
  • Step S50 Obtain the light sensing component value corresponding to each illumination count value
  • Step S51 Generate a light-sensing mapping curve based on each illumination count value and each light-sensing component value.
  • the value of the light-sensing component detected by the light-sensing component under the same illuminance as each of the illuminance count values is obtained. Taking the value of each of the light-sensing component as the abscissa, each of the The illumination count value corresponding to the value of the light-sensing component is the ordinate, and the light-sensing mapping curve is obtained by fitting.
  • the light-sensing mapping curve is used in televisions to more accurately and correctly adjust the color temperature and brightness of the picture according to the environment. .
  • Figure 7 is a schematic diagram of an implementable manner of the light sensing mapping curve in this application.
  • the abscissa is the brightness of the light sensing component
  • the ordinate is the illuminance meter.
  • the numerical value is obtained
  • the image realizes the viewing angle correction of the image in the numerical display area, so that the illuminance meter image collected from the side can be converted into a front view, and then the illuminance count value is obtained from the numerical image, thereby realizing the illuminance meter image collected from the side.
  • the step of converting the viewing angle of the numerical display area to obtain a numerical image includes:
  • Step S31 perform coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, where the perspective transformation algorithm is:
  • a rectangular coordinate system is established, the coordinates of each pixel point in the numerical display area in the rectangular coordinate system are determined, and the coordinates of each pixel point are substituted into the perspective transformation algorithm.
  • the position of each pixel in the numerical display area is coordinate transformed to obtain perspective coordinates, where the perspective transformation algorithm is:
  • the preset perspective transformation matrix can be preset in value according to the actual situation.
  • x, y, and 1 are the initial coordinates
  • X, Y, and Z are the intermediate transformation coordinates. In the same horizontal plane, it is necessary to divide by Z to realize the conversion from two-dimensional space to three-dimensional space.
  • the obtained X', Y', and Z' are perspective coordinates.
  • the coordinates of each pixel in the numerical display area are The process of position coordinate conversion includes two coordinate conversions. The first time is from (x, y, 1) to (X, Y, Z), and the second time is from (X, Y, Z) to ( X', Y', Z').
  • the two transformation methods in this embodiment can also be converted into one coordinate transformation or more than two coordinate transformations through formula transformation. In this embodiment, No restrictions.
  • the step before the step of performing coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, the step further includes:
  • Step S311 establish a rectangular coordinate system
  • Step S312 Obtain the initial coordinates and perspective coordinates of at least one preset representative point in the rectangular coordinate system in the numerical display area;
  • a rectangular coordinate system is established, at least one representative point is selected from the numerical display area, and the initial coordinates and perspective coordinates of each representative point in the rectangular coordinate system are obtained, where,
  • the representative point may be a vertex of the numerical display area, a point on the contour line of the numerical display area, or any point in the numerical display area from which accurate coordinates after perspective conversion can be determined.
  • Step S313 Substitute the initial coordinates and perspective coordinates of each representative point into the perspective transformation algorithm to determine the preset perspective transformation matrix.
  • the perspective transformation algorithm is:
  • x, y, 1 are the initial coordinates
  • X, Y, Z are the intermediate transformation coordinates
  • X', Y', Z' are the perspective coordinates.
  • the number of representative points is 4.
  • Formula 3 can be obtained: Among them, x 1 and y 1 are the initial coordinates of the first representative point, X 1 ' and Y 1 ' are the perspective coordinates of the first representative point, x 2 and y 2 are the initial coordinates of the second representative point, 2 ' and Y 2 ' are the perspective coordinates of the second representative point, x 3 and y 3 are the initial coordinates of the third representative point, X 3 ' and Y 3 ' are the perspective coordinates of the third representative point, x 4 , y 4 are the initial coordinates of the fourth representative point, X 4 ', Y 4 ' are the perspective coordinates of the fourth representative point. Substituting the initial coordinates and perspective coordinates of the four representative points into formula 3, the perspective transformation can be determined matrix specific value.
  • a numerical image can be obtained by mapping the numerical display area on the front view plane along the direction of the arrow through a preset perspective transformation matrix.
  • Step S32 Based on each of the perspective coordinates, fill the color value of each pixel in the numerical display area into a preset rectangular area;
  • a preset rectangular area is determined in the rectangular coordinate system in advance according to the actual situation, each of the perspective coordinates is located in the preset rectangular area, and each of the numerical display areas is The color value of the pixel is assigned to the pixel corresponding to the perspective coordinate of each pixel.
  • Step S33 determine the null pixels with empty color values in the preset rectangular area
  • Step S34 Determine the color value of each null pixel point based on the color value of the pixel point adjacent to each null value pixel point, and obtain a numerical image.
  • the average value of the color values of the pixels adjacent to each of the null pixels is calculated or The median value, etc., determines the average or median value of the color values of the pixels adjacent to each of the null value pixels as the color value of each of the null value pixels, until the preset rectangle If there are no null pixels with empty color values in the area, then a numerical image after the viewing angle conversion is obtained; if there are null pixels with empty color values in the preset rectangular area, then a numerical image after the viewing angle conversion is obtained .
  • the image of the numerical display area captured from the side can be better corrected to a frontal view, thereby helping to improve the accuracy of subsequent numerical recognition.
  • the present application also provides a computer program product, including a computer program that implements the steps of the illumination count value identification method as described above when executed by a processor.
  • the computer program product provided by this application solves the technical problem of low accuracy of illumination count values observed in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiments of the present application are the same as the beneficial effects of the illumination count value identification method provided by the above embodiments, and will not be described again here.

Abstract

Disclosed in the present application are an illuminometer value identification method, an electronic device, and a storage medium. The illuminometer value identification method comprises: acquiring an illuminometer image; identifying a value display area in the illuminometer image; performing visual angle conversion on the value display area to obtain a value image; and identifying an illuminometer value from the value image.

Description

照度计数值识别方法、电子设备及存储介质Illumination counting value identification method, electronic equipment and storage medium
相关申请Related applications
本申请要求于2022年9月13日申请的、申请号为202211110091.5的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202211110091.5 filed on September 13, 2022, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及电视机技术领域,尤其涉及一种照度计数值识别方法、电子设备及存储介质。The present application relates to the technical field of televisions, and in particular to an illumination count value identification method, electronic equipment and storage media.
背景技术Background technique
现今,为了满足消费者应用电视机在观看电影、电视剧、照片等不同类型内容时有更好的体验感,电视机中往往会设置自动调整屏幕亮度或自动调整色温的功能,通过光感元器件感受当前环境亮度与色温,从而实现屏幕亮度与色温的动态调节。由于目前的光感元器件存在识别精度不高,安装位置偏下等问题,通常需要根据照度计的数值对光感元器件测到的数值进行函数映射处理。然而,在实际使用照度计的过程中,观测者常常需要在环境亮度与色温大范围变化的情况下,观测并记录照度计的数值,若从正面进行观测,则会遮挡环境光线,降低照度计数值的准确性,而若从侧面进行观测,则可能会造成数值的错误观测与记录,而最终观测到的照度计数值的准确性的降低,会导致经过最终的光感数据无法正确调整屏幕色温亮度。Nowadays, in order for consumers to use TVs to have a better experience when watching different types of content such as movies, TV series, photos, etc., TVs are often equipped with the function of automatically adjusting the screen brightness or automatically adjusting the color temperature through light-sensing components. Feel the current ambient brightness and color temperature to achieve dynamic adjustment of screen brightness and color temperature. Since the current light-sensing components have problems such as low recognition accuracy and low installation position, it is usually necessary to perform functional mapping processing on the values measured by the light-sensing components based on the values of the illuminance meter. However, in the actual use of the illuminance meter, observers often need to observe and record the values of the illuminance meter when the ambient brightness and color temperature change over a wide range. If observed from the front, the ambient light will be blocked and the illuminance count will be reduced. The accuracy of the value, and if observed from the side, it may cause erroneous observation and recording of the value, and the reduced accuracy of the final observed illumination count value will result in the inability to correctly adjust the screen color temperature after the final light-sensing data brightness.
发明内容Contents of the invention
本申请的主要目的在于提供一种照度计数值识别方法、电子设备及存储介质,旨在解决现有技术观测到的照度计数值的准确性较低的技术问题。The main purpose of this application is to provide an illumination count value identification method, electronic device and storage medium, aiming to solve the technical problem of low accuracy of illumination count values observed in the prior art.
为实现上述目的,本申请提供一种照度计数值识别方法,所述照度计数值识别方法包括:In order to achieve the above purpose, this application provides an illumination counting value identification method. The illumination counting value identification method includes:
获取照度计图像;Get the light meter image;
识别所述照度计图像中的数值显示区域;Identify the numerical display area in the illuminance meter image;
对所述数值显示区域进行视角转换,得到数值图像;Convert the viewing angle of the numerical display area to obtain a numerical image;
从所述数值图像中识别得到照度计数值。Illuminance count values are identified from the numerical image.
在一实施例中,所述识别所述照度计图像中的数值显示区域的步骤包括:In one embodiment, the step of identifying the numerical display area in the illuminance meter image includes:
基于预设颜色阈值对所述照度计图像进行二值化处理,得到照度计二值图;Binarize the illuminance meter image based on a preset color threshold to obtain a binary image of the illuminance meter;
遍历所述照度计二值图,确定所述照度计二值图中预设第一色彩数值对应的至少一个的连通域;Traverse the binary image of the illuminance meter and determine at least one connected domain corresponding to the preset first color value in the binary image of the illuminance meter;
根据各所述连通域,确定数值显示区域。According to each connected domain, a numerical display area is determined.
在一实施例中,所述预设颜色阈值包括预设红色阈值、预设绿色阈值和预设蓝色阈值,所述基于预设颜色阈值对所述照度计图像进行二值化处理,得到照度计二值图的步骤包括:In one embodiment, the preset color threshold includes a preset red threshold, a preset green threshold, and a preset blue threshold. Based on the preset color threshold, the illuminance meter image is binarized to obtain the illuminance. The steps to calculate a binary map include:
获取所述照度计图像中每个像素点的色彩数值,所述色彩数值包括红色值、绿色值和蓝色值;Obtain the color value of each pixel in the illuminance meter image, where the color value includes a red value, a green value and a blue value;
将各所述色彩数值与预设颜色阈值进行比较,确定红色值小于或等于预设红色阈值、 蓝色值小于或等于预设蓝色阈值且绿色值大于或等于预设绿色阈值的目标像素点;Compare each color value with a preset color threshold to determine that the red value is less than or equal to the preset red threshold, Target pixels whose blue value is less than or equal to the preset blue threshold and whose green value is greater than or equal to the preset green threshold;
将各所述目标像素点的色彩数值赋值为预设第一色彩数值,并将除各所述目标像素点之外的其他像素点的色彩数值赋值为预设第二色彩数值,得到照度计二值图。Assign the color value of each target pixel point as a preset first color value, and assign the color values of other pixels except each of the target pixel points as a preset second color value to obtain an illuminance meter. value graph.
在一实施例中,所述根据各所述连通域,确定数值显示区域的步骤包括:In one embodiment, the step of determining the numerical display area according to each of the connected domains includes:
根据预设参考区域的规格和形状,对各所述连通域进行图像识别,从各所述连通域中,确定与所述预设参考区域相似度最高的目标连通域;Perform image recognition on each of the connected domains according to the specifications and shape of the preset reference area, and determine the target connected domain with the highest similarity to the preset reference area from each of the connected domains;
将所述目标连通域的最小外接四边形,确定为所述照度计图像中的数值显示区域。The minimum circumscribed quadrilateral of the target connected domain is determined as the numerical display area in the illuminance meter image.
在一实施例中,所述对所述数值显示区域进行视角转换,得到数值图像的步骤包括:In one embodiment, the step of converting the viewing angle of the numerical display area to obtain a numerical image includes:
根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标,其中,所述透视变换算法为:
Perform coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, where the perspective transformation algorithm is:
其中,为预设的透视变换矩阵,x、y、1为初始坐标,X、Y、Z为中间转换坐标,X’、Y’、Z’为透视坐标;in, is the preset perspective transformation matrix, x, y, 1 are the initial coordinates, X, Y, Z are the intermediate transformation coordinates, X', Y', Z' are the perspective coordinates;
基于各所述透视坐标,将所述数值显示区域中每个像素点的色彩数值,填入预设矩形区域中;Based on each of the perspective coordinates, fill the color value of each pixel in the numerical display area into a preset rectangular area;
确定所述预设矩形区域中色彩数值为空的空值像素点;Determine the null pixels with empty color values in the preset rectangular area;
根据与各所述空值像素点相邻的像素点的色彩数值,确定各所述空值像素点的色彩数值,得到数值图像。According to the color value of the pixel points adjacent to each of the null value pixel points, the color value of each of the null value pixel points is determined to obtain a numerical image.
在一实施例中,所述根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标的步骤之前,还包括:In one embodiment, before the step of performing coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, the step further includes:
建立直角坐标系;Establish a rectangular coordinate system;
获取所述数值显示区域中至少一个预设代表点在所述直角坐标系中的初始坐标和透视坐标;Obtain the initial coordinates and perspective coordinates of at least one preset representative point in the rectangular coordinate system in the numerical display area;
将各所述代表点的初始坐标和透视坐标代入透视变换算法中,确定预设的透视变换矩阵。The initial coordinates and perspective coordinates of each representative point are substituted into the perspective transformation algorithm to determine a preset perspective transformation matrix.
在一实施例中,所述从所述数值图像中识别得到照度计数值的步骤包括:In one embodiment, the step of identifying illumination count values from the numerical image includes:
对所述数值图像进行二值化处理,得到数值二值图;Perform binarization processing on the numerical image to obtain a numerical binary image;
对所述数值二值图进行字符分割处理,得到至少一个字符二值图;Perform character segmentation processing on the numerical binary image to obtain at least one character binary image;
将各所述字符二值图与预设的字符模板进行相似度匹配,根据相似度最高的字符模板,确定各所述字符二值图各自对应的数值识别结果;Perform similarity matching between each of the character binary images and a preset character template, and determine the numerical recognition results corresponding to each of the character binary images according to the character template with the highest similarity;
将各所述数值识别结果排列组合,得到照度计数值。The numerical recognition results are arranged and combined to obtain the illumination count value.
在一实施例中,所述从所述数值图像中识别得到照度计数值的步骤之后,还包括:In one embodiment, after the step of identifying and obtaining the illuminance count value from the numerical image, the method further includes:
获取各所述照度计数值对应的光感元器件数值;Obtain the light sensing component value corresponding to each illumination count value;
根据各所述照度计数值和各所述光感元器件数值,生成光感映射曲线。According to each of the illumination count values and the values of each of the light-sensing components, a light-sensing mapping curve is generated.
本申请还提供一种电子设备,所述电子设备为实体设备,所述电子设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的所述照度计数值识别方法的程序,所述照度计数值识别方法的程序被处理器执行时可实现如上述的照度计数值识别方法的步骤。This application also provides an electronic device. The electronic device is a physical device. The electronic device includes: a memory, a processor, and the illumination count value identification stored on the memory and operable on the processor. The program of the method, when the program of the illumination count value identification method is executed by the processor, can implement the steps of the illumination count value identification method as described above.
本申请还提供一种存储介质,所述存储介质为计算机可读存储介质,所述计算机可读 存储介质上存储有实现照度计数值识别方法的程序,所述照度计数值识别方法的程序被处理器执行时实现如上述的照度计数值识别方法的步骤。This application also provides a storage medium, the storage medium is a computer-readable storage medium, and the computer-readable storage medium The storage medium stores a program for implementing the illumination count value identification method. When the program for the illumination count value identification method is executed by the processor, the above-mentioned steps of the illumination count value identification method are implemented.
本申请还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述的照度计数值识别方法的步骤。The present application also provides a computer program product, which includes a computer program that implements the above-mentioned steps of the illumination count value identification method when executed by a processor.
本申请提供了一种照度计数值识别方法、电子设备及存储介质,通过获取照度计图像,识别所述照度计图像中的数值显示区域,获取了照度计上的数值显示区域的图像,进而通过对所述数值显示区域进行视角转换,得到数值图像,实现了对数值显示区域的图像的视角矫正,使得从侧面采集到的照度计图像,可以转换成正视图,进而通过从所述数值图像中识别得到照度计数值,实现了对侧面采集到的照度计图像中的照度计数值的准确识别,与观测者从侧面进行观测的方式相比,通过视角转换和图像识别,可以有效降低人眼斜视产生的误差,提高了照度计数值识别的准确性,克服了解决现有技术观测到的照度计数值的准确性较低的技术问题。The present application provides an illuminance counting value identification method, electronic device and storage medium. By acquiring an illuminance meter image, identifying the numerical display area in the illuminance meter image, the image of the numerical display area on the illuminance meter is obtained, and then through Convert the viewing angle of the numerical display area to obtain a numerical image, thereby realizing the viewing angle correction of the image in the numerical display area, so that the illuminance meter image collected from the side can be converted into a front view, and then the illuminance meter image collected from the side can be converted into a front view, and then the numerical image can be obtained by The illuminance count value is obtained through identification, which realizes the accurate identification of the illuminance count value in the illuminance meter image collected from the side. Compared with the way the observer observes from the side, through perspective conversion and image recognition, the squint of the human eye can be effectively reduced. The error generated improves the accuracy of identification of illumination count values, and overcomes the technical problem of low accuracy of illumination count values observed in the prior art.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to describe the embodiments or the prior art. Obviously, for those of ordinary skill in the art, It is said that other drawings can be obtained based on these drawings without exerting creative labor.
图1为本申请实施例中照度计数值识别方法涉及的硬件运行环境的电子设备结构示意图;Figure 1 is a schematic structural diagram of an electronic device of the hardware operating environment involved in the illumination count value identification method in the embodiment of the present application;
图2为本申请照度计数值识别方法一实施例的流程示意图;Figure 2 is a schematic flow chart of an embodiment of the illumination count value identification method of the present application;
图3为本申请中照度计二值图的一种可实施方式的示意图;Figure 3 is a schematic diagram of an implementation manner of the binary diagram of the illuminance meter in this application;
图4为本申请中照度计二值图的另一种可实施方式的示意图;Figure 4 is a schematic diagram of another implementation of the binary diagram of the illuminance meter in this application;
图5为本申请中照度计图像中的数值显示区域的一种可实施方式的示意图;Figure 5 is a schematic diagram of an implementation manner of the numerical display area in the illuminance meter image in this application;
图6为本申请中照度计二值图的另一种可实施方式的示意图;Figure 6 is a schematic diagram of another implementation of the binary diagram of the illuminance meter in this application;
图7为本申请中光感映射曲线的一种可实施方式的示意图;Figure 7 is a schematic diagram of an implementation method of the light sensing mapping curve in this application;
图8为本申请照度计数值识别方法另一实施例的流程示意图;Figure 8 is a schematic flow chart of another embodiment of the illumination count value identification method of the present application;
图9为本申请中透视变换的一种可实施方式的示意图;Figure 9 is a schematic diagram of an implementation manner of perspective transformation in this application;
图10为本申请中视角转换前的数值显示区域的一种可实施方式的示意图;Figure 10 is a schematic diagram of an implementation of the numerical display area before perspective conversion in this application;
图11为本申请中视角转换后的数值图像的一种可实施方式的示意图。Figure 11 is a schematic diagram of an implementation manner of the numerical image after perspective conversion in this application.
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings.
具体实施方式Detailed ways
为使本申请的上述目的、特征和优点能够更加明显易懂,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其它实施例,均属于本申请保护的范围。In order to make the above objects, features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without any creative work shall fall within the scope of protection of this application.
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的终端结构示意图。As shown in Figure 1, Figure 1 is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present application.
本申请实施例终端可以是PC,也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、便携计算机等可移动式终端设备。The terminal in the embodiment of this application may be a PC, a smartphone, a tablet, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer III) player, or an MP4 (Moving Picture Experts) Group Audio Layer IV, a dynamic image expert compresses standard audio layer 3) for mobile terminal devices such as players and portable computers.
如图1所示,该终端可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。通信总线1002用于实现这些组件之间的连接通信。 用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005还可以是独立于前述处理器1001的存储装置。As shown in Figure 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to implement connection communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). The user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may include standard wired interfaces and wireless interfaces (such as WI-FI interfaces). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
在一实施例中,终端还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可在移动终端移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。In an embodiment, the terminal may also include a camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio circuit, WiFi module, etc. Among them, sensors such as light sensors, motion sensors and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light. The proximity sensor may turn off the display screen and/or when the mobile terminal moves to the ear. Backlight. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). It can detect the magnitude and direction of gravity when stationary, and can be used to identify mobile terminal posture applications (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., here No longer.
本领域技术人员可以理解,图1中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the terminal structure shown in FIG. 1 does not limit the terminal, and may include more or fewer components than shown, or combine certain components, or arrange different components.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及照度计数值识别应用程序。As shown in Figure 1, memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and an illumination count value identification application program.
在图1所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的照度计数值识别应用程序,并执行以下操作:In the terminal shown in Figure 1, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the client (user) and communicate with the client; and the processor 1001 can be used to call the illumination count value recognition application stored in memory 1005 and perform the following operations:
获取照度计图像;Get the light meter image;
识别所述照度计图像中的数值显示区域;identifying a numerical display area in the illuminometer image;
对所述数值显示区域进行视角转换,得到数值图像;Convert the viewing angle of the numerical display area to obtain a numerical image;
从所述数值图像中识别得到照度计数值。Illuminance count values are identified from the numerical image.
进一步地,处理器1001可以调用存储器1005中存储的照度计数值识别应用程序,还执行以下操作:Further, the processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
基于预设颜色阈值对所述照度计图像进行二值化处理,得到照度计二值图;Binarize the illuminance meter image based on a preset color threshold to obtain a binary image of the illuminance meter;
遍历所述照度计二值图,确定所述照度计二值图中预设第一色彩数值对应的至少一个的连通域;Traverse the binary image of the illuminance meter and determine at least one connected domain corresponding to the preset first color value in the binary image of the illuminance meter;
根据各所述连通域,确定数值显示区域。According to each connected domain, a numerical display area is determined.
进一步地,处理器1001可以调用存储器1005中存储的照度计数值识别应用程序,还执行以下操作:Further, the processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
获取所述照度计图像中每个像素点的色彩数值,所述色彩数值包括红色值、绿色值和蓝色值;Obtain the color value of each pixel in the illuminance meter image, where the color value includes a red value, a green value and a blue value;
将各所述色彩数值与预设颜色阈值进行比较,确定红色值小于或等于预设红色阈值、蓝色值小于或等于预设蓝色阈值且绿色值大于或等于预设绿色阈值的目标像素点;Compare each color value with a preset color threshold to determine a target pixel whose red value is less than or equal to the preset red threshold, whose blue value is less than or equal to the preset blue threshold, and whose green value is greater than or equal to the preset green threshold. ;
将各所述目标像素点的色彩数值赋值为预设第一色彩数值,并将除各所述目标像素点之外的其他像素点的色彩数值赋值为预设第二色彩数值,得到照度计二值图。Assign the color value of each target pixel point as a preset first color value, and assign the color value of other pixels except each of the target pixel points as a preset second color value to obtain an illuminance meter. value graph.
进一步地,处理器1001可以调用存储器1005中存储的照度计数值识别应用程序,还执行以下操作:Further, the processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
根据预设参考区域的规格和形状,对各所述连通域进行图像识别,从各所述连通域中,确定与所述预设参考区域相似度最高的目标连通域;Perform image recognition on each of the connected domains according to the specifications and shape of the preset reference area, and determine the target connected domain with the highest similarity to the preset reference area from each of the connected domains;
将所述目标连通域的最小外接四边形,确定为所述照度计图像中的数值显示区域。 The minimum circumscribed quadrilateral of the target connected domain is determined as the numerical display area in the illuminance meter image.
进一步地,处理器1001可以调用存储器1005中存储的照度计数值识别应用程序,还执行以下操作:Further, the processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标,其中,所述透视变换算法为:
Perform coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, where the perspective transformation algorithm is:
其中,为预设的透视变换矩阵,x、y、1为初始坐标,X、Y、Z为中间转换坐标,X’、Y’、Z’为透视坐标;in, is the preset perspective transformation matrix, x, y, 1 are the initial coordinates, X, Y, Z are the intermediate conversion coordinates, and X', Y', Z' are the perspective coordinates;
基于各所述透视坐标,将所述数值显示区域中每个像素点的色彩数值,填入预设矩形区域中;Based on each of the perspective coordinates, fill the color value of each pixel in the numerical display area into a preset rectangular area;
确定所述预设矩形区域中色彩数值为空的空值像素点;Determine the null pixels with empty color values in the preset rectangular area;
根据与各所述空值像素点相邻的像素点的色彩数值,确定各所述空值像素点的色彩数值,得到数值图像。According to the color value of the pixel points adjacent to each of the null value pixel points, the color value of each of the null value pixel points is determined to obtain a numerical image.
进一步地,处理器1001可以调用存储器1005中存储的照度计数值识别应用程序,还执行以下操作:Further, the processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
建立直角坐标系;Establish a rectangular coordinate system;
获取所述数值显示区域中至少一个预设代表点在所述直角坐标系中的初始坐标和透视坐标;Obtain the initial coordinates and perspective coordinates of at least one preset representative point in the rectangular coordinate system in the numerical display area;
将各所述代表点的初始坐标和透视坐标代入透视变换算法中,确定预设的透视变换矩阵。The initial coordinates and perspective coordinates of each representative point are substituted into the perspective transformation algorithm to determine a preset perspective transformation matrix.
进一步地,处理器1001可以调用存储器1005中存储的照度计数值识别应用程序,还执行以下操作:Further, the processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
对所述数值图像进行二值化处理,得到数值二值图;Perform binarization processing on the numerical image to obtain a numerical binary image;
对所述数值二值图进行字符分割处理,得到至少一个字符二值图;Perform character segmentation processing on the numerical binary image to obtain at least one character binary image;
将各所述字符二值图与预设的字符模板进行相似度匹配,根据相似度最高的字符模板,确定各所述字符二值图各自对应的数值识别结果;Perform similarity matching between each of the character binary images and a preset character template, and determine the numerical recognition results corresponding to each of the character binary images according to the character template with the highest similarity;
将各所述数值识别结果排列组合,得到照度计数值。The numerical recognition results are arranged and combined to obtain the illumination count value.
进一步地,处理器1001可以调用存储器1005中存储的照度计数值识别应用程序,还执行以下操作:Further, the processor 1001 can call the illumination count value identification application stored in the memory 1005, and also perform the following operations:
获取各所述照度计数值对应的光感元器件数值;Obtain the light sensing component value corresponding to each illumination count value;
根据各所述照度计数值和各所述光感元器件数值,生成光感映射曲线。According to each of the illumination count values and the values of each of the light-sensing components, a light-sensing mapping curve is generated.
本申请实施例提供一种照度计数值识别方法,在本申请照度计数值识别方法的第一实施例中,参照图2,所述照度计数值识别方法包括以下步骤:An embodiment of the present application provides an illumination count value identification method. In the first embodiment of the illumination count value identification method of the present application, with reference to Figure 2, the illumination count value identification method includes the following steps:
步骤S10,获取照度计图像;Step S10, obtain the illuminance meter image;
在本实施例中,需要说明的是,照度计是一种测量照度、亮度、色温等光学参数的仪器仪表,所述照度计图像为包含有照度计的全部或部分区域的图像,所述照度计图像中至少包括照度计的数值显示区域,还可以包括照度计的其他区域,例如外壳、光传感器等,所述数值显示区域为所述照度计上显示测量结果的区域,所述数值显示区域可以为所述照度计的显示屏的部分或全部区域。In this embodiment, it should be noted that the illuminance meter is an instrument that measures optical parameters such as illuminance, brightness, and color temperature. The illuminance meter image is an image containing all or part of the area of the illuminance meter. The illuminance meter The meter image at least includes the numerical display area of the illuminance meter, and may also include other areas of the illuminance meter, such as the housing, the light sensor, etc. The numerical display area is the area on the illuminance meter that displays the measurement results. The numerical display area It can be part or all of the display area of the illuminance meter.
具体地,通过图像采集设备对照度计进行拍摄,得到照度计图像,其中,所述图像采 集设备包括照相机、摄影机等,例如,可以通过照相机对不同照度下对照度计上显示的数值进行拍照,也可以通过摄影机拍摄照度计在不同照度下数值的变化过程,进而从视频中截取各个照度对应的图像。Specifically, the illumination meter is photographed by an image acquisition device to obtain an image of the illumination meter, wherein the image is captured The set of equipment includes cameras, video cameras, etc. For example, you can use a camera to take pictures of the values displayed on the illuminance meter under different illuminances, or you can use a camera to capture the changing process of the illuminance meter values under different illuminances, and then intercept each illumination intensity from the video. corresponding image.
步骤S20,识别所述照度计图像中的数值显示区域;Step S20, identify the numerical display area in the illuminance meter image;
在本实施例中,具体地,通过图像识别技术,根据所述数值显示区域的形状、规格、颜色等,对所述照度计图像中的数值显示区域进行图像识别,确定所述照度计图像中的数值显示区域。In this embodiment, specifically, image recognition technology is used to perform image recognition on the numerical display area in the illuminance meter image according to the shape, specification, color, etc. of the numeric value display area, and determine the numeric value display area in the illuminance meter image. numerical display area.
在一种可实施的方式中,所述识别所述照度计图像中的数值显示区域的步骤之后,还可以从所述照度计图像中切割所述数值显示区域,保留所述数值显示区域,去除所述数值显示区域之外的其他部分,以避免除所述数值显示区域之外的其他部分中的图案、文字、数字等,对后续照度计数值识别过程的造成干扰,同时也可以减少后续视角转换和照度计数值识别的计算量,提高识别效率。In an implementable manner, after the step of identifying the numerical display area in the illuminance meter image, the numerical display area can also be cut from the illuminance meter image, retaining the numerical display area, and removing Other parts outside the numerical display area to avoid patterns, words, numbers, etc. in other parts except the numerical display area from interfering with the subsequent illumination counting value recognition process, and at the same time, it can also reduce the subsequent viewing angle The calculation amount of conversion and illumination count value recognition is reduced, and the recognition efficiency is improved.
在一实施例中,所述识别所述照度计图像中的数值显示区域的步骤包括:In one embodiment, the step of identifying the numerical display area in the illuminance meter image includes:
步骤S21,基于预设颜色阈值对所述照度计图像进行二值化处理,得到照度计二值图;Step S21: Binarize the illuminance meter image based on a preset color threshold to obtain a binary image of the illuminance meter;
在本实施例中,具体地,根据所述照度计图像中的数值显示区域与其他区域的颜色差异,预先设定颜色阈值,将所述照度计图像中各个像素点与所述颜色阈值进行比较,基于预设颜色阈值对所述照度计图像进行图像分割,得到由两种颜色组成的照度计二值图,其中,所述照度计二值图中的两种颜色可以为任意两种不同的颜色,具体可以根据实际需要进行设定,本实施例对此不加以限制。In this embodiment, specifically, a color threshold is set in advance based on the color difference between the numerical display area and other areas in the illuminance meter image, and each pixel point in the illuminance meter image is compared with the color threshold. , perform image segmentation on the illuminance meter image based on a preset color threshold to obtain a binary image of the illuminance meter composed of two colors, where the two colors in the binary image of the illuminance meter can be any two different colors. The color can be specifically set according to actual needs, which is not limited in this embodiment.
需要说明的是,由于不同的照度计的显示屏的颜色可能不同,所述预设颜色阈值可以根据数值显示区域与其他区域的颜色差异的实际情况进行确定,例如,若所述数值显示区域的绿色分量明显大于其他区域,则可以根据图像的绿色值的差异确定绿色阈值,根据绿色阈值对图像进行二值化处理,若所述数值显示区域的白色分量明显大于其他区域,则可以根据图像的颜色差异设定绿色阈值、红色阈值和蓝色阈值,根据绿色阈值、红色阈值和蓝色阈值共同对图像进行二值化处理。It should be noted that since the colors of the display screens of different illuminance meters may be different, the preset color threshold can be determined based on the actual color difference between the numerical display area and other areas. For example, if the numerical display area If the green component is significantly larger than other areas, the green threshold can be determined based on the difference in the green value of the image, and the image can be binarized based on the green threshold. If the white component of the numerical display area is significantly larger than other areas, the green threshold can be determined based on the green value of the image. The color difference sets the green threshold, red threshold and blue threshold, and the image is binarized based on the green threshold, red threshold and blue threshold.
在一实施例中,所述预设颜色阈值包括预设红色阈值、预设绿色阈值和预设蓝色阈值,所述基于预设颜色阈值对所述照度计图像进行二值化处理,得到照度计二值图的步骤包括:In one embodiment, the preset color threshold includes a preset red threshold, a preset green threshold, and a preset blue threshold. Based on the preset color threshold, the illuminance meter image is binarized to obtain the illuminance. The steps for calculating binary images include:
步骤S211,获取所述照度计图像中每个像素点的色彩数值,所述色彩数值包括红色值、绿色值和蓝色值;Step S211, obtain the color value of each pixel in the illuminance meter image, where the color value includes a red value, a green value and a blue value;
步骤S212,将各所述色彩数值与预设颜色阈值进行比较,确定红色值小于或等于预设红色阈值、蓝色值小于或等于预设蓝色阈值且绿色值大于或等于预设绿色阈值的目标像素点;Step S212: Compare each color value with a preset color threshold, and determine that the red value is less than or equal to the preset red threshold, the blue value is less than or equal to the preset blue threshold, and the green value is greater than or equal to the preset green threshold. target pixel;
步骤S213,将各所述目标像素点的色彩数值赋值为预设第一色彩数值,并将除各所述目标像素点之外的其他像素点的色彩数值赋值为预设第二色彩数值,得到照度计二值图。Step S213, assign the color value of each target pixel point to a preset first color value, and assign the color value of other pixels except each of the target pixel points to a preset second color value, to obtain Illuminance meter binary diagram.
在本实施例中,需要说明的是,所述照度计图像采用RGB色彩模式,所述照度计图像中每个像素点的色彩数值包括红色值、绿色值和蓝色值,所述预设颜色阈值包括预设红色阈值、预设绿色阈值和预设蓝色阈值。In this embodiment, it should be noted that the illuminance meter image adopts the RGB color mode. The color value of each pixel in the illuminance meter image includes a red value, a green value and a blue value. The preset color Thresholds include preset red threshold, preset green threshold and preset blue threshold.
具体地,遍历所述照度计图像中每个像素点,获取所述照度计图像中每个像素点的色彩数值,将各所述色彩数值与预设颜色阈值进行比较,判断各个像素点的红色值是否小于或等于预设红色阈值、蓝色值是否小于或等于预设蓝色阈值且绿色值是否大于或等于预设绿色阈值,将红色值小于或等于预设红色阈值、蓝色值小于或等于预设蓝色阈值且绿色值大于或等于预设绿色阈值的像素点确定为目标像素点,将各所述目标像素点的色彩数值赋值为预设第一色彩数值,并将除各所述目标像素点之外的其他像素点的色彩数值赋值为预 设第二色彩数值,得到照度计二值图。Specifically, each pixel point in the light meter image is traversed, the color value of each pixel point in the light meter image is obtained, each color value is compared with a preset color threshold, and the red color of each pixel point is determined. Whether the value is less than or equal to the preset red threshold, whether the blue value is less than or equal to the preset blue threshold, and whether the green value is greater than or equal to the preset green threshold, the red value is less than or equal to the preset red threshold, the blue value is less than or Pixels that are equal to the preset blue threshold and whose green value is greater than or equal to the preset green threshold are determined as target pixels, and the color value of each target pixel is assigned to the preset first color value, and each of the target pixels is divided into The color values of other pixels other than the target pixel are assigned to the preset Assume the second color value to obtain the binary image of the illuminance meter.
步骤S22,遍历所述照度计二值图,确定所述照度计二值图中预设第一色彩数值对应的至少一个的连通域;Step S22, traverse the binary image of the illuminance meter and determine at least one connected domain corresponding to the preset first color value in the binary image of the illuminance meter;
在本实施例中,具体地,遍历所述照度计二值图的全部像素点,根据预设的连通域算法,确定所述照度计二值图中预设第一色彩数值对应的至少一个的连通域,其中,所述连通域可以为全部连通域,可以为最大连通域,也可以为面积大于预设面积阈值的连通域。In this embodiment, specifically, all pixels of the binary image of the illuminance meter are traversed, and according to the preset connected domain algorithm, at least one corresponding to the preset first color value in the binary image of the illuminance meter is determined. A connected domain, wherein the connected domain can be all connected domains, a maximum connected domain, or a connected domain with an area greater than a preset area threshold.
在一种可实施的方式中,所述根据预设的连通域算法,确定所述照度计二值图中预设第一色彩数值对应的至少一个的连通域的步骤之后还可以包括:判断各所述连通域的面积是否大于或等于预设面积阈值,将面积大于或等于预设面积阈值的初始连通域保留,将面积小于预设面积阈值的初始连通域滤除,以减小干扰。In an implementable manner, the step of determining at least one connected domain corresponding to the preset first color value in the binary image of the illuminance meter according to the preset connected domain algorithm may further include: determining each Whether the area of the connected domain is greater than or equal to the preset area threshold, the initial connected domain whose area is greater than or equal to the preset area threshold is retained, and the initial connected domain whose area is smaller than the preset area threshold is filtered out to reduce interference.
在一种可实施的方式中,参照图3和图4,图3为本申请中照度计二值图的一种可实施方式的示意图,图4为本申请中照度计二值图的另一种可实施方式的示意图,图3中,预设第一色彩数值为白色对应的色彩数值,根据预设面积阈值对白色的连通域进行过滤,即可得到如图4所示的照度计二值图。In an implementable manner, refer to Figures 3 and 4. Figure 3 is a schematic diagram of an implementable manner of the binary diagram of the illuminance meter in this application, and Figure 4 is another binary diagram of the illuminance meter in this application. A schematic diagram of an implementable manner. In Figure 3, the first color value is preset to be the color value corresponding to white. The connected domain of white is filtered according to the preset area threshold to obtain the second value of the illuminance meter as shown in Figure 4. picture.
步骤S23,根据各所述连通域,确定数值显示区域。Step S23: Determine a numerical display area based on each connected domain.
在本实施例中,具体地,根据各所述连通域的规格、形状和/或位置等,从各所述连通域中确定数值显示区域对应的目标连通域,进而根据所述目标连通域确定数值显示区域的位置、规格和/或形状等,例如,可以将所述目标连通域的几何中心作为所述数值显示区域的几何中心,根据预设的数值显示区域的图形,即可确定数值显示区域,也可以将所述目标连通域对应的最小的预设外接图形,确定为数值显示区域,需要说明的是,所述连通域的规格、形状和位置等信息可以根据所述照度计的实际情况进行确定,本实施例对此不加以限制。In this embodiment, specifically, the target connected domain corresponding to the numerical display area is determined from each of the connected domains according to the specifications, shape and/or position of each of the connected domains, and then determined based on the target connected domain. The position, specification and/or shape of the numerical display area, etc., for example, the geometric center of the target connected domain can be used as the geometric center of the numerical display area, and the numerical display can be determined according to the preset graphic of the numerical display area. area, the smallest preset external graphic corresponding to the target connected domain can also be determined as the numerical display area. It should be noted that the specifications, shape, position and other information of the connected domain can be based on the actual conditions of the illuminance meter. The situation is determined, and this embodiment does not limit this.
在一实施例中,所述根据各所述连通域,确定数值显示区域的步骤包括:In one embodiment, the step of determining the numerical display area according to each of the connected domains includes:
步骤S231,根据预设参考区域的规格和形状,对各所述连通域进行图像识别,从各所述连通域中,确定与所述预设参考区域相似度最高的目标连通域;Step S231, perform image recognition on each of the connected domains according to the specifications and shape of the preset reference area, and determine the target connected domain with the highest similarity to the preset reference area from each of the connected domains;
步骤S232,将所述目标连通域的最小外接四边形,确定为所述照度计图像中的数值显示区域。Step S232: Determine the minimum circumscribed quadrilateral of the target connected domain as the numerical display area in the illuminance meter image.
在本实施例中,具体地,根据所述数值显示区域的实际形状和规格、所述数值显示区域与图像采集装置的位置关系等,确定预设参考区域的规格和形状,例如,若所述数值显示区域的实际形状为矩形,则所述照度计图像中的数值显示区域为四边形,若所述数值显示区域的实际形状为圆形,则所述照度计图像中的数值显示区域为椭圆形等,根据预设参考区域的规格和形状,对各所述连通域进行图像识别,从各所述连通域中,确定与所述预设参考区域相似度最高的目标连通域,计算确定所述目标连通域的最小外接四边形,将所述目标连通域的最小外接四边形,确定为所述照度计图像中的数值显示区域。In this embodiment, specifically, the specifications and shape of the preset reference area are determined based on the actual shape and specifications of the numerical display area, the positional relationship between the numerical display area and the image acquisition device, etc., for example, if If the actual shape of the numerical display area is a rectangle, then the numerical display area in the illuminance meter image is a quadrilateral. If the actual shape of the numerical display area is a circle, then the numerical display area in the illuminance meter image is an ellipse. etc., perform image recognition on each of the connected domains according to the specifications and shape of the preset reference area, determine the target connected domain with the highest similarity to the preset reference area from each of the connected domains, and calculate and determine the The minimum circumscribed quadrilateral of the target connected domain is determined as the numerical display area in the illuminance meter image.
在一种可实施的方式中,参照图4和图5,图5为本申请中照度计图像中的数值显示区域的一种可实施方式的示意图,根据图4中的白色连通域确定的最小外接四边形,即为图5中白色四边形框选的区域,也即,图5中白色四边形框中的区域即为数值显示区域。In an implementable manner, refer to Figures 4 and 5. Figure 5 is a schematic diagram of an implementable manner of the numerical display area in the illuminance meter image in this application. The minimum value determined according to the white connected domain in Figure 4 The circumscribed quadrilateral is the area selected by the white quadrilateral frame in Figure 5. That is, the area within the white quadrilateral frame in Figure 5 is the numerical display area.
步骤S30,对所述数值显示区域进行视角转换,得到数值图像;Step S30, perform perspective conversion on the numerical display area to obtain a numerical image;
在本实施例中,具体地,根据预设的视角转换算法对所述数值显示区域进行视角转换,得到数值图像,其中,所述数值图像可以为所述数值显示区域对应的图像进行视角转换后的图像,也可以为所述照度计图像进行视角转换后的图像,所述数值图像可以为所述数值显示区域对应的图像的正视图,也可以与正视图存在一定的转换偏差,所述视角转换的方式可以包括图像旋转,例如,若照度计倒挂,则需要将所述数值显示区域旋转180度后,才能识别到准确的数值,所述视角转换的方式包括图像旋转,所述视角转换的方式还可以包括平行投影、透视投影等,具体可以根据实际需要、测试结果等进行确定。 In this embodiment, specifically, the numerical display area is converted in perspective according to a preset perspective conversion algorithm to obtain a numerical image, wherein the numerical image can be an image corresponding to the numerical display area after perspective conversion. The image may also be an image obtained by converting the viewing angle of the illuminance meter image. The numerical image may be a front view of the image corresponding to the numerical display area, or there may be a certain conversion deviation from the front view. The viewing angle The conversion method may include image rotation. For example, if the illuminance meter is hung upside down, the numerical display area needs to be rotated 180 degrees before the accurate value can be recognized. The perspective conversion method includes image rotation. The perspective conversion method is Methods can also include parallel projection, perspective projection, etc., which can be determined based on actual needs, test results, etc.
步骤S40,从所述数值图像中识别得到照度计数值;Step S40, identify the illumination count value from the numerical image;
在本实施例中,具体地,可以通过图像识别、文字识别等方式,对所述数值图像中的数值字符进行识别,得到照度计数值,需要说明的是,若所述数值图像为所述数值显示区域对应的图像进行视角转换后的图像,则可以直接对所述数值图像中的数值字符进行识别,得到照度计数值,若所述数值图像为所述照度计图像进行视角转换后的图像,则所述从所述数值图像中识别得到照度计数值的步骤为,从所述数值图像的数值显示区域中识别得到照度计数值。In this embodiment, specifically, the numerical characters in the numerical image can be recognized through image recognition, text recognition, etc. to obtain the illumination count value. It should be noted that if the numerical image is the numerical value If the image corresponding to the display area is an image after perspective conversion, the numerical characters in the numerical image can be directly identified to obtain the illumination count value. If the numerical image is an image after perspective conversion of the illuminance meter image, Then, the step of identifying the illumination count value from the numerical image is to identify the illumination count value from the numerical display area of the numerical image.
在一实施例中,所述从所述数值图像中识别得到照度计数值的步骤包括:In one embodiment, the step of identifying illumination count values from the numerical image includes:
步骤S41,对所述数值图像进行二值化处理,得到数值二值图;Step S41: Binarize the numerical image to obtain a numerical binary image;
步骤S42,对所述数值二值图进行字符分割处理,得到至少一个字符二值图;Step S42: Perform character segmentation processing on the numerical binary image to obtain at least one character binary image;
步骤S43,将各所述字符二值图与预设的字符模板进行相似度匹配,根据相似度最高的字符模板,确定各所述字符二值图各自对应的数值识别结果;Step S43, perform similarity matching between each of the character binary images and a preset character template, and determine the numerical recognition results corresponding to each of the character binary images according to the character template with the highest similarity;
步骤S44,将各所述数值识别结果排列组合,得到照度计数值。Step S44: Arrange and combine the numerical recognition results to obtain the illumination count value.
在本实施例中,具体地,根据所述数值图像中数字与背景的颜色差异,对所述数值图像中的数值显示区域进行二值化处理,得到数值二值图,对所述数值二值图的行和列分别进行遍历,当检测到目标行或目标列的色彩数值相同时,将所述目标行或所述目标列作为边界,根据确定的至少一个边界对所述数值二值图进行字符分割处理,得到至少一个字符二值图,将各所述字符二值图量化为0和1的点阵,与预设的字符模板的量化为0和1的点阵相减,将全部点对应的差值的绝对值累加,将累加的和确定为误差值,误差值越大则相似度越低,从各所述字符模板中确定相似度最高的字符模板,将相似度最高的字符模板对应的数值字符,确定为各所述字符二值图各自对应的数值识别结果,将各所述数值识别结果依次排列组合,即可得到照度计数值,其中,所述数值二值图为所述数值显示区域对应的图像的二值图,所述预设的字符模板为数字、符号、中文、英文等字符中的一个或多个的组合对应的标准正视图的图像,所述照度计数值包括色温、亮度、照度等,需要说明的是,若数值显示区域中包括有不止一个照度计数值,可以根据各所述照度计数值在数值显示区域中的位置关系,确定各所述照度计数值对应的具体数值。In this embodiment, specifically, according to the color difference between the numbers and the background in the numerical image, the numerical display area in the numerical image is binarized to obtain a numerical binary image, and the numerical binary image is The rows and columns of the image are traversed respectively. When it is detected that the color values of the target row or the target column are the same, the target row or the target column is used as a boundary, and the numerical binary map is processed according to at least one determined boundary. Perform character segmentation processing to obtain at least one character binary image. Each of the character binary images is quantized into a dot matrix of 0 and 1, subtracted from the preset character template's quantized dot matrix of 0 and 1, and all points are The absolute values of the corresponding differences are accumulated, and the accumulated sum is determined as the error value. The larger the error value, the lower the similarity. The character template with the highest similarity is determined from each of the character templates, and the character template with the highest similarity is The corresponding numerical characters are determined as the corresponding numerical recognition results of each of the character binary diagrams. By arranging and combining the numerical recognition results in sequence, the illumination count value can be obtained, wherein the numerical binary diagram is the A binary image of the image corresponding to the numerical display area. The preset character template is an image of a standard front view corresponding to a combination of one or more of numbers, symbols, Chinese, English and other characters. The illumination count value includes Color temperature, brightness, illuminance, etc. It should be noted that if the numerical display area includes more than one illuminance count value, the corresponding illuminance count value can be determined according to the positional relationship of each of the illuminance count values in the numerical display area. specific value.
在一种可实施的方式中,如图6所示,对所述数值二值图进行字符分割处理,得到了八个字符二值图,将八个字符二值图与预设的字符模板进行相似度匹配,即可确定数值识别结果分别为“1”、“1”、“0.”、“5”、“6”、“1”、“2”和“1”,其中,若预先设定第一行为亮度,第二行为色温,则可以确定亮度为“110.5”,色温为“6121”。In an implementable manner, as shown in Figure 6, the numerical binary image is subjected to character segmentation processing to obtain eight character binary images, and the eight character binary images are combined with the preset character template. Similarity matching can determine that the numerical recognition results are "1", "1", "0.", "5", "6", "1", "2" and "1", among which, if preset Determine the brightness in the first line and the color temperature in the second line, then you can determine the brightness as "110.5" and the color temperature as "6121".
在一实施例中,所述从所述数值图像中识别得到照度计数值的步骤之后,还包括:In one embodiment, after the step of identifying and obtaining the illumination count value from the numerical image, the step further includes:
步骤S50,获取各所述照度计数值对应的光感元器件数值;Step S50: Obtain the light sensing component value corresponding to each illumination count value;
步骤S51,根据各所述照度计数值和各所述光感元器件数值,生成光感映射曲线。Step S51: Generate a light-sensing mapping curve based on each illumination count value and each light-sensing component value.
在本实施例中,具体地,获取与各所述照度计数值相同照度下,光感元器件检测到的光感元器件数值,以各所述光感元器件数值为横坐标,各所述光感元器件数值各自对应的照度计数值为纵坐标,拟合得到光感映射曲线,所述光感映射曲线应用于电视机中,用于根据环境对画面色温和亮度进行更精准正确的调节。In this embodiment, specifically, the value of the light-sensing component detected by the light-sensing component under the same illuminance as each of the illuminance count values is obtained. Taking the value of each of the light-sensing component as the abscissa, each of the The illumination count value corresponding to the value of the light-sensing component is the ordinate, and the light-sensing mapping curve is obtained by fitting. The light-sensing mapping curve is used in televisions to more accurately and correctly adjust the color temperature and brightness of the picture according to the environment. .
在一种可实施的方式中,参照图7,图7为本申请中光感映射曲线的一种可实施方式的示意图,图7中,横坐标为光感元器件亮度,纵坐标为照度计亮度,拟合得到的光感映射曲线的如图中虚线所示,拟合后得到光感元器件亮度与照度计亮度之间的函数关系为y=2.8327x+37.919。In an implementable manner, refer to Figure 7, which is a schematic diagram of an implementable manner of the light sensing mapping curve in this application. In Figure 7, the abscissa is the brightness of the light sensing component, and the ordinate is the illuminance meter. Brightness, the light-sensing mapping curve obtained by fitting is shown as the dotted line in the figure. After fitting, the functional relationship between the brightness of the light-sensing component and the brightness of the illuminance meter is y=2.8327x+37.919.
在本实施例中,通过获取照度计图像,识别所述照度计图像中的数值显示区域,获取了照度计上的数值显示区域的图像,进而通过对所述数值显示区域进行视角转换,得到数值图像,实现了对数值显示区域的图像的视角矫正,使得从侧面采集到的照度计图像,可以转换成正视图,进而通过从所述数值图像中识别得到照度计数值,实现了对侧面采集到 的照度计图像中的照度计数值的准确识别,与观测者从侧面进行观测的方式相比,通过视角转换和图像识别,可以有效降低人眼斜视产生的误差,提高了照度计数值识别的准确性,克服了解决现有技术观测到的照度计数值的准确性较低的技术问题。In this embodiment, by acquiring the illuminance meter image, identifying the numerical display area in the illuminance meter image, and obtaining the image of the numeric display area on the illuminance meter, and then converting the viewing angle of the numerical display area, the numerical value is obtained The image realizes the viewing angle correction of the image in the numerical display area, so that the illuminance meter image collected from the side can be converted into a front view, and then the illuminance count value is obtained from the numerical image, thereby realizing the illuminance meter image collected from the side. Accurate identification of illuminance count values in illuminance meter images. Compared with the way the observer observes from the side, through perspective conversion and image recognition, the error caused by human eye strabismus can be effectively reduced, and the accuracy of illuminance count value identification can be improved. It overcomes the technical problem of low accuracy of illumination counting values observed in the existing technology.
进一步地,在本申请照度计数值识别方法的另一实施例中,参照图8,所述对所述数值显示区域进行视角转换,得到数值图像的步骤包括:Further, in another embodiment of the illumination counting value identification method of the present application, referring to Figure 8, the step of converting the viewing angle of the numerical display area to obtain a numerical image includes:
步骤S31,根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标,其中,所述透视变换算法为:
Step S31, perform coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, where the perspective transformation algorithm is:
其中,为预设的透视变换矩阵,x、y、1为初始坐标,X、Y、Z为中间转换坐标,X’、Y’、Z’为透视坐标;in, is the preset perspective transformation matrix, x, y, 1 are the initial coordinates, X, Y, Z are the intermediate transformation coordinates, X', Y', Z' are the perspective coordinates;
在本实施例中,具体地,建立直角坐标系,确定所述数值显示区域中每个像素点在所述直角坐标系中的坐标,将各所述像素点的坐标代入透视变换算法中,对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标,其中,所述透视变换算法为:
In this embodiment, specifically, a rectangular coordinate system is established, the coordinates of each pixel point in the numerical display area in the rectangular coordinate system are determined, and the coordinates of each pixel point are substituted into the perspective transformation algorithm. The position of each pixel in the numerical display area is coordinate transformed to obtain perspective coordinates, where the perspective transformation algorithm is:
其中,为预设的透视变换矩阵,所述预设的透视变换矩阵可以根据实际情况预先进行数值的设定,x、y、1为初始坐标,X、Y、Z为中间转换坐标,由于变换图像不在同一水平面内,需要除以Z实现二维空间到三维空间的转换,得到的X’、Y’、Z’为透视坐标,所述根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换的过程包括两次坐标的转换,第一次是从(x,y,1)转换成(X,Y,Z),第二次是从(X,Y,Z)转换成(X’,Y’,Z’),需要说明的是,本实施例中两次转换的方式也可以通过公式变换的方式转化成一次坐标转换或超过两次坐标转换的方式,本实施例对此不加以限制。in, is a preset perspective transformation matrix. The preset perspective transformation matrix can be preset in value according to the actual situation. x, y, and 1 are the initial coordinates, and X, Y, and Z are the intermediate transformation coordinates. In the same horizontal plane, it is necessary to divide by Z to realize the conversion from two-dimensional space to three-dimensional space. The obtained X', Y', and Z' are perspective coordinates. According to the perspective transformation algorithm, the coordinates of each pixel in the numerical display area are The process of position coordinate conversion includes two coordinate conversions. The first time is from (x, y, 1) to (X, Y, Z), and the second time is from (X, Y, Z) to ( X', Y', Z'). It should be noted that the two transformation methods in this embodiment can also be converted into one coordinate transformation or more than two coordinate transformations through formula transformation. In this embodiment, No restrictions.
在一实施例中,所述根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标的步骤之前,还包括:In one embodiment, before the step of performing coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, the step further includes:
步骤S311,建立直角坐标系;Step S311, establish a rectangular coordinate system;
步骤S312,获取所述数值显示区域中至少一个预设代表点在所述直角坐标系中的初始坐标和透视坐标;Step S312: Obtain the initial coordinates and perspective coordinates of at least one preset representative point in the rectangular coordinate system in the numerical display area;
在本实施例中,具体地,建立直角坐标系,从所述数值显示区域中选取至少一个代表点,获取各所述代表点在所述直角坐标系中的初始坐标和透视坐标,其中,所述代表点可以为所述数值显示区域的顶点,可以为所述数值显示区域轮廓线上的点,也可以为所述数值显示区域中任意的可确定视角转换后的准确坐标的点。In this embodiment, specifically, a rectangular coordinate system is established, at least one representative point is selected from the numerical display area, and the initial coordinates and perspective coordinates of each representative point in the rectangular coordinate system are obtained, where, The representative point may be a vertex of the numerical display area, a point on the contour line of the numerical display area, or any point in the numerical display area from which accurate coordinates after perspective conversion can be determined.
步骤S313,将各所述代表点的初始坐标和透视坐标代入透视变换算法中,确定预设 的透视变换矩阵。Step S313: Substitute the initial coordinates and perspective coordinates of each representative point into the perspective transformation algorithm to determine the preset perspective transformation matrix.
在本实施例中,透视变换算法为:
In this embodiment, the perspective transformation algorithm is:
其中,为预设的透视变换矩阵,x、y、1为初始坐标,X、Y、Z为中间转换坐标,X’、Y’、Z’为透视坐标,将所述透视变换算法进行转换得到公式一:令a33=1,即可将公式一转换成公式二:将各所述代表点的初始坐标(xn,yn,1)和透射坐标(Xn’,Yn’,Zn’)代入公式二求解,即可确定透视变换矩阵的具体数值。in, is the preset perspective transformation matrix, x, y, 1 are the initial coordinates, X, Y, Z are the intermediate transformation coordinates, X', Y', Z' are the perspective coordinates. The perspective transformation algorithm is converted to obtain formula 1 : Let a 33 = 1, and formula 1 can be converted into formula 2: Substituting the initial coordinates (x n , yn , 1) and transmission coordinates (X n ', Y n ', Z n ') of each representative point into Formula 2 to solve, the perspective transformation matrix can be determined specific value.
在一种可实施的方式中,所述代表点的数量为4个,根据公式二即可得到公式三:其中,x1、y1为第一个代表点的初始坐标,X1’、Y1’为第一个代表点的透视坐标,x2、y2为第二个代表点的初始坐标,X2’、Y2’为第二个代表点的透视坐标,x3、y3为第三个代表点的初始坐标,X3’、Y3’为第三个代表点的透视坐标,x4、y4为第四个代表点的初始坐标,X4’、Y4’为第四个代表点的透视坐标,将四个代表点的初始坐标和透视坐标代入公式三,即可确定透视变换矩阵的具体数值。In an implementable manner, the number of representative points is 4. According to Formula 2, Formula 3 can be obtained: Among them, x 1 and y 1 are the initial coordinates of the first representative point, X 1 ' and Y 1 ' are the perspective coordinates of the first representative point, x 2 and y 2 are the initial coordinates of the second representative point, 2 ' and Y 2 ' are the perspective coordinates of the second representative point, x 3 and y 3 are the initial coordinates of the third representative point, X 3 ' and Y 3 ' are the perspective coordinates of the third representative point, x 4 , y 4 are the initial coordinates of the fourth representative point, X 4 ', Y 4 ' are the perspective coordinates of the fourth representative point. Substituting the initial coordinates and perspective coordinates of the four representative points into formula 3, the perspective transformation can be determined matrix specific value.
在一种可实施的方式中,参照图9,通过预设的透视变换矩阵,将数值显示区域延箭头方向映射于正视图平面上,即可得到数值图像。In an implementable manner, referring to FIG. 9 , a numerical image can be obtained by mapping the numerical display area on the front view plane along the direction of the arrow through a preset perspective transformation matrix.
步骤S32,基于各所述透视坐标,将所述数值显示区域中每个像素点的色彩数值,填入预设矩形区域中;Step S32: Based on each of the perspective coordinates, fill the color value of each pixel in the numerical display area into a preset rectangular area;
在本实施例中,具体地,预先根据实际情况在所述直角坐标系中确定预设矩形区域,各所述透视坐标均位于所述预设矩形区域中,将所述数值显示区域中每个像素点的色彩数值,赋值于各所述像素点各自对应的透视坐标的像素点。In this embodiment, specifically, a preset rectangular area is determined in the rectangular coordinate system in advance according to the actual situation, each of the perspective coordinates is located in the preset rectangular area, and each of the numerical display areas is The color value of the pixel is assigned to the pixel corresponding to the perspective coordinate of each pixel.
步骤S33,确定所述预设矩形区域中色彩数值为空的空值像素点; Step S33, determine the null pixels with empty color values in the preset rectangular area;
在本实施例中,具体地,将全部像素点的色彩数值赋值于对应的透视坐标的像素点后,检测所述预设矩形区域中是否存在色彩数值为空的空值像素点。In this embodiment, specifically, after assigning the color values of all pixels to the pixels of corresponding perspective coordinates, it is detected whether there are null pixels with empty color values in the preset rectangular area.
步骤S34,根据与各所述空值像素点相邻的像素点的色彩数值,确定各所述空值像素点的色彩数值,得到数值图像。Step S34: Determine the color value of each null pixel point based on the color value of the pixel point adjacent to each null value pixel point, and obtain a numerical image.
在本实施例中,具体地,若所述预设矩形区域中存在色彩数值为空的空值像素点,则计算与各所述空值像素点相邻的像素点的色彩数值的平均值或中位值等,将与各所述空值像素点相邻的像素点的色彩数值的平均值或中位值等,确定为各所述空值像素点的色彩数值,直至所述预设矩形区域中不存在色彩数值为空的空值像素点,则得到视角转换后的数值图像;若所述预设矩形区域中存在色彩数值为空的空值像素点,则得到视角转换后的数值图像。In this embodiment, specifically, if there are null pixels with empty color values in the preset rectangular area, then the average value of the color values of the pixels adjacent to each of the null pixels is calculated or The median value, etc., determines the average or median value of the color values of the pixels adjacent to each of the null value pixels as the color value of each of the null value pixels, until the preset rectangle If there are no null pixels with empty color values in the area, then a numerical image after the viewing angle conversion is obtained; if there are null pixels with empty color values in the preset rectangular area, then a numerical image after the viewing angle conversion is obtained .
在一种可实施的方式中,参照图10和图11,其中,图10中白色四边形框内为数值显示区域,经过如上所述的视角转换处理之后,得到如图11所示的近似正视图的数值图像。In an implementable manner, refer to Figures 10 and 11, wherein the white quadrilateral frame in Figure 10 is the numerical display area. After the perspective conversion process as described above, an approximate front view as shown in Figure 11 is obtained. numerical image.
在本实施例中,通过透射变换矩阵,可以将从侧面拍摄到的数值显示区域的图像,较好地矫正为正面视角,进而有利于提高后续数值识别的准确性。In this embodiment, through the transmission transformation matrix, the image of the numerical display area captured from the side can be better corrected to a frontal view, thereby helping to improve the accuracy of subsequent numerical recognition.
进一步地,本申请还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述的照度计数值识别方法的步骤。Furthermore, the present application also provides a computer program product, including a computer program that implements the steps of the illumination count value identification method as described above when executed by a processor.
本申请提供的计算机程序产品解决了解决现有技术观测到的照度计数值的准确性较低的技术问题。与现有技术相比,本申请实施例提供的计算机程序产品的有益效果与上述实施例提供的照度计数值识别方法的有益效果相同,在此不做赘述。The computer program product provided by this application solves the technical problem of low accuracy of illumination count values observed in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiments of the present application are the same as the beneficial effects of the illumination count value identification method provided by the above embodiments, and will not be described again here.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利处理范围内。 The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of the present application may be directly or indirectly used in other related technical fields. , are all similarly included in the patent processing scope of this application.

Claims (15)

  1. 一种照度计数值识别方法,其中,所述照度计数值识别方法包括以下步骤:An illumination count value identification method, wherein the illumination count value identification method includes the following steps:
    获取照度计图像;Get the light meter image;
    识别所述照度计图像中的数值显示区域;Identify the numerical display area in the illuminance meter image;
    对所述数值显示区域进行视角转换,得到数值图像;Perform perspective conversion on the numerical display area to obtain a numerical image;
    从所述数值图像中识别得到照度计数值。Illuminance count values are identified from the numerical image.
  2. 如权利要求1所述照度计数值识别方法,其中,所述识别所述照度计图像中的数值显示区域的步骤包括:The illumination count value identification method according to claim 1, wherein the step of identifying the numerical display area in the illumination meter image includes:
    基于预设颜色阈值对所述照度计图像进行二值化处理,得到照度计二值图;Binarize the illuminance meter image based on a preset color threshold to obtain a binary image of the illuminance meter;
    遍历所述照度计二值图,确定所述照度计二值图中预设第一色彩数值对应的至少一个的连通域;Traverse the binary image of the illuminance meter and determine at least one connected domain corresponding to the preset first color value in the binary image of the illuminance meter;
    根据各所述连通域,确定数值显示区域。According to each connected domain, a numerical display area is determined.
  3. 如权利要求2所述照度计数值识别方法,其中,所述预设颜色阈值包括预设红色阈值、预设绿色阈值和预设蓝色阈值,所述基于预设颜色阈值对所述照度计图像进行二值化处理,得到照度计二值图的步骤包括:The illuminance count value identification method according to claim 2, wherein the preset color threshold includes a preset red threshold, a preset green threshold and a preset blue threshold, and the illuminance meter image is evaluated based on the preset color threshold. The steps to perform binarization processing to obtain the binary image of the illuminance meter include:
    获取所述照度计图像中每个像素点的色彩数值,所述色彩数值包括红色值、绿色值和蓝色值;Obtain the color value of each pixel in the illuminance meter image, where the color value includes a red value, a green value and a blue value;
    将各所述色彩数值与预设颜色阈值进行比较,确定红色值小于或等于预设红色阈值、蓝色值小于或等于预设蓝色阈值且绿色值大于或等于预设绿色阈值的目标像素点;Compare each color value with a preset color threshold to determine a target pixel whose red value is less than or equal to the preset red threshold, whose blue value is less than or equal to the preset blue threshold, and whose green value is greater than or equal to the preset green threshold. ;
    将各所述目标像素点的色彩数值赋值为预设第一色彩数值,并将除各所述目标像素点之外的其他像素点的色彩数值赋值为预设第二色彩数值,得到照度计二值图。Assign the color value of each target pixel point as a preset first color value, and assign the color values of other pixels except each of the target pixel points as a preset second color value to obtain an illuminance meter. value graph.
  4. 如权利要求3所述照度计数值识别方法,其中,所述遍历所述照度计二值图,确定所述照度计二值图中预设第一色彩数值对应的至少一个的连通域的步骤之后还可以包括:The illuminance count value identification method according to claim 3, wherein after the step of traversing the illuminance meter binary map and determining at least one connected domain corresponding to the preset first color value in the illuminance meter binary map May also include:
    判断各所述连通域的面积是否大于或等于预设面积阈值;Determine whether the area of each connected domain is greater than or equal to a preset area threshold;
    将面积大于或等于预设面积阈值的初始连通域保留;Keep the initial connected domains whose area is greater than or equal to the preset area threshold;
    将面积小于预设面积阈值的初始连通域滤除。The initial connected domains whose area is smaller than the preset area threshold are filtered out.
  5. 如权利要求2所述照度计数值识别方法,其中,所述根据各所述连通域,确定数值显示区域的步骤包括:The illumination count value identification method according to claim 2, wherein the step of determining the numerical display area according to each of the connected domains includes:
    根据预设参考区域的规格和形状,对各所述连通域进行图像识别,从各所述连通域中,确定与所述预设参考区域相似度最高的目标连通域;Perform image recognition on each of the connected domains according to the specifications and shape of the preset reference area, and determine the target connected domain with the highest similarity to the preset reference area from each of the connected domains;
    将所述目标连通域的最小外接四边形,确定为所述照度计图像中的数值显示区域。The minimum circumscribed quadrilateral of the target connected domain is determined as the numerical display area in the illuminance meter image.
  6. 如权利要求1所述照度计数值识别方法,其中,所述对所述数值显示区域进行视角转换,得到数值图像的步骤包括:The illumination count value identification method according to claim 1, wherein the step of converting the viewing angle of the numerical display area to obtain the numerical image includes:
    根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标,其中,所述透视变换算法为:
    Perform coordinate transformation on the position of each pixel in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, where the perspective transformation algorithm is:
    其中,为预设的透视变换矩阵,x、y、1为初始坐标,X、Y、Z为中间转换坐标,X’、Y’、Z’为透视坐标;in, is the preset perspective transformation matrix, x, y, 1 are the initial coordinates, X, Y, Z are the intermediate transformation coordinates, X', Y', Z' are the perspective coordinates;
    基于各所述透视坐标,将所述数值显示区域中每个像素点的色彩数值,填入预设矩形区域中;Based on each of the perspective coordinates, fill the color value of each pixel in the numerical display area into a preset rectangular area;
    确定所述预设矩形区域中色彩数值为空的空值像素点;Determine the null pixels with empty color values in the preset rectangular area;
    根据与各所述空值像素点相邻的像素点的色彩数值,确定各所述空值像素点的色彩数值,得到数值图像。According to the color value of the pixel points adjacent to each of the null value pixel points, the color value of each of the null value pixel points is determined to obtain a numerical image.
  7. 如权利要求6所述照度计数值识别方法,其中,所述根据与各所述空值像素点相邻的像素点的色彩数值,确定各所述空值像素点的色彩数值,得到数值图像的步骤包括:The illumination count value identification method according to claim 6, wherein the color value of each of the null value pixels is determined based on the color value of the pixel point adjacent to each of the null value pixel points, and the numerical value of the numerical image is obtained. Steps include:
    若所述预设矩形区域中存在色彩数值为空的空值像素点,计算与各所述空值像素点相邻的像素点的色彩数值的平均值或中位值;If there are null pixels with empty color values in the preset rectangular area, calculate the average or median value of the color values of pixels adjacent to each of the null pixels;
    将与各所述空值像素点相邻的像素点的色彩数值的平均值或中位值确定为各所述空值像素点的色彩数值;Determine the average or median value of the color values of the pixels adjacent to each of the null-value pixels as the color value of each of the null-value pixels;
    直至所述预设矩形区域中不存在色彩数值为空的空值像素点,得到视角转换后的数值图像。Until there are no null pixels with empty color values in the preset rectangular area, a numerical image after viewing angle conversion is obtained.
  8. 如权利要求6所述照度计数值识别方法,其中,所述根据透视变换算法对所述数值显示区域中每个像素点的位置进行坐标转换,得到透视坐标的步骤之前,还包括:The illumination count value identification method according to claim 6, wherein before the step of performing coordinate transformation on the position of each pixel point in the numerical display area according to a perspective transformation algorithm to obtain perspective coordinates, the step further includes:
    建立直角坐标系;Establish a rectangular coordinate system;
    获取所述数值显示区域中至少一个预设代表点在所述直角坐标系中的初始坐标和透视坐标;Obtain the initial coordinates and perspective coordinates of at least one preset representative point in the rectangular coordinate system in the numerical display area;
    将各所述代表点的初始坐标和透视坐标代入透视变换算法中,确定预设的透视变换矩阵。The initial coordinates and perspective coordinates of each representative point are substituted into the perspective transformation algorithm to determine a preset perspective transformation matrix.
  9. 如权利要求1所述照度计数值识别方法,其中,所述从所述数值图像中识别得到照度计数值的步骤包括:The illumination count value identification method according to claim 1, wherein the step of identifying the illumination count value from the numerical image includes:
    对所述数值图像进行二值化处理,得到数值二值图;Perform binarization processing on the numerical image to obtain a numerical binary image;
    对所述数值二值图进行字符分割处理,得到至少一个字符二值图;Perform character segmentation processing on the numerical binary image to obtain at least one character binary image;
    将各所述字符二值图与预设的字符模板进行相似度匹配,根据相似度最高的字符模板,确定各所述字符二值图各自对应的数值识别结果;Perform similarity matching between each of the character binary images and a preset character template, and determine the numerical recognition results corresponding to each of the character binary images according to the character template with the highest similarity;
    将各所述数值识别结果排列组合,得到照度计数值。The numerical recognition results are arranged and combined to obtain the illumination count value.
  10. 如权利要求1所述照度计数值识别方法,其中,所述从所述数值图像中识别得到照度计数值的步骤之后,还包括:The illumination count value identification method according to claim 1, wherein after the step of identifying the illumination count value from the numerical image, it further includes:
    获取各所述照度计数值对应的光感元器件数值;Obtain the light sensing component value corresponding to each illumination count value;
    根据各所述照度计数值和各所述光感元器件数值,生成光感映射曲线。 According to each of the illumination count values and the values of each of the light-sensing components, a light-sensing mapping curve is generated.
  11. 如权利要求1所述照度计数值识别方法,其中,所述数值显示区域为所述照度计上显示测量结果的区域,所述数值显示区域为所述照度计的显示屏的至少部分区域。The illumination counting value identification method according to claim 1, wherein the numerical display area is an area on the illuminance meter that displays measurement results, and the numerical display area is at least part of a display screen of the illuminance meter.
  12. 如权利要求1所述照度计数值识别方法,其中,所述识别所述照度计图像中的数值显示区域的步骤之后,还包括:The illumination count value identification method according to claim 1, wherein after the step of identifying the numerical display area in the illumination meter image, it further includes:
    从所述照度计图像中切割所述数值显示区域,保留所述数值显示区域,去除所述数值显示区域之外的其他部分。Cut the numerical display area from the illuminance meter image, retain the numerical display area, and remove other parts outside the numerical display area.
  13. 如权利要求1所述照度计数值识别方法,其中,所述识别所述照度计图像中的数值显示区域的步骤包括:The illumination count value identification method according to claim 1, wherein the step of identifying the numerical display area in the illumination meter image includes:
    通过图像识别技术,识别所述照度计图像中的形状、规格和颜色,确定所述照度计图像中的数值显示区域。Through image recognition technology, the shape, specification and color in the illuminance meter image are recognized, and the numerical display area in the illuminance meter image is determined.
  14. 一种电子设备,其中,所述电子设备包括:An electronic device, wherein the electronic device includes:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至13中任一项所述的照度计数值识别方法的步骤。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can perform any one of claims 1 to 13 The steps of the illumination count value identification method.
  15. 一种存储介质,其中,所述存储介质为计算机可读存储介质,所述计算机可读存储介质上存储有实现照度计数值识别方法的程序,所述实现照度计数值识别方法的程序被处理器执行以实现如权利要求1至13中任一项所述照度计数值识别方法的步骤。 A storage medium, wherein the storage medium is a computer-readable storage medium, and a program for implementing an illuminance count value recognition method is stored on the computer-readable storage medium, and the program for implementing the illuminance count value recognition method is executed by a processor to implement the steps of the illuminance count value recognition method as described in any one of claims 1 to 13.
PCT/CN2023/078535 2022-09-13 2023-02-27 Illuminometer value identification method, electronic device, and storage medium WO2024055531A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211110091.5A CN115457055A (en) 2022-09-13 2022-09-13 Illuminance meter value identification method, electronic device, and storage medium
CN202211110091.5 2022-09-13

Publications (1)

Publication Number Publication Date
WO2024055531A1 true WO2024055531A1 (en) 2024-03-21

Family

ID=84303020

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/078535 WO2024055531A1 (en) 2022-09-13 2023-02-27 Illuminometer value identification method, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN115457055A (en)
WO (1) WO2024055531A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115457055A (en) * 2022-09-13 2022-12-09 深圳创维-Rgb电子有限公司 Illuminance meter value identification method, electronic device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006309405A (en) * 2005-04-27 2006-11-09 Chugoku Electric Power Co Inc:The Meter recognition system, meter recognition method, and meter recognition program
CN204598390U (en) * 2015-04-21 2015-08-26 利亚德光电股份有限公司 For brightness control system and the electronic equipment display of electronic equipment display
CN105740856A (en) * 2016-01-28 2016-07-06 宁波理工监测科技股份有限公司 Method for reading readings of pointer instrument based on machine vision
US20190095739A1 (en) * 2017-09-27 2019-03-28 Harbin Institute Of Technology Adaptive Auto Meter Detection Method based on Character Segmentation and Cascade Classifier
KR102150200B1 (en) * 2019-05-31 2020-08-31 경성대학교 산학협력단 Apparatus for recognizing an image of diagnosis instrument having 7-segment
CN113449639A (en) * 2021-06-29 2021-09-28 深圳市海亿达科技股份有限公司 Non-contact data acquisition method for instrument by gateway of Internet of things
CN114219760A (en) * 2021-11-12 2022-03-22 深圳市优必选科技股份有限公司 Reading identification method and device of instrument and electronic equipment
CN114999371A (en) * 2022-04-14 2022-09-02 深圳创维-Rgb电子有限公司 Regional light control method, device, equipment and readable storage medium
CN115457055A (en) * 2022-09-13 2022-12-09 深圳创维-Rgb电子有限公司 Illuminance meter value identification method, electronic device, and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006309405A (en) * 2005-04-27 2006-11-09 Chugoku Electric Power Co Inc:The Meter recognition system, meter recognition method, and meter recognition program
CN204598390U (en) * 2015-04-21 2015-08-26 利亚德光电股份有限公司 For brightness control system and the electronic equipment display of electronic equipment display
CN105740856A (en) * 2016-01-28 2016-07-06 宁波理工监测科技股份有限公司 Method for reading readings of pointer instrument based on machine vision
US20190095739A1 (en) * 2017-09-27 2019-03-28 Harbin Institute Of Technology Adaptive Auto Meter Detection Method based on Character Segmentation and Cascade Classifier
KR102150200B1 (en) * 2019-05-31 2020-08-31 경성대학교 산학협력단 Apparatus for recognizing an image of diagnosis instrument having 7-segment
CN113449639A (en) * 2021-06-29 2021-09-28 深圳市海亿达科技股份有限公司 Non-contact data acquisition method for instrument by gateway of Internet of things
CN114219760A (en) * 2021-11-12 2022-03-22 深圳市优必选科技股份有限公司 Reading identification method and device of instrument and electronic equipment
CN114999371A (en) * 2022-04-14 2022-09-02 深圳创维-Rgb电子有限公司 Regional light control method, device, equipment and readable storage medium
CN115457055A (en) * 2022-09-13 2022-12-09 深圳创维-Rgb电子有限公司 Illuminance meter value identification method, electronic device, and storage medium

Also Published As

Publication number Publication date
CN115457055A (en) 2022-12-09

Similar Documents

Publication Publication Date Title
ES2863368T3 (en) Image processing method, storage medium and electronic apparatus
CN109104596B (en) Projection system and correction method of display image
US9325968B2 (en) Stereo imaging using disparate imaging devices
US9710109B2 (en) Image processing device and image processing method
WO2019137038A1 (en) Method for determining point of gaze, contrast adjustment method and device, virtual reality apparatus, and storage medium
CN110300292B (en) Projection distortion correction method, device, system and storage medium
US10319104B2 (en) Method and system for determining datum plane
TWI719493B (en) Image projection system, image projection apparatus and calibrating method for display image thereof
CN102508574A (en) Projection-screen-based multi-touch detection method and multi-touch system
US10168984B2 (en) Image receiving apparatus and method thereof for determining an orientation of a screen of an electronic apparatus
CN109313797B (en) Image display method and terminal
WO2024055531A1 (en) Illuminometer value identification method, electronic device, and storage medium
CN111694528A (en) Method for identifying typesetting of display wall and electronic device using same
WO2011096571A1 (en) Input device
CN110047126B (en) Method, apparatus, electronic device, and computer-readable storage medium for rendering image
KR20140090538A (en) Display apparatus and controlling method thereof
JP6971788B2 (en) Screen display control method and screen display control system
US20090046063A1 (en) Coordinate positioning system and method with in-the-air positioning function
KR102505951B1 (en) Apparatus and method for providing image, and computer program recorded on computer readable medium for excuting the method
WO2022105277A1 (en) Projection control method and apparatus, projection optical machine, and readable storage medium
US20180061135A1 (en) Image display apparatus and image display method
CN112291445B (en) Image processing method, device, equipment and storage medium
US10969865B2 (en) Method for transmission of eye tracking information, head mounted display and computer device
CN108921097B (en) Human eye visual angle detection method and device and computer readable storage medium
CN107506031B (en) VR application program identification method and electronic equipment