CN113538343B - Matrix car lamp correction method and device, electronic equipment and storage medium - Google Patents

Matrix car lamp correction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113538343B
CN113538343B CN202110718611.XA CN202110718611A CN113538343B CN 113538343 B CN113538343 B CN 113538343B CN 202110718611 A CN202110718611 A CN 202110718611A CN 113538343 B CN113538343 B CN 113538343B
Authority
CN
China
Prior art keywords
lamp
matrix
target
preset
light type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110718611.XA
Other languages
Chinese (zh)
Other versions
CN113538343A (en
Inventor
白鹏飞
李世晓
覃元锋
金名亮
张新觉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Huoding Technology Co ltd
Original Assignee
Guangdong Huoding Technology Co ltd
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 Guangdong Huoding Technology Co ltd filed Critical Guangdong Huoding Technology Co ltd
Priority to CN202110718611.XA priority Critical patent/CN113538343B/en
Publication of CN113538343A publication Critical patent/CN113538343A/en
Application granted granted Critical
Publication of CN113538343B publication Critical patent/CN113538343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Lighting Device Outwards From Vehicle And Optical Signal (AREA)

Abstract

The invention discloses a matrix car lamp correction method, a device, electronic equipment and a storage medium, and relates to the technical field of automatic control, wherein the matrix car lamp correction method comprises the following steps: acquiring a target discrimination area of a matrix car lamp, and acquiring a car lamp light type image corresponding to the target discrimination area; acquiring a target brightness of the vehicle lamp according to the light type image of the vehicle lamp; comparing the target brightness with a preset brightness, and if the target brightness is smaller than or equal to the preset brightness, matching the light type image with a preset image mask; if the car light type image is consistent with the preset image mask, acquiring a boundary rectangle of a light source according to the car light type image; and correcting the target discrimination area according to the boundary rectangle. According to the matrix car lamp correction method, the camera identification area can be automatically calibrated, and the installation efficiency and the control accuracy of the intelligent matrix car lamp are improved.

Description

Matrix car lamp correction method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of automatic control technologies, and in particular, to a method and apparatus for correcting a matrix vehicle lamp, an electronic device, and a storage medium.
Background
The intelligent matrix car light comprises a light beam matrix composed of individually activatable light emitting diodes, the matrix of the low beam headlight comprises 48 LED point light sources, and the matrix of the high beam headlight comprises 27 LED point light sources, besides, the matrix headlight also comprises other various LED point light sources, including short-distance illumination and signal functions (daytime running lights, turning lights, position lights and dynamic turn indicator lights). A plurality of illumination subareas are arranged on the matrix car lamp, the LED lamp beads in each subarea can be turned on and off under the control of a computer, and brightness adjustment is carried out, so that the functions of automatic on-off, automatic switching of far-near lights, anti-dazzling far-light, automatic adjustment of illumination height and the like of the headlight are realized, and not only can dazzling of vehicles of a counterpart caused by meeting or close-distance following be avoided, but also night driving is easier and safer.
Along with the continuous popularization of intelligent matrix car lights, the intelligent matrix car light control system brings a lot of inconveniences during installation, especially when installing a camera, the installation position and the shooting angle are horizontally offset, so that the intelligent control system recognizes that the target area deviates from the corresponding car light control area, and the control of the matrix car lights by the car light control system is influenced.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the embodiment of the invention provides a matrix car lamp correction method, and by executing the matrix car lamp correction method of the embodiment of the first aspect of the invention, the identification area of the camera can be automatically calibrated, and the installation efficiency and the control accuracy of the intelligent matrix car lamp are improved.
The embodiment of the invention also provides a matrix car lamp correction device.
The embodiment of the invention also provides electronic equipment.
The embodiment of the invention also provides a computer readable storage medium.
According to an embodiment of the first aspect of the present invention, a matrix vehicle lamp correction method includes:
acquiring a target discrimination area of a matrix car lamp, and acquiring a car lamp light type image corresponding to the target discrimination area;
Acquiring a target brightness of the vehicle lamp according to the light type image of the vehicle lamp;
Comparing the target brightness with a preset brightness, and if the target brightness is smaller than or equal to the preset brightness, matching the light type image with a preset image mask;
If the car light type image is consistent with the preset image mask, acquiring a boundary rectangle of a light source according to the car light type image;
And correcting the target discrimination area according to the boundary rectangle.
The matrix car lamp correction method according to the embodiment of the first aspect of the invention has at least the following beneficial effects: the shape and the position information of matrix car light of the car are automatically acquired, the array discrimination area of the intelligent car light control system is automatically calibrated, namely, the car light discrimination area coordinates of the intelligent car light control system are calibrated through the boundaries of the light, so that the car light control system discrimination area is consistent with the actual illumination area of the matrix car light, the camera recognition area can be automatically calibrated, and the installation efficiency and the control accuracy of the intelligent matrix car light are improved.
According to some embodiments of the invention, the correcting the target discrimination area according to the bounding rectangle includes: acquiring left and right boundary abscissas of the boundary rectangle; and correcting the abscissa of the target discrimination area according to the left boundary abscissa and the right boundary abscissa.
According to some embodiments of the invention, after the correcting the target discrimination area according to the bounding rectangle, further comprising: storing the corrected abscissa of the target discrimination area; and executing the step of acquiring the target discrimination area of the matrix car lamp.
According to some embodiments of the invention, the acquiring the target brightness according to the light type image of the light type comprises: acquiring a color space image according to the car light type image; and extracting the brightness of the target lamp according to the color space image.
According to some embodiments of the invention, after the comparing the target brightness with a preset brightness, the method further comprises: and if the target brightness is larger than the preset brightness, executing the step of acquiring the target judging area of the matrix car lamp.
According to some embodiments of the invention, after the matching the light type image of the vehicle light with a preset image mask, the method further includes: and if the light type image of the vehicle lamp is inconsistent with the preset image mask, executing the step of acquiring the target discrimination area of the matrix vehicle lamp.
According to some embodiments of the invention, the obtaining the target discrimination area of the matrix car light includes: acquiring a preset judging column number of the matrix car lamp; dividing the matrix car lamp into a plurality of preset judging areas according to the preset judging column number; and selecting the target discrimination area from the plurality of preset discrimination areas.
A matrix vehicle lamp correction device according to an embodiment of the second aspect of the present invention includes:
The first acquisition module is used for acquiring a target discrimination area of the matrix car lamp and acquiring a car lamp light type image corresponding to the target discrimination area;
the second acquisition module is used for acquiring the target brightness of the vehicle lamp according to the light type image of the vehicle lamp;
The comparison module is used for comparing the target brightness with a preset brightness, and if the target brightness is smaller than or equal to the preset brightness, the light type image of the light type is matched with a preset image mask;
the third acquisition module is used for acquiring a boundary rectangle of the light source according to the car light type image if the car light type image is consistent with the preset image mask;
And the correction module is used for correcting the target discrimination area according to the boundary rectangle.
The matrix car light correction device according to the embodiment of the second aspect of the invention has at least the following beneficial effects: by executing the matrix car light correction method of the embodiment of the first aspect of the invention, the camera identification area can be automatically calibrated, and the installation efficiency and the control accuracy of the intelligent matrix car light are improved.
An electronic device according to an embodiment of a third aspect of the present invention includes: at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions that are executed by the at least one processor to cause the at least one processor to implement a matrix vehicle lamp correction method according to the first aspect when the instructions are executed.
The electronic equipment according to the embodiment of the third aspect of the invention has at least the following beneficial effects: by executing the matrix car lamp correction method provided by the embodiment of the first aspect of the invention, the camera identification area can be automatically calibrated, and the installation efficiency and the control accuracy of the intelligent matrix car lamp are improved.
A computer-readable storage medium according to an embodiment of the fourth aspect of the present invention stores computer-executable instructions for causing a computer to execute a matrix lamp correction method according to the first aspect.
The computer-readable storage medium according to the embodiment of the fourth aspect of the present invention has at least the following advantageous effects: by executing the matrix car lamp correction method according to the embodiment of the first aspect of the invention, the camera identification area can be automatically calibrated, and the installation efficiency and the control accuracy of the intelligent matrix car lamp can be improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
FIG. 1 is a schematic flow chart of a matrix vehicle lamp correction method according to an embodiment of the invention;
FIG. 2 is a schematic diagram showing a relationship between a projection of a matrix lamp and an initial discrimination area according to an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a matrix vehicle lamp projection and initial discrimination area shift according to an embodiment of the present invention;
FIG. 4A is a schematic diagram of a matrix lamp projection and target determination area according to an embodiment of the present invention;
FIG. 4B is a schematic diagram of a matrix lamp projection and target discrimination area according to another embodiment of the present invention;
FIG. 4C is a schematic diagram illustrating a matrix lamp projection and target discrimination area according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of a matrix vehicle lamp projection after correcting a target discrimination area according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a matrix lamp correction device according to an embodiment of the present invention;
fig. 7 is a functional block diagram of an electronic device according to an embodiment of the present invention.
Reference numerals:
The device comprises a first acquisition module 600, a second acquisition module 610, a comparison module 620, a third acquisition module 630, a correction module 640, a processor 700, a memory 710, a data transmission module 720, a camera 730 and a display screen 740.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the description of the present invention, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly and the specific meaning of the terms in the present invention can be reasonably determined by a person skilled in the art in combination with the specific contents of the technical scheme.
First, several nouns involved in the present application are parsed:
1. HSV: hue Saturation Value is a color space created by a.r. Smith in 1978, also called a hexagonal pyramid model (Hexcone Model), based on visual characteristics of the color. The hexagonal boundaries represent color, the horizontal axis represents purity, and the brightness is measured along the vertical axis. The way HSV expresses a color image consists of three parts: hue, saturation, color purity, and Value.
2. BGR: RGB stands for red (red) green (green) blue (blue). In most cases, the RGB colors are stored in a structured or unsigned integer, with blue occupying the least significant "area" (bytes in 32-bit and 24-bit formats), green second least, and red third least. BGR is the same as RGB, but the region order is reversed: red occupies the least important area, green occupies the second (rest) and blue occupies the third.
Referring to fig. 1, a matrix lamp correction method according to an embodiment of the first aspect of the present invention includes:
Step S100, a target discrimination area of the matrix car lamp is obtained, and a car lamp light type image corresponding to the target discrimination area is obtained.
The target distinguishing area can be a train of lamps which are sequentially started by the matrix lamps in a running lamp mode when the installation of the cameras is deviated; the light type image of the car light can be a light type image of a matrix car light projected on a wall surface in the current case. Optionally, the matrix car light projection may be divided into a plurality of discrimination areas according to the requirement in advance, and the plurality of discrimination areas may be used as an initial discrimination area. Referring to a schematic diagram of the relationship between the projection of the matrix lamp and the initial discrimination area shown in fig. 2, a dotted rectangle shown as a is the projection of the matrix lamp on the wall surface D, that is, the camera identification area, and A1 is the first initial discrimination area, and the discrimination area can be divided into a plurality of initial discrimination areas shown as A1. The rectangular area shown in D is a wall surface, C1 is the light projection of the matrix lamp of the first square on the wall surface, when the installation of the camera is deviated (the embodiment of the invention uses the horizontal deviation of the installation of the camera as an example), the light type and the initial discrimination area of the matrix lamp are shifted, as shown in the structural schematic diagram of the shift of the matrix lamp projection and the initial discrimination area shown in fig. 3, the position of the matrix lamp projection a in the field of view of the camera is deviated, and the control accuracy of the matrix lamp is reduced. Therefore, the camera at this time needs to be corrected, and automatic calibration of the camera identification area a is realized. Specifically, the matrix car lights can be controlled to sequentially turn on a train light, the projection of the 1 st train light can be calibrated as a target judging area, and when the projection of the 1 st train light is used as the target judging area, a car light type image corresponding to the rectangular light type as the target judging area, which is generated by the projection of the 1 st train light on the wall surface, can be obtained; after correcting the projection of the 1 st train lamp, the projection of the 2 nd train lamp can be used as a target judging area for calibration, and when the projection of the 2 nd train lamp is used as the target judging area, a car light type image corresponding to the rectangular light type generated by the projection of the 2 nd train lamp on the wall surface as the target judging area can be obtained; and calibrating the projection of each train lamp in sequence until the projection calibration of the matrix lamp is finished, calibrating the projection of the last train (namely, the 12 th train) lamp as a target discrimination area, and generating a car light type image corresponding to the matrix light type as the target discrimination area by transmitting the 12 th train lamp on the wall surface.
Step S110, obtaining the target brightness according to the light type image of the vehicle light.
The target brightness may be an HSV image brightness of a lamp light type image. Optionally, assuming that the projection of the first train lamp is used as the target discrimination area, the light type image of the lamp corresponding to the first train lamp can be extracted into an HSV image, that is, the light type image of the lamp (the light type image is set as BGR image) is converted into the HSV image, and then the brightness information of the V channel image can be obtained according to the HSV image, that is, the brightness of the target lamp is obtained.
And step S120, comparing the target brightness with the preset brightness, and if the target brightness is smaller than or equal to the preset brightness, matching the light type image with a preset image mask.
The preset brightness can be a critical threshold corresponding to the target brightness; the preset image mask may be a preset image obtained by masking a selected image, pattern or object to control an area of image processing or a processing procedure. Optionally, the preset brightness of the vehicle lamp can be set according to requirements. The target illuminance can be compared with the preset illuminance, and whether the target illuminance is within the preset illuminance threshold range is judged. If the judging result is yes, matching the car light type image with the preset image mask, judging whether the car light type image and the preset image mask are consistent, and obtaining a comparison result that the car light type image and the preset image mask are consistent or obtaining a comparison result that the car light type image and the preset image mask are inconsistent.
Step S130, if the car light type image is consistent with the preset image mask, acquiring a boundary rectangle of the light source according to the car light type image.
The boundary rectangle can be the shape of the matrix car light and can comprise the shape and position information of the matrix car light. Optionally, if the light type image of the vehicle light is consistent with the preset image mask, the camera may be calibrated according to the light type image of the vehicle light. Specifically, a matrix vehicle light source boundary rectangle can be obtained through a vehicle light type image, for example, a contour minimum matrix of the vehicle light type image is extracted, and meanwhile, the shape and position information of the boundary rectangle are obtained, for example, the abscissa of the boundary rectangle is obtained.
Step S140, correcting the target discrimination area according to the bounding rectangle.
Alternatively, the left and right boundary abscissas of the boundary rectangle may be acquired, and the abscissas of the target discrimination area may be calibrated, so that the coordinate information of the target discrimination area may be corrected, and the coordinate information of the shifted target discrimination area may be calibrated. The matrix car lights are turned on row by running the running-light type, the projection B1 area of the first car lights is assumed to be used as a target judging area for calibration, the 1 st judging area after calibration is shown in FIG. 4A, and B1 in FIG. 4A is the projection of the first car lights; furthermore, the projection B2 area of the 2 nd train lamp can be used as the target discrimination area for calibration, the calibrated 2 nd train discrimination area is shown in fig. 4B, and B2 in fig. 4B is the projection of the second train lamp; and (3) calibrating the projection B12 area of each train lamp sequentially as a target discrimination area until the last train lamp is calibrated, wherein the calibrated 12 th discrimination area is shown in fig. 4C, and the projection B12 of the twelfth train lamp is shown in fig. 4C, so that the correction of the shifted matrix train lamp light type (namely, a train lamp light type image) is completed, and the corrected target discrimination area is shown in fig. 5. In some specific embodiments, the coordinate information of the corrected target discrimination area may be saved, so that the matrix vehicle lamp may be corrected again.
According to the matrix car lamp correction method, the shape and position information of the matrix car lamp of the car is automatically acquired, the array judgment area of the intelligent car lamp control system is automatically calibrated, namely, the coordinates of the intelligent car lamp judgment area are calibrated through the boundary of the lamp, so that the car lamp judgment area is consistent with the actual illumination area of the matrix car lamp.
In some embodiments of the present invention, correcting the target discrimination area according to the bounding rectangle includes:
And acquiring left and right boundary abscissas of the boundary rectangle. The left border abscissa may be an abscissa corresponding to the left border of the border rectangle; the right boundary abscissa may be an abscissa corresponding to the right boundary of the boundary rectangle. Optionally, taking the example that the camera is horizontally offset, the shape and position information of the boundary rectangle may include left and right boundary abscissas of the boundary matrix, and then the left and right boundary abscissas of the boundary rectangle may be extracted.
And correcting the abscissa of the target discrimination area according to the left boundary abscissa and the right boundary abscissa. Optionally, assuming that the camera is installed and horizontally offset, the projection of the matrix car light is horizontally shifted, so that the initial abscissa of the target discrimination area can be calibrated according to the left boundary abscissa and the right boundary abscissa of the boundary matrix, and further, the coordinate information of the shifted target discrimination area can be corrected, thereby realizing the correction of the matrix car light camera. The left and right lateral coordinates of the boundary rectangle are used for correcting the lateral coordinates of the target judging area, so that the judging area is consistent with the actual lighting area of the matrix car lamp, the control accuracy of the system on the car lamp is effectively improved, and the installation efficiency of the control system is improved.
In some embodiments of the present invention, after correcting the target discrimination area according to the bounding rectangle, further comprising:
And storing the abscissa of the corrected target discrimination area. Alternatively, after the target discrimination areas are corrected one by one, the abscissa of the corrected target discrimination areas may be stored with parameters. When the matrix car light camera is horizontally offset again, automatic calibration can be performed according to the stored abscissa of the target discrimination area.
And executing the step of acquiring the target discrimination area of the matrix car lamp. Optionally, after storing the abscissa of the corrected target discrimination area, the change of the matrix lamp can be continuously monitored, that is, the step of re-jumping to the step of obtaining the target discrimination area of the matrix lamp can be performed, so that the matrix lamp camera can be judged and calibrated in real time.
In some embodiments of the present invention, obtaining a target illuminance from an image of a lamp light type includes:
and acquiring a color space image according to the car light type image. The color space image may be an HSV image obtained by performing image processing on a car light type image. Alternatively, assuming that the vehicle light type image is a BGR image, the BGR image may be converted into an HSV image, to obtain a color space image.
And extracting the brightness of the target car lamp according to the color space image. Optionally, after the HSV image is acquired, V-channel image brightness information may be extracted according to the HSV image, so as to obtain the image brightness of the HSV, and obtain the target headlight brightness. Through converting the car light type image into a color space image, the target car light brightness is extracted through the color space image, an effective light transmission area can be obtained, and the automatic calibration efficiency is improved.
In some embodiments of the present invention, after comparing the target illuminance with the preset illuminance, further comprising:
And if the target brightness is larger than the preset brightness, executing the step of acquiring the target discrimination area of the matrix car lamp. Optionally, if the target brightness is greater than the preset brightness, the target brightness exceeds the brightness threshold range, so that the light type image of the vehicle lamp needs to be re-acquired, that is, the step of acquiring the target discrimination area of the matrix vehicle lamp is performed, thereby simplifying the automatic calibration work and improving the correction accuracy.
In some embodiments of the present invention, after matching the lamp light type image with the preset image mask, further comprising:
And if the light type image of the vehicle lamp is inconsistent with the preset image mask, executing the step of acquiring the target discrimination area of the matrix vehicle lamp. Optionally, when the light pattern image of the vehicle light and the preset image mask are inconsistent, it may be determined that the acquired light pattern image of the vehicle light does not meet the preset condition, so that the light pattern image of the vehicle light needs to be acquired again, that is, the step of acquiring the target discrimination area of the matrix vehicle light is performed, so that the automatic calibration work may be simplified, and the correction accuracy may be improved.
In some embodiments of the present invention, obtaining a target discrimination area for a matrix vehicle lamp includes:
And obtaining the preset judging column number of the matrix car lamp. The preset number of discriminating columns may be the number of columns of the preset target discriminating area of the matrix car lamp. As shown in fig. 2, 3 and 5, the preset number of discriminating columns of the matrix car lamp may be divided into 12 columns according to the requirement.
Dividing the matrix car lamp into a plurality of preset judging areas according to the preset judging column number. Alternatively, assuming that the number of preset discriminating columns is 12, as shown in fig. 2,3 and 5, the matrix lamp may be divided into 12 preset discriminating regions, and then calibration may be performed with each column being a target discriminating region in sequence.
Selecting a target discrimination area from a plurality of preset discrimination areas. Optionally, the target discrimination areas may be selected one by one according to the requirements according to the divided preset discrimination areas, for example: the calibration may be performed by first taking the preset discrimination area of column 1 as the target discrimination area in the order from left to right as shown in fig. 4A, 4B and 4C; after the calibration of the 1 st column, the 2 nd column preset discrimination area can be used as a target discrimination area for calibration, and each column preset discrimination area is used as a target discrimination area for calibration in sequence until the 12 th column preset discrimination area (i.e. the last column target discrimination area) is calibrated. Another example is: the target discrimination areas can be selected in the order from right to left for calibration until the last column of target discrimination areas is calibrated. And automatically dividing the matrix car lights through the preset judgment column numbers, so as to realize the control precision of the matrix car light cameras.
The following describes in detail the process of the matrix lamp correction method according to the embodiment of the present invention in a specific embodiment. It is to be understood that the following description is exemplary only and is not intended to limit the invention in any way.
The matrix car lamp correction method comprises the following steps:
First, the matrix car lights are subjected to running light type to turn on a train of car lights in sequence.
As shown in fig. 2 and 3, when the position of the matrix lamp light type in the field of view of the camera is deflected, the control accuracy of the matrix lamp is reduced, and thus the calibration of the matrix lamp is required. Setting the number of the matrix lamp distinguishing area columns, wherein the number of the distinguishing area columns can be set according to requirements, and then starting a train lamp according to the number of the matrix lamp distinguishing area columns to obtain the distinguishing area of the matrix lamp.
And secondly, acquiring a matrix car lamp projection type image on the wall surface under the current condition.
When each train lamp is started in sequence, the light type image of the distinguishing area transmitted on the wall surface can be obtained, namely, the matrix car light type image of the train lamp is obtained. Assuming that column 1 is taken as a discrimination area in the order from left to right, a wall surface lamp light type image corresponding to the discrimination area is shown in fig. 4A; further, the 2 nd column can be taken as a discrimination area, and a wall surface car light type image corresponding to the discrimination area is shown in fig. 4B; finally, the 12 th column is taken as a discrimination area, and a wall surface car light type image corresponding to the discrimination area is shown in fig. 4C.
And thirdly, acquiring the brightness of the HSV image according to the light type image of the wall surface car light.
The method comprises the steps of obtaining an HSV image according to a wall surface car light type image, namely converting the wall surface car light type image of the BGR image into the HSV image, and obtaining brightness information of the V channel image according to the HSV image.
And step four, judging whether the brightness of the HSV image is within a preset brightness threshold range of the vehicle lamp, and if so, matching the wall surface vehicle lamp light type image with a preset image mask.
The preset lamp brightness can be set according to requirements. If the brightness of the HSV image is within the range of the preset brightness threshold of the vehicle lamp, for example, the brightness of the HSV image is smaller than or equal to the preset brightness of the vehicle lamp, the brightness of the HSV image can be determined to meet the preset condition, so that the wall surface vehicle lamp light type image can be matched with the preset image mask, and whether the wall surface vehicle lamp light type image and the preset image mask are consistent is judged. If the two are consistent, executing a fifth step; if not, executing the first step.
Fifthly, if the matching is successful, obtaining the boundary rectangle of the light source according to the light type image of the wall surface car light.
If the wall surface car light type image is consistent with the preset image mask, the wall surface car light type image and the preset image mask are successfully matched, so that a matrix car light source boundary rectangle can be obtained according to the wall surface car light type image, and a contour minimum rectangle for extracting a car light type can be used as the boundary rectangle.
And sixthly, acquiring left and right boundary abscissas of the boundary rectangle, correcting the abscissas of the current matrix car light judging area according to the left and right boundary abscissas, and storing parameters.
And correcting the abscissa of the current matrix car light judging area (for example, the 1 st car light) according to the left and right boundary abscissas of the boundary rectangle, and automatically adjusting the judging area to the position corresponding to the matrix car light. When the 1 st train lamp is corrected, the current train matrix car lamp is turned off, the next train matrix car lamp is turned on to repeat the operation until all the judging areas are calibrated, the corrected matrix car lamp judging areas are shown in fig. 5, the camera mounting/adjusting work is effectively simplified, and the recognition accuracy of automatic calibration is improved.
According to the matrix car lamp correction method, the matrix car lamp correction method of the first aspect of the embodiment of the invention can automatically calibrate the camera identification area, and the installation efficiency and the control accuracy of the intelligent matrix car lamp are improved.
Referring to fig. 6, a matrix lamp correction device according to an embodiment of the second aspect of the present invention includes:
The first obtaining module 600 is configured to obtain a target discrimination area of the matrix vehicle lamp, and obtain a vehicle lamp light type image corresponding to the target discrimination area;
A second obtaining module 610, configured to obtain a target brightness according to the light type image of the vehicle light;
a comparison module 620, configured to compare the target brightness with a preset brightness, and if the target brightness is less than or equal to the preset brightness, match the light type image with a preset image mask;
A third obtaining module 630, configured to obtain a boundary rectangle of the light source according to the light type image of the vehicle light if the light type image of the vehicle light is consistent with the preset image mask;
And a correction module 640, configured to correct the target discrimination area according to the bounding rectangle.
According to the matrix car lamp correction device, by executing the matrix car lamp correction method of the first aspect of the embodiment of the invention, the camera identification area can be automatically calibrated, and the installation efficiency and the control accuracy of the intelligent matrix car lamp are improved.
Referring to fig. 7, an embodiment of the third aspect of the present invention further provides a functional block diagram of an electronic device, including: at least one processor 700, and a memory 710 communicatively coupled to the at least one processor 700; a data transmission module 720, a camera 720, a display 740 may also be included.
Wherein the processor 700 is configured to execute the matrix lamp correction method in the first embodiment by calling a computer program stored in the memory 710.
The data transmission module 720 is connected with the processor 700, so as to realize data interaction between the data transmission module 720 and the processor 700.
Camera 730 may include a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera 730 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The display 740 may be used to display information entered by a user or information provided to a user. The display 740 may include a display panel, which may optionally be configured in the form of a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel may cover the display panel, and when the touch panel detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 700 to determine a type of touch event, and then the processor 700 provides a corresponding visual output on the display panel according to the type of touch event. In some embodiments, the touch panel may be integrated with the display panel to implement input and output functions.
The memory is used as a non-transitory storage medium for storing a non-transitory software program and a non-transitory computer executable program, such as the matrix lamp correction method in the embodiment of the first aspect of the invention. The processor implements the matrix lamp correction method in the embodiment of the first aspect described above by running a non-transitory software program and instructions stored in the memory.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store and execute the matrix lamp correction method in the embodiment of the first aspect. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software programs and instructions required to implement the matrix lamp correction method in the first aspect embodiment described above are stored in memory and when executed by one or more processors, perform the matrix lamp correction method in the first aspect embodiment described above.
The fourth aspect embodiment of the present invention also provides a computer-readable storage medium storing computer-executable instructions for: the matrix lamp correction method in the embodiment of the first aspect is executed.
In some embodiments, the storage medium stores computer-executable instructions that are executed by one or more control processors, for example, by one processor in an electronic device according to an embodiment of the third aspect, and may cause the one or more processors to perform the matrix vehicle lamp correction method according to the embodiment of the first aspect.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present invention.
The above described apparatus embodiments are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
In the description of the present specification, reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the invention, the scope of which is defined by the claims and their equivalents.

Claims (10)

1. A method for calibrating a matrix vehicle lamp, comprising:
acquiring a target discrimination area of a matrix car lamp, and acquiring a car lamp light type image corresponding to the target discrimination area;
Acquiring a target brightness of the vehicle lamp according to the light type image of the vehicle lamp;
Comparing the target brightness with a preset brightness, and if the target brightness is smaller than or equal to the preset brightness, matching the light type image with a preset image mask;
If the car light type image is consistent with the preset image mask, acquiring a boundary rectangle of a light source according to the car light type image;
And correcting the target discrimination area according to the boundary rectangle.
2. The method according to claim 1, wherein the correcting the target discrimination area according to the boundary rectangle includes:
acquiring left and right boundary abscissas of the boundary rectangle;
and correcting the abscissa of the target discrimination area according to the left boundary abscissa and the right boundary abscissa.
3. The method according to claim 2, further comprising, after said correcting said target discrimination area according to said boundary rectangle:
storing the corrected abscissa of the target discrimination area;
And executing the step of acquiring the target discrimination area of the matrix car lamp.
4. The method of claim 1, wherein the obtaining the target illuminance from the lamp light type image comprises:
acquiring a color space image according to the car light type image;
and extracting the brightness of the target lamp according to the color space image.
5. The method of claim 1, further comprising, after said comparing said target light level to a preset light level:
and if the target brightness is larger than the preset brightness, executing the step of acquiring the target judging area of the matrix car lamp.
6. The method of claim 1, further comprising, after said matching said lamp light type image with a preset image mask:
and if the light type image of the vehicle lamp is inconsistent with the preset image mask, executing the step of acquiring the target discrimination area of the matrix vehicle lamp.
7. The method according to any one of claims 1 to 6, wherein the obtaining the target discrimination area of the matrix lamp includes:
Acquiring a preset judging column number of the matrix car lamp;
Dividing the matrix car lamp into a plurality of preset judging areas according to the preset judging column number;
And selecting the target discrimination area from the plurality of preset discrimination areas.
8. A matrix vehicle lamp correction device, comprising:
The first acquisition module is used for acquiring a target discrimination area of the matrix car lamp and acquiring a car lamp light type image corresponding to the target discrimination area;
the second acquisition module is used for acquiring the target brightness of the vehicle lamp according to the light type image of the vehicle lamp;
The comparison module is used for comparing the target brightness with a preset brightness, and if the target brightness is smaller than or equal to the preset brightness, the light type image of the light type is matched with a preset image mask;
the third acquisition module is used for acquiring a boundary rectangle of the light source according to the car light type image if the car light type image is consistent with the preset image mask;
And the correction module is used for correcting the target discrimination area according to the boundary rectangle.
9. An electronic device, comprising:
at least one processor, and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions that are executed by the at least one processor to cause the at least one processor to implement the matrix lamp correction method of any one of claims 1 to 7 when the instructions are executed.
10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the matrix lamp correction method according to any one of claims 1 to 7.
CN202110718611.XA 2021-06-28 2021-06-28 Matrix car lamp correction method and device, electronic equipment and storage medium Active CN113538343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110718611.XA CN113538343B (en) 2021-06-28 2021-06-28 Matrix car lamp correction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110718611.XA CN113538343B (en) 2021-06-28 2021-06-28 Matrix car lamp correction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113538343A CN113538343A (en) 2021-10-22
CN113538343B true CN113538343B (en) 2024-05-14

Family

ID=78097040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110718611.XA Active CN113538343B (en) 2021-06-28 2021-06-28 Matrix car lamp correction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113538343B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04179189A (en) * 1990-11-09 1992-06-25 Hitachi Ltd Printed board and recognition method of its position correcting recognition mark
JPH11205776A (en) * 1998-01-20 1999-07-30 Fujitsu General Ltd Image recognizing and setting system
JP2004207603A (en) * 2002-12-26 2004-07-22 Toshiba Corp Bonding device and its controlling method
JP2016092019A (en) * 2014-10-29 2016-05-23 パナソニックIpマネジメント株式会社 Calibration method in component mounting device
WO2019084173A1 (en) * 2017-10-26 2019-05-02 Osram Sylvania Inc. Integrated automotive adaptive driving beam headlamp and calibration method
KR20190058350A (en) * 2017-11-20 2019-05-29 한국과학기술원 Method for calibrating 360-degree cameras
DE102018204424B3 (en) * 2018-03-22 2019-08-08 Audi Ag Method for calibrating a position of a matrix headlight of a motor vehicle, control device and motor vehicle

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04179189A (en) * 1990-11-09 1992-06-25 Hitachi Ltd Printed board and recognition method of its position correcting recognition mark
JPH11205776A (en) * 1998-01-20 1999-07-30 Fujitsu General Ltd Image recognizing and setting system
JP2004207603A (en) * 2002-12-26 2004-07-22 Toshiba Corp Bonding device and its controlling method
JP2016092019A (en) * 2014-10-29 2016-05-23 パナソニックIpマネジメント株式会社 Calibration method in component mounting device
WO2019084173A1 (en) * 2017-10-26 2019-05-02 Osram Sylvania Inc. Integrated automotive adaptive driving beam headlamp and calibration method
KR20190058350A (en) * 2017-11-20 2019-05-29 한국과학기술원 Method for calibrating 360-degree cameras
DE102018204424B3 (en) * 2018-03-22 2019-08-08 Audi Ag Method for calibrating a position of a matrix headlight of a motor vehicle, control device and motor vehicle

Also Published As

Publication number Publication date
CN113538343A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN108650495B (en) Panoramic looking-around system for vehicle and self-adaptive light supplementing method thereof
US10647246B2 (en) Method of automatically adjusting leveling of pixel light headlamp for vehicle
CN112512184B (en) Color-taking illumination control method, device, system and storage medium
US11807156B2 (en) Method for calibrating a position of a matrix headlamp of a motor vehicle, control device, and motor vehicle
EP3220637B1 (en) Vehicle-mounted camera system
US20150049117A1 (en) Projector and method of controlling projector
CN113593426B (en) Module division method for LED spliced screen image and LED screen correction method
CN112634819A (en) Correction method and related device for LED display screen
CN110386059A (en) Body light luminance regulating method, device, system and vehicle
CN112776706A (en) Vehicle headlamp control method and device
CN113538343B (en) Matrix car lamp correction method and device, electronic equipment and storage medium
CN113343872B (en) Traffic light identification method, device, equipment, medium and product
JP5712821B2 (en) Shooting display control system
CN112489115B (en) Light-emitting module positioning method, device, electronic equipment, storage medium and system
US9992468B2 (en) Image processing apparatus and its adjustment method
US11560996B2 (en) Lighting module system and method for controlling the light module system
KR20180095251A (en) System for monitoring camera and method for correcting image
CN106530354A (en) Image processing device, image correction method, system, calibration point search method and system
GB2586802A (en) System and method for identifying light emitter flicker
CN113823218B (en) Pixelized car light control method, editing method, equipment, terminal and storage medium
CN111343385B (en) Method, device, equipment and storage medium for determining environment brightness
CN115482292B (en) Control method and device for head lamp in ADB module
CN110896452A (en) Flash lamp correction method of mobile terminal, mobile terminal and device
US20220329723A1 (en) Method and system for mitigating image flicker from strobed lighting systems
KR102615479B1 (en) Lamp and operating method of the same, vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant