Parameter debugging method and system for CMS monitor
The RGB image of the headlight simulated light source is obtained through the camera, color space conversion and parameter adjustment are performed, the light source area is identified, and the light source discovery coefficient is calculated. This solves the problem of low parameter debugging efficiency and accuracy of CMS monitors and realizes low cost and efficient testing. and image quality optimization.
Patent Information
- Application Number
- CN202410366615.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-03-28
AI Technical Summary
The parameter debugging efficiency and accuracy of existing CMS monitors are low and have high cost, so they cannot effectively distinguish between image quality and screen effect, resulting in inaccurate test results.
By obtaining the RGB image of the camera simulates the light source on the headlight, converting it to the HSV color space, adjusting the image parameters and gamma correction, identifying the light source area, calculating the light source discovery coefficient, iteratively update the parameters until the preset standards are met, and the low point light source standard is achieved Cost quick test.
It improves the efficiency and accuracy of CMS monitor parameter debugging, reduces costs, ensures the optimization of image quality and screen effects, and achieves accurate meeting of point light source standards.
Smart Images

Figure CN118283437B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a parameter debugging method and system for a CMS monitor. Background Art
[0002] The automotive electronic rearview mirror system (hereinafter referred to as CMS, the full name of which is Camera Monitor Systems) is a system composed of a camera and a monitor (the display screen of CMS). It is necessary to see the rear and side views of the vehicle clearly within the specified field of view. It is a new type of indirect field of view device. The test needs to be carried out according to the specified method. For Class I, Class II, and Class III CMS, the driver should be able to identify the vehicle headlights as two separate point light sources, that is, the parameters of the point light sources need to meet the standards. In the test, a point light source simulator is usually used to simulate a set of vehicle low-beam headlights located at a distance of 250m. The optical axis of the camera is directly opposite the point light source simulator to ensure that the point light source is displayed in the middle of the defined size of the monitor. The brightness of the point light source reproduced on the monitor is measured, and then a brightness meter is used to measure and evaluate the brightness curves of the point light source displayed on the monitor in the horizontal and vertical directions. In the existing point light source test scheme, a brightness meter is required to measure the monitor. After each parameter adjustment, the machine needs to be reset for testing. The test process is cumbersome and the debugging efficiency is low. For the test environment to be built for monitor-side testing, the equipment cost is high and the efficiency is low. In addition, the existing solution's image debugging and screen debugging will affect the final test results. It is impossible to locate whether the problem lies in the image quality or the screen effect, resulting in low accuracy in parameter debugging of the CMS monitor. Therefore, the parameter debugging of the CMS monitor has low efficiency, low accuracy and high cost. Summary of the invention
[0003] The embodiments of the present application provide a parameter debugging method and system for a CMS monitor, which can improve the parameter debugging efficiency and accuracy of the CMS monitor and reduce the cost.
[0004] In a first aspect, the present application provides a parameter debugging method for a CMS monitor, wherein the parameter debugging method for the CMS monitor comprises:
[0005] Acquire a first RGB light source captured image obtained by the camera to be tested capturing a vehicle light source simulation light source under a target test environment, wherein the vehicle light source simulation light source is used to simulate two headlights of a vehicle, and the camera to be tested is used to capture an image and display it on a CMS monitor;
[0006] Convert the image captured by the first RGB light source from the RGB color space to the HSV color space to obtain a first HSV light source image;
[0007] Adjust the image captured by the first HSV light source based on preset image adjustment parameters to obtain an image captured by a second HSV light source;
[0008] Convert the second HSV light source captured image from the HSV color space to the RGB color space to obtain a second RGB captured image;
[0009] performing gamma correction on the second RGB captured image based on preset gamma correction parameters to obtain a corrected image;
[0010] Determine an image to be tested based on the corrected image;
[0011] Performing light source area recognition on the image to be tested to obtain a first light source illumination area;
[0012] Splitting the first light source illumination area into a second light source illumination area and a third light source illumination area using a target symmetry axis of a minimum circumscribed rectangle of the first light source illumination area as a boundary, wherein the target symmetry axis is parallel to a shorter side of the minimum circumscribed rectangle of the first light source illumination area;
[0013] Performing circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source, and obtaining a first target centroid of the first target circle contour;
[0014] Performing circle fitting on the outer contour of the area illuminated by the third light source to obtain a second target circle contour of the area illuminated by the third light source, and obtaining a second target centroid of the second target circle contour;
[0015] Determine a straight line passing through the first target centroid and the second target centroid as a horizontal axis, and determine a straight line perpendicular to the horizontal axis and passing through the center of a line connecting the first target centroid and the second target centroid as a vertical axis;
[0016] Acquire a horizontal brightness variation curve of each pixel point located on the horizontal axis in the area illuminated by the first light source, and acquire a vertical brightness variation curve of each pixel point located on the vertical axis in the area illuminated by the first point light source;
[0017] Calculating a light source discovery coefficient based on the horizontal brightness variation curve and the vertical brightness variation curve;
[0018] If the light source discovery coefficient does not meet the preset standard conditions, the preset image adjustment parameters and the preset gamma correction parameters are updated to obtain a new corrected image;
[0019] determining new light source discovery coefficients based on the new corrected image;
[0020] If the new light source discovery coefficients meet the preset standard conditions, the updated preset image adjustment parameters and preset gamma correction parameters are determined as the test parameters of the CMS monitor.
[0021] Optionally, the preset image adjustment parameters include a saturation adjustment factor and a hue shift, and adjusting the image captured by the first HSV light source based on the preset image adjustment parameters to obtain the image captured by the second HSV light source includes:
[0022] The saturation of the image captured by the first HSV light source is adjusted based on the saturation adjustment factor, and the hue of the image captured by the first HSV light source is adjusted based on the hue shift, so as to obtain the image captured by the second HSV light source.
[0023] Optionally, the calculating a light source discovery coefficient based on the horizontal brightness change curve and the vertical brightness change curve includes:
[0024] Acquire a horizontal brightness maximum value of the horizontal brightness change curve and a vertical brightness maximum value of the vertical brightness change curve;
[0025] Obtain a first horizontal distance between two points whose ordinates are half of the maximum horizontal brightness value on the horizontal brightness change curve, and obtain a second horizontal distance between two points whose ordinates are half of the maximum vertical brightness value on the vertical brightness change curve;
[0026] A light source discovery coefficient is determined based on the maximum horizontal brightness, the maximum vertical brightness, the first horizontal distance, and the second horizontal distance, wherein the maximum horizontal brightness, the maximum vertical brightness, the first horizontal distance, the second horizontal distance, and the light source discovery coefficient satisfy the following formula:
[0027]
[0028] Among them, L H,max is the maximum horizontal brightness, L V,max is the maximum vertical brightness, S H is the first horizontal distance, S V is the second horizontal distance, and PLSDF is the light source discovery coefficient.
[0029] Optionally, the performing light source area recognition on the image to be tested to obtain the first light source illumination area includes:
[0030] Obtaining the brightness value of each pixel of the image to be tested;
[0031] Determine pixels on the image to be tested whose brightness values are higher than a preset brightness value as candidate light source pixels, and obtain a plurality of candidate light source pixels on the image to be tested;
[0032] Obtaining pixel information and position information of each of the candidate light source pixels;
[0033] Clustering each of the candidate light source pixels based on pixel information and position information of each of the candidate light source pixels to obtain a plurality of pixel regions corresponding to a plurality of pixel clusters;
[0034] A pixel area with the largest number of pixels is determined as the first light source illumination area.
[0035] Optionally, a reference test camera is provided in the target test environment, and determining the image to be tested based on the corrected image includes:
[0036] Acquire a monitor image captured by a benchmark test camera on the CMS monitor in the target test environment, wherein the monitor image includes the CMS monitor;
[0037] Inputting the monitor image into a target illumination estimation model to perform illumination estimation and obtain illumination estimation parameters;
[0038] The monitor image is rendered based on the illumination estimation parameters to obtain the image to be tested.
[0039] Optionally, performing circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source and obtaining a first target centroid of the first target circle contour includes:
[0040] Performing circle fitting on the outer contour of the area illuminated by the second light source to obtain a plurality of first candidate circle contours of the area illuminated by the second light source, and obtaining a plurality of first candidate centroids of the plurality of first candidate circle contours;
[0041] Calculating the standard deviation of the brightness values of multiple target pixel points that are equidistant from the first candidate centroid to obtain the standard deviation corresponding to the first candidate centroid, and obtaining multiple standard deviations corresponding to multiple first candidate centroids, wherein each of the target pixel points is equidistant from the first candidate centroid, the distance between the target pixel point and the first candidate centroid is less than the radius of the first candidate circle contour corresponding to the first candidate centroid, and the angle formed by the target pixel point, the first candidate centroid, and the second target centroid is an obtuse angle;
[0042] The first candidate circular contour corresponding to the first candidate centroid having the smallest standard deviation is determined as the first target circular contour, and a first target centroid of the first target circular contour is obtained.
[0043] Optionally, the parameter debugging method of the CMS monitor includes:
[0044] If the new light source discovery coefficient does not meet the preset standard condition, obtaining the update times of the preset image adjustment parameters and the preset gamma correction parameters;
[0045] If the update times do not exceed the preset times, the preset image adjustment parameters and the preset gamma correction parameters are updated to obtain a new corrected image. If the update times exceed the preset times, it is determined that the CMS monitor is abnormal.
[0046] In a second aspect, the parameter debugging system of the CMS monitor provided by the present application includes:
[0047] A first acquisition module is used to acquire a first RGB light source captured image obtained by the camera to be tested capturing a vehicle light source simulation light source under a target test environment, wherein the vehicle light source simulation light source is used to simulate two headlights of a vehicle, and the camera to be tested is used to capture an image and display it on a CMS monitor;
[0048] A first conversion module, used to convert the first RGB light source photographed image from RGB color space to HSV color space to obtain a first HSV light source photographed image;
[0049] An adjustment module, configured to adjust the image captured by the first HSV light source based on preset image adjustment parameters to obtain an image captured by a second HSV light source;
[0050] A second conversion module, used for converting the second HSV light source captured image from the HSV color space to the RGB color space to obtain a second RGB captured image;
[0051] A correction module, configured to perform gamma correction on the second RGB captured image based on preset gamma correction parameters to obtain a corrected image;
[0052] A first determination module, configured to determine an image to be tested based on the rectified image;
[0053] An identification module, used to identify the light source area of the image to be tested to obtain the first light source illumination area;
[0054] a splitting module, used to split the first light source illumination area into a second light source illumination area and a third light source illumination area by taking a target symmetry axis of a minimum circumscribed rectangle of the first light source illumination area as a boundary, wherein the target symmetry axis is parallel to a shorter side of the minimum circumscribed rectangle of the first light source illumination area;
[0055] A first fitting module is used to perform circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source and a first target centroid of the first target circle contour;
[0056] A second fitting module is used to perform circle fitting on the outer contour of the area illuminated by the third light source to obtain a second target circle contour of the area illuminated by the third light source and obtain a second target centroid of the second target circle contour;
[0057] A second determination module is used to determine a straight line passing through the first target centroid and the second target centroid as a horizontal axis, and a straight line perpendicular to the horizontal axis and passing through the center of a line connecting the first target centroid and the second target centroid as a vertical axis;
[0058] A second acquisition module, used to acquire a horizontal brightness change curve of each pixel point located on the horizontal axis in the area illuminated by the first light source, and to acquire a vertical brightness change curve of each pixel point located on the vertical axis in the area illuminated by the first point light source;
[0059] A calculation module, used for calculating a light source discovery coefficient based on the horizontal brightness change curve and the vertical brightness change curve;
[0060] An updating module, used for updating preset image adjustment parameters and preset gamma correction parameters to obtain a new corrected image if the light source discovery coefficient does not meet the preset standard conditions;
[0061] A third determination module, configured to determine a new light source discovery coefficient based on the new corrected image;
[0062] The fourth determination module is used to determine the updated preset image adjustment parameters and preset gamma correction parameters as test parameters of the CMS monitor if the new light source discovery coefficient meets the preset standard conditions.
[0063] In a third aspect, the electronic device provided in the present application includes a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the parameter debugging method of the CMS monitor provided in the present application.
[0064] In a fourth aspect, the computer-readable storage medium provided in the present application stores a plurality of instructions, which are suitable for loading by a processor to implement the steps in the parameter debugging method of the CMS monitor provided in the present application.
[0065] In a fifth aspect, the computer program product provided in the present application includes a computer program or instructions, which, when executed by a processor, implements the steps in the parameter debugging method of the CMS monitor provided in the present application.
[0066] In the present application, compared with the related art, a first RGB light source captured image is obtained by capturing a headlight simulation light source under a target test environment by a camera to be tested, wherein the headlight simulation light source is used to simulate two headlights of a vehicle, and the camera to be tested is used to capture images and display them on a CMS monitor; the first RGB light source captured image is converted from an RGB color space to an HSV color space to obtain a first HSV light source captured image; the first HSV light source captured image is adjusted based on preset image adjustment parameters to obtain a second HSV light source captured image; the second HSV light source captured image is converted from an HSV color space to an RGB color space to obtain a second RGB captured image; gamma correction is performed on the second RGB captured image based on preset gamma correction parameters to obtain a corrected image; the image to be tested is determined based on the corrected image; the light source area of the image to be tested is identified to obtain a first light source irradiation area; the first light source irradiation area is divided into a second light source irradiation area and a third light source irradiation area with the target symmetry axis of the minimum circumscribed rectangle of the first light source irradiation area as a boundary, wherein the target symmetry axis is parallel to the shorter side of the minimum circumscribed rectangle of the first light source irradiation area; Performing circle fitting on the outer contour of the irradiated area to obtain the first target circle contour of the second light source irradiated area, and obtaining the first target centroid of the first target circle contour; performing circle fitting on the outer contour of the third light source irradiated area to obtain the second target circle contour of the third light source irradiated area, and obtaining the second target centroid of the second target circle contour; determining a straight line passing through the first target centroid and the second target centroid as the horizontal axis, and determining a straight line perpendicular to the horizontal axis and passing through the center of the line connecting the first target centroid and the second target centroid as the vertical axis; obtaining a horizontal brightness change curve of each pixel point located on the horizontal axis in the irradiated area of the first light source, and obtaining a vertical brightness change curve of each pixel point located on the vertical axis in the irradiated area of the first point light source; calculating a light source discovery coefficient based on the horizontal brightness change curve and the vertical brightness change curve; if the light source discovery coefficient does not meet the preset standard conditions, updating the preset image adjustment parameters and the preset gamma correction parameters to obtain a new corrected image; determining a new light source discovery coefficient based on the new corrected image; if the new light source discovery coefficient meets the preset standard conditions, determining the updated preset image adjustment parameters and the preset gamma correction parameters as the test parameters of the CMS monitor. The present application can collect image data from a camera, calculate and simulate the effect of a monitor, and simulate the effect of an optimal monitor through iterative updates, accurately determine the horizontal axis and the vertical axis, accurately draw the horizontal brightness curve and the vertical brightness curve, and adjust parameters in real time to achieve preset standard conditions, thereby achieving low-cost and rapid testing of point light source standards, facilitating image quality tuning, providing cars with better quality images, improving the efficiency and accuracy of parameter debugging of CMS monitors, and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0068] Figure 1 is a schematic diagram of a scene of an image processing system provided in an embodiment of the present application;
[0069] Figure 2 It is a flowchart of an embodiment of a parameter debugging method of a CMS monitor provided in an embodiment of the present application;
[0070] Figure 3 is a schematic diagram of an area illuminated by a first light source in an image to be tested in one embodiment of a parameter debugging method for a CMS monitor provided in an embodiment of the present application;
[0071] Figure 4 It is a schematic diagram of a horizontal brightness change curve and a vertical brightness change curve in an embodiment of a parameter debugging method of a CMS monitor provided in an embodiment of the present application;
[0072] Figure 5 It is a structural diagram of a parameter debugging system of a CMS monitor provided in an embodiment of the present application;
[0073] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] It should be noted that the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application and should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.
[0075] In the following description of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0076] In the following description of the present application, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0078] In order to improve the effect of parameter debugging of a CMS monitor, an embodiment of the present application provides a parameter debugging method of a CMS monitor, a parameter debugging system of a CMS monitor, an electronic device, a computer-readable storage medium, and a computer program product. The parameter debugging method of a CMS monitor can be executed by the parameter debugging system of a CMS monitor, or by an electronic device integrated with the parameter debugging system of a CMS monitor.
[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0080] Please refer to Figure 1 , the present application also provides an image processing system, such as Figure 1 As shown, the image processing system includes an electronic device 100, and the parameter debugging system of the CMS monitor provided by the present application is integrated in the electronic device 100. The image processing system includes the electronic device 100, a camera to be tested 200, a CMS monitor 300, and a benchmark test camera 400. The electronic device 100 is connected to the camera to be tested 200, the CMS monitor 300, and the benchmark test camera 400, respectively.
[0081] Among them, the electronic device 100 can be any device equipped with a processor and has processing capabilities, such as mobile electronic devices with processors such as smart phones, tablet computers, PDAs, laptops, smart speakers, or fixed electronic devices with processors such as desktop computers, televisions, servers, industrial equipment, etc.
[0082] In addition, if Figure 1 As shown, the image processing system may further include a memory 200 for storing original data, intermediate data, and result data.
[0083] In the embodiment of the present application, the memory 200 can be a cloud storage. Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0084] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
[0085] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.
[0086] It should be noted that Figure 1 The scene diagram of the image processing system shown is only an example. The image processing system and scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the image processing system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0087] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0088] Please refer to Figure 2 , Figure 2FIG. 1 is a flow chart of an embodiment of a parameter debugging method of a CMS monitor provided in an embodiment of the present application. Figure 2 As shown, the process of the parameter debugging method of the CMS monitor provided by this application is as follows:
[0089] 201. Obtain a first RGB light source captured by a camera to be tested under a target test environment and obtained by capturing a simulated light source of a vehicle lamp.
[0090] The vehicle headlight simulation light source is used to simulate the two headlights of the vehicle, and the camera to be tested is used to capture images and display them on the CMS monitor.
[0091] The cameras to be tested are installed on both sides of the vehicle, which are equivalent to the rearview mirrors of the vehicle. The CMS monitor is installed inside the vehicle to display the images taken by the cameras to be tested. The cameras to be tested are CMS optical axis offset cameras.
[0092] The CMS optical axis offset camera includes an image sensor and a lens. The vertical distance between the center of the image sensor and the optical axis of the lens is greater than zero. The image sensor is rectangular, the aspect ratio of the image sensor is 16:9, the effective imaging area size of the image sensor is 5.76mm*4.608mm*7.376mm, the imaging circle diameter of the lens is 7.4mm, the vertical distance between the center of the image sensor and the optical axis of the lens is 1.308mm, and the center of the image sensor is vertically offset by a vertical distance below the optical axis of the lens. The lens position in the optical axis offset scheme adopted in this application does not move, the center of the image sensor moves downward, and the center of the lens imaging circle does not coincide with the center of the image sensor. The center of the image sensor is vertically offset relative to the center of the lens, and the dark corner area is minimized while ensuring that the FOV is increased, thereby improving the utilization efficiency of the image sensor. The image sensor ratio used in this application is 16:9, the effective imaging area size is 5.76mm*4.608mm*7.376mm, the lens imaging circle diameter is 7.4mm, and after the image sensor and the lens are matched, the HFOV is 118.4°, the VFOV is 91.4°, and the DFOV is 172.2°. The center of the image sensor is offset downward by 1.308mm relative to the center of the imaging circle of the lens in the vertical direction. After the offset, the theoretical VFOV of the upper half is 19.1°, and the theoretical VFOV of the lower half is 82°. The FOV of the upper half of the optical axis is reduced by 26.6°, and the FOV of the lower half is increased by 36.3°.
[0093] The technical solution adopted by the present invention is an optical axis offset design. The center of the image sensor is offset downward by 1.308mm relative to the center of the image circle of the lens in the vertical direction. After the offset, the theoretical VFOV of the upper half is 19.1°, and the theoretical VFOV of the lower half is 82°. The angle can meet the field of view requirements of Class II and Class IV rearview mirrors. At the same time, the CRA matching is within ±3°, and the RI is greater than 60%, which can meet the basic image quality requirements.
[0094] The camera module optical axis offset scheme used in this patent can be applied to the CMS system, which can make the FOV of the vehicle body part small and the field of view account for a small proportion, and the FOV of the road part large and the field of view account for a large proportion. By properly arranging the camera FOV, the same camera can be used to meet the regulatory field of view requirements of Class II and Class IV rearview mirrors required by GBT15084 regulations, and the Class II field of view is cut from the Class IV field of view and displayed on the screen to achieve the goal of reducing system costs. At the same time, because of the use of the optical axis offset scheme, the optical center is closer to the Class II field of view, making the Class II field of view clearer and less distorted, and can also improve indicators such as the minimum magnification required by regulations.
[0095] FOV: Field of View, imaging, with the camera lens as the vertex, the angle formed by the two edges of the maximum range of the image of the target being measured that can pass through the lens is called the field of view. DFOV: diagonal field of view. HFOV: horizontal field of view. VFOV: vertical field of view. Class II mirror: main exterior rearview mirror of commercial vehicles. Class IV mirror: wide-angle exterior rearview mirror of commercial vehicles.
[0096] In the embodiment of the present application, the target test environment is a pre-built environment, which includes a camera to be tested, a vehicle light simulation light source, a CMS monitor, and a reference test camera. The image captured by the first RGB light source is an image in RGB format.
[0097] In a specific embodiment, obtaining a first RGB light source captured by a camera to be tested under a target test environment and capturing a simulated light source of a vehicle lamp includes:
[0098] (1) Obtain multiple RGB images captured by the camera to be tested under the target test environment using a simulated light source for a vehicle lamp.
[0099] (2) Determine every two adjacent RGB captured images in the plurality of RGB captured images as an RGB image group, thereby obtaining a plurality of RGB image groups.
[0100] (3) splitting one RGB captured image in the RGB image group into a plurality of first captured sub-images, and splitting another RGB captured image in the RGB image group into a plurality of second captured sub-images, wherein positions of the plurality of first captured sub-images correspond to positions of the plurality of second captured sub-images.
[0101] For example, the RGB captured image is split into nine-grid patterns.
[0102] (3) Calculate the image similarity between each first captured sub-image and the corresponding second captured sub-image respectively, and obtain multiple image similarities of the RGB image group.
[0103] (4) Calculate the average similarity of multiple images in the RGB image group.
[0104] (5) If the average similarity of multiple images in the RGB image group is greater than a preset similarity, the RGB image group is determined to be a similar image group.
[0105] (6) If the multiple RGB image groups are all similar image groups, the RGB image captured last among the multiple RGB captured images is determined as the first RGB light source captured image.
[0106] 202. Convert the first RGB light source photographed image from the RGB color space to the HSV color space to obtain a first HSV light source photographed image.
[0107] The image captured by the first HSV light source is an image in HSV format.
[0108] 203. Adjust the image captured by the first HSV light source based on preset image adjustment parameters to obtain an image captured by a second HSV light source.
[0109] In the embodiment of the present application, the preset image adjustment parameters include a saturation adjustment factor and a hue shift. Adjusting the image captured by the first HSV light source based on the preset image adjustment parameters to obtain the image captured by the second HSV light source includes: adjusting the saturation of the image captured by the first HSV light source based on the saturation adjustment factor, and adjusting the hue of the image captured by the first HSV light source based on the hue shift to obtain the image captured by the second HSV light source.
[0110] Among them, the saturation adjustment factor and the hue shift can be set according to manual experience.
[0111] 204. Convert the second HSV light source captured image from the HSV color space to the RGB color space to obtain a second RGB captured image.
[0112] 205. Perform gamma correction on the second RGB captured image based on preset gamma correction parameters to obtain a corrected image.
[0113] 206. Determine an image to be tested based on the rectified image.
[0114] In a specific embodiment, the rectified image is determined as the image to be tested.
[0115] In another specific embodiment, a reference test camera is provided in the target test environment. Since the CMS monitor is located at different positions, the illumination may be different, resulting in different display effects of the CMS monitor. Therefore, it is also necessary to perform illumination estimation to better simulate the display effect of the CMS monitor. The image to be tested is determined based on the corrected image, including:
[0116] (1) Obtain a monitor image captured by a benchmark test camera on a CMS monitor in a target test environment. The monitor image includes the CMS monitor.
[0117] Among them, the benchmark test camera is used to monitor the CMS monitor.
[0118] (2) Input the monitor image into the target illumination estimation model for illumination estimation to obtain illumination estimation parameters.
[0119] The target illumination estimation model is trained based on a preset training set, and the preset training set includes a plurality of sample images and label images corresponding to the sample images.
[0120] In the embodiment of the present application, the target illumination estimation model is HDRnet (High Dynamic range Net). HDRnet is a deep neural network for high dynamic range image enhancement. HDR (High Dynamic range) is an image processing technology that combines multiple images with different exposures to show a wider range of brightness and richer details. HDRnet achieves image enhancement by training a deep neural network to learn the mapping of low dynamic range images to high dynamic range images. The core idea of HDRnet is to convert the image enhancement problem into an image mapping problem, and convert the low dynamic range image into a high dynamic range image by learning a mapping function as input. This mapping function is implemented by a deep neural network. It is trained by learning a large number of image pairs, and during the training process, the network optimizes its own parameters through the minimum loss function. HDRnet adopts a hierarchical residual network structure, which consists of multiple sub-networks, each of which is responsible for processing a different frequency range of the image. This hierarchical structure enables the network to better capture the details of different frequency ranges and reasonably reconstruct them in the final image. In addition, the hierarchical residual network also adopts residual connections, which can effectively reduce the difficulty of network training and improve the quality of image enhancement. Due to the model characteristics of HDRnet, the model parameters are very small, and for 4k super-resolution images, the inference time is very fast and can be achieved in real time.
[0121] Of course, in other embodiments, the target illumination estimation model may also be Lighthouse, IllumiNet, deepUPE, etc., depending on specific settings.
[0122] (3) Render the monitor image based on the illumination estimation parameters to obtain the image to be tested.
[0123] 207. Perform light source area recognition on the image to be tested to obtain a first light source illumination area.
[0124] like Figure 3As shown, the light source region is identified for the image to be tested, and a first light source irradiation region 111 is obtained. The first light source irradiation region 111 is the irradiation outline of two point light sources.
[0125] In a specific embodiment, a pre-trained light source region recognition model is used to perform light source region recognition on a test image to obtain a first light source illumination region.
[0126] In another specific embodiment, performing light source area recognition on the image to be tested to obtain the first light source illumination area includes:
[0127] (1) Obtain the brightness value of each pixel in the image to be tested.
[0128] In the embodiment of the present application, the brightness value = 0.3*R+0.6*G+0.1*B. R, G and B represent the pixel values of the pixel point on the R channel, G channel and B channel.
[0129] (2) Pixel points on the image to be tested whose brightness values are higher than a preset brightness value are determined as candidate light source pixel points, thereby obtaining a plurality of candidate light source pixel points on the image to be tested.
[0130] The preset brightness value can be set according to specific circumstances, for example, the preset brightness value is 20. The brightness of the position close to the two point light sources is higher, so the pixel points with brightness values higher than the preset brightness value on the image to be tested are the illumination areas of the two point light sources.
[0131] (3) Obtain the pixel information and position information of each candidate light source pixel.
[0132] The pixel information is the pixel value of the pixel point on the R channel, the G channel and the B channel. The position information is the coordinates of the pixel point.
[0133] (4) Clustering each candidate light source pixel point based on the pixel information and position information of each candidate light source pixel point to obtain multiple pixel regions corresponding to multiple pixel clusters.
[0134] In a specific embodiment, a K-means algorithm is used to cluster each candidate light source pixel point based on pixel information and position information of each candidate light source pixel point to obtain a plurality of pixel regions corresponding to a plurality of pixel clusters.
[0135] In another specific embodiment, the total number M of candidate light source pixel points is obtained, and the M candidate light source pixel points are randomly sampled N times, and each random sampling obtains M / N candidate light source pixel points, which are recorded as a first light source pixel point set, and N first light source pixel point sets are obtained. N is an integer greater than 1. The N first light source pixel point sets are clustered respectively to obtain multiple second light source pixel point sets of the first light source pixel point set, so that each first light source pixel point set is clustered into multiple second light source pixel point sets. The cluster center of each second light source pixel point set is calculated respectively, wherein the pixel information of the cluster center is the average value of the pixel information of each second light source pixel point, and the position information of the cluster center is the average value of the position information of each second light source pixel point. Calculate the similarity between each cluster center respectively, determine the cluster center of each second light source pixel point set in the first light source pixel point set as the target cluster center respectively, calculate the similarity between the target cluster center and the cluster center of each second light source pixel point in other first light source pixel point sets, select the cluster center with the highest similarity from each other first light source pixel point set, obtain N-1 cluster centers, and obtain N cluster centers together with the target cluster center, combine the N second light source pixel point sets corresponding to the N cluster centers into a third light source pixel point set, and obtain the third light source pixel point set corresponding to the target cluster center. Determine the cluster center of each second light source pixel point set in the first light source pixel point set as the target cluster center respectively, and obtain multiple third light source pixel point sets. Determine the multiple third light source pixel point sets as multiple pixel cluster clusters respectively, and obtain multiple pixel regions corresponding to the multiple pixel cluster clusters.
[0136] (5) The pixel area with the largest number of pixels is determined as the first light source illumination area.
[0137] 208. Split the first light source illumination area into a second light source illumination area and a third light source illumination area by taking the target symmetry axis of the minimum circumscribed rectangle of the first light source illumination area as a boundary.
[0138] The target symmetry axis is parallel to the shorter side of the minimum circumscribed rectangle of the first light source illumination area 111. Figure 3 As shown, the target symmetry axis is the vertical axis, and the first light source illumination area 111 is divided into two left and right areas, namely the second light source illumination area and the third light source illumination area.
[0139] Specifically, the area ratio of the area of the first light source illumination area to the area of the minimum circumscribed rectangle of the first light source illumination area is calculated; if the area ratio is not greater than a preset value, the first light source illumination area is split into a second light source illumination area and a third light source illumination area with the target symmetry axis of the minimum circumscribed rectangle of the first light source illumination area as the boundary, wherein the target symmetry axis is parallel to the shorter side of the minimum circumscribed rectangle of the first light source illumination area.
[0140] 209. Perform circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source, and obtain a first target centroid of the first target circle contour.
[0141] In the embodiment of the present application, a circle fitting is performed on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source, and a first target centroid of the first target circle contour is obtained, including:
[0142] (1) Performing circle fitting on the outer contour of the area illuminated by the second light source to obtain a plurality of first candidate circle contours of the area illuminated by the second light source, and obtaining a plurality of first candidate centroids of the plurality of first candidate circle contours.
[0143] Specifically, the outer contour of the second light source illumination area is fitted with a circle using the least square method, and a plurality of first candidate circle contours with smaller errors are selected to obtain a plurality of first candidate circle contours of the second light source illumination area.
[0144] (2) Calculate the standard deviation of the brightness values of multiple target pixel points that are equidistant from the first candidate centroid, obtain the standard deviation corresponding to the first candidate centroid, and obtain multiple standard deviations corresponding to multiple first candidate centroids.
[0145] In the embodiment of the present application, the standard deviation of the brightness values of multiple target pixels that are equidistant from the first candidate centroid is calculated to obtain the standard deviation corresponding to the first candidate centroid, and multiple standard deviations corresponding to multiple first candidate centroids are obtained, including:
[0146] Specifically, first, a plurality of target pixels are obtained.
[0147] Among them, each target pixel is equidistant from the first candidate centroid, the distance between the target pixel and the first candidate centroid is less than the radius of the first candidate circle contour corresponding to the first candidate centroid, and the angle formed by the target pixel, the first candidate centroid and the second target centroid is an obtuse angle. The angle formed by the target pixel, the first candidate centroid and the second target centroid is an obtuse angle. The target pixel is far away from the second target centroid and is less affected by the light source at the second target centroid. Therefore, multiple target pixels can be regarded as multiple equally spaced positions with the first candidate centroid as the point light source, and theoretically have equal brightness.
[0148] Then, the standard deviation of the brightness values of the plurality of target pixels is calculated to obtain the standard deviation corresponding to the first candidate centroid, and multiple standard deviations corresponding to the plurality of first candidate centroids are obtained.
[0149] (3) The first candidate circular contour corresponding to the first candidate centroid with the smallest standard deviation is determined as the first target circular contour, and the first target centroid of the first target circular contour is obtained.
[0150] The first candidate centroid with the smallest standard deviation is most likely to be a point light source. The first candidate circular contour corresponding to the first candidate centroid with the smallest standard deviation is determined as the first target circular contour, and the first target centroid of the first target circular contour is obtained. The first target circular contour and the first target centroid of the first target circular contour can be accurately determined.
[0151] 210. Perform circle fitting on the outer contour of the area illuminated by the third light source to obtain a second target circle contour of the area illuminated by the third light source, and obtain a second target centroid of the second target circle contour.
[0152] In a specific embodiment, the standard deviation of the brightness values of multiple target pixel points that are equidistant from the second candidate centroid is calculated to obtain the standard deviation corresponding to the second candidate centroid, and multiple standard deviations corresponding to multiple second candidate centroids are obtained. The second candidate circular contour corresponding to the second candidate centroid with the smallest standard deviation is determined as the second target circular contour to obtain the second target centroid of the second target circular contour.
[0153] 211. A straight line passing through the first target centroid and the second target centroid is determined as a horizontal axis, and a straight line perpendicular to the horizontal axis and passing through the center of a line connecting the first target centroid and the second target centroid is determined as a vertical axis.
[0154] Specifically, the horizontal axis can be recorded as the X axis, and the vertical axis can be recorded as the Y axis, and an XOY coordinate system is established. Figure 3 shown.
[0155] 212. Obtain a horizontal brightness change curve of each pixel point located on the horizontal axis in the area illuminated by the first light source, and obtain a vertical brightness change curve of each pixel point located on the vertical axis in the area illuminated by the first point light source.
[0156] Specifically, the horizontal brightness change curve is the change in brightness value of each pixel point on the horizontal axis in the first light source illumination area as the horizontal coordinate changes, and the vertical brightness change curve is the change in brightness value of each pixel point on the vertical axis in the first point light source illumination area as the vertical coordinate changes.
[0157] The horizontal brightness change curve and the vertical brightness change curve are as follows: Figure 4 shown.
[0158] 213. Calculate the light source discovery coefficient based on the horizontal brightness change curve and the vertical brightness change curve.
[0159] In the embodiment of the present application, the light source discovery coefficient is calculated based on the horizontal brightness change curve and the vertical brightness change curve, including:
[0160] (1) Obtain the horizontal brightness maximum value of the horizontal brightness change curve and the vertical brightness maximum value of the vertical brightness change curve.
[0161] like Figure 4 As shown, L H,max is the maximum horizontal brightness, L V,max is the maximum vertical brightness.
[0162] (2) Obtain a first horizontal distance between two points whose ordinates are half of the maximum horizontal brightness value on the horizontal brightness change curve, and obtain a second horizontal distance between two points whose ordinates are half of the maximum vertical brightness value on the vertical brightness change curve.
[0163] The ordinate on the horizontal brightness change curve is half of the maximum horizontal brightness, which is 0.5L. H,max The vertical coordinate on the vertical brightness change curve is half of the maximum vertical brightness, which is 0.5L V,max .
[0164] (3) determining a light source discovery coefficient based on the maximum horizontal brightness, the maximum vertical brightness, the first horizontal distance, and the second horizontal distance, wherein the maximum horizontal brightness, the maximum vertical brightness, the first horizontal distance, the second horizontal distance, and the light source discovery coefficient satisfy the following formula:
[0165]
[0166] Among them, L H,max is the maximum horizontal brightness, L V,max is the maximum vertical brightness, S H is the first horizontal distance, S V is the second horizontal distance, and PLSDF is the light source discovery coefficient.
[0167] 214. If the light source discovery coefficient does not meet the preset standard conditions, the preset image adjustment parameters and the preset gamma correction parameters are updated to obtain a new corrected image.
[0168] In a specific embodiment, the preset standard condition is that the light source discovery coefficient is not less than a preset value, for example, the preset value is 2.7.
[0169] 215. Determine a new light source discovery coefficient based on the new corrected image;
[0170] 216. If the new light source discovery coefficients meet the preset standard conditions, the updated preset image adjustment parameters and preset gamma correction parameters are determined as test parameters of the CMS monitor.
[0171] Furthermore, if the new light source discovery coefficient does not meet the preset standard conditions, the update times of the preset image adjustment parameters and the preset gamma correction parameters are obtained; if the update times do not exceed the preset times, the preset image adjustment parameters and the preset gamma correction parameters are updated to obtain a new corrected image; if the update times exceed the preset times, the CMS monitor is determined to be abnormal.
[0172] In order to facilitate better implementation of the parameter debugging method of the CMS monitor provided in the embodiment of the present application, the embodiment of the present application also provides a parameter debugging system of the CMS monitor based on the parameter debugging method of the CMS monitor. The meanings of the terms are the same as those in the parameter debugging method of the CMS monitor. For specific implementation details, please refer to the description in the above method embodiment.
[0173] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of a parameter debugging system for a CMS monitor provided in an embodiment of the present application, wherein the parameter debugging system for a CMS monitor may include:
[0174] The first acquisition module 701 is used to acquire a first RGB light source captured image obtained by the camera to be tested capturing a vehicle light source simulation light source under a target test environment, wherein the vehicle light source simulation light source is used to simulate two headlights of a vehicle, and the camera to be tested is used to capture an image and display it on a CMS monitor;
[0175] A first conversion module 702 is used to convert the first RGB light source photographed image from the RGB color space to the HSV color space to obtain a first HSV light source photographed image;
[0176] An adjustment module 703 is used to adjust the image captured by the first HSV light source based on a preset image adjustment parameter to obtain an image captured by a second HSV light source;
[0177] A second conversion module 704 is used to convert the second HSV light source captured image from the HSV color space to the RGB color space to obtain a second RGB captured image;
[0178] A correction module 705, configured to perform gamma correction on the second RGB captured image based on preset gamma correction parameters to obtain a corrected image;
[0179] A first determination module 706, configured to determine an image to be tested based on the rectified image;
[0180] The identification module 707 is used to identify the light source area of the image to be tested to obtain the first light source illumination area;
[0181] A splitting module 708 is used to split the first light source illumination area into a second light source illumination area and a third light source illumination area by taking a target symmetry axis of a minimum circumscribed rectangle of the first light source illumination area as a boundary, wherein the target symmetry axis is parallel to a shorter side of the minimum circumscribed rectangle of the first light source illumination area;
[0182] A first fitting module 709 is used to perform circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source and a first target centroid of the first target circle contour;
[0183] A second fitting module 710 is used to perform circle fitting on the outer contour of the area illuminated by the third light source to obtain a second target circle contour of the area illuminated by the third light source and obtain a second target centroid of the second target circle contour;
[0184] A second determination module 711 is used to determine a straight line passing through the first target centroid and the second target centroid as a horizontal axis, and a straight line perpendicular to the horizontal axis and passing through the center of a line connecting the first target centroid and the second target centroid as a vertical axis;
[0185] A second acquisition module 712 is used to acquire a horizontal brightness change curve of each pixel point located on the horizontal axis in the area illuminated by the first light source, and to acquire a vertical brightness change curve of each pixel point located on the vertical axis in the area illuminated by the first point light source;
[0186] A calculation module 713, configured to calculate a light source discovery coefficient based on the horizontal brightness change curve and the vertical brightness change curve;
[0187] An updating module 714, configured to update the preset image adjustment parameters and the preset gamma correction parameters to obtain a new corrected image if the light source discovery coefficient does not meet the preset standard condition;
[0188] A third determination module 715, configured to determine a new light source discovery coefficient based on the new corrected image;
[0189] The fourth determination module 716 is configured to determine the updated preset image adjustment parameters and preset gamma correction parameters as test parameters of the CMS monitor if the new light source discovery coefficients meet the preset standard conditions.
[0190] The specific implementation of each of the above modules can be found in the previous embodiments and will not be described in detail here.
[0191] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the steps in the parameter debugging method of the CMS monitor provided in this embodiment by calling a computer program stored in the memory.
[0192] Please refer to Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0193] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0194] The processor 101 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 101 may include one or more processing cores; optionally, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 101.
[0195] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.
[0196] The electronic device also includes a power supply 103 for supplying power to each component. Optionally, the power supply 103 can be logically connected to the processor 101 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 103 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0197] The electronic device may further include an input unit 104, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0198] Although not shown, the electronic device may also include a display unit, an image acquisition component, etc., which will not be described in detail here. Specifically in this embodiment, the processor 101 in the electronic device will load the executable code corresponding to one or more computer programs into the memory 102 according to the following instructions, and the processor 101 will execute the steps in the parameter debugging method of the CMS monitor provided in this application, such as:
[0199] Obtain a first RGB light source captured image obtained by the camera to be tested under the target test environment by capturing the headlight simulation light source, wherein the headlight simulation light source is used to simulate two headlights of the vehicle, and the camera to be tested is used to capture images and display them on the CMS monitor; convert the first RGB light source captured image from the RGB color space to the HSV color space to obtain a first HSV light source captured image; adjust the first HSV light source captured image based on the preset image adjustment parameters to obtain a second HSV light source captured image; convert the second HSV light source captured image from the HSV color space to the RGB color space to obtain a second RGB captured image; perform gamma correction on the second RGB captured image based on the preset gamma correction parameters to obtain a corrected image; determine the image to be tested based on the corrected image; identify the light source area of the image to be tested to obtain the first light source irradiation area; split the first light source irradiation area into the second light source irradiation area and the third light source irradiation area with the target symmetry axis of the minimum circumscribed rectangle of the first light source irradiation area as the boundary, wherein the target symmetry axis is parallel to the shorter side of the minimum circumscribed rectangle of the first light source irradiation area; The first target circle contour of the second light source illumination area is fitted by a circle to obtain the first target circle contour of the second light source illumination area, and the first target centroid of the first target circle contour is obtained; the outer contour of the third light source illumination area is fitted by a circle to obtain the second target circle contour of the third light source illumination area, and the second target centroid of the second target circle contour is obtained; a straight line passing through the first target centroid and the second target centroid is determined as the horizontal axis, and a straight line perpendicular to the horizontal axis and passing through the center of the line connecting the first target centroid and the second target centroid is determined as the vertical axis; a horizontal brightness change curve of each pixel point located on the horizontal axis in the first light source illumination area is obtained, and a vertical brightness change curve of each pixel point located on the vertical axis in the first point light source illumination area is obtained; a light source discovery coefficient is calculated based on the horizontal brightness change curve and the vertical brightness change curve; if the light source discovery coefficient does not meet the preset standard condition, the preset image adjustment parameter and the preset gamma correction parameter are updated to obtain a new corrected image; a new light source discovery coefficient is determined based on the new corrected image; if the new light source discovery coefficient meets the preset standard condition, the updated preset image adjustment parameter and the preset gamma correction parameter are determined as the test parameters of the CMS monitor.
[0200] It should be noted that the electronic device provided in the embodiment of the present application and the parameter debugging method of the CMS monitor in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above related embodiments and will not be repeated here.
[0201] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program stored therein is executed on a processor of an electronic device provided in an embodiment of the present application, the processor of the electronic device executes the steps in the parameter debugging method of the CMS monitor provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0202] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes various optional implementations of the parameter debugging method of the CMS monitor.
[0203] The above is a detailed introduction to a parameter debugging method and system for a CMS monitor provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0204] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, the relevant data of the user is involved, and the user's permission or consent is required, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
Claims
1. A parameter debugging method for a CMS monitor, characterized in that: The parameter debugging method of the CMS monitor includes: Acquire a first RGB light source captured image obtained by the camera to be tested capturing a vehicle light source simulation light source under a target test environment, wherein the vehicle light source simulation light source is used to simulate two headlights of a vehicle, and the camera to be tested is used to capture an image and display it on a CMS monitor; Convert the image captured by the first RGB light source from the RGB color space to the HSV color space to obtain a first HSV light source image; Adjust the image captured by the first HSV light source based on preset image adjustment parameters to obtain an image captured by a second HSV light source; Convert the second HSV light source captured image from the HSV color space to the RGB color space to obtain a second RGB captured image; performing gamma correction on the second RGB captured image based on preset gamma correction parameters to obtain a corrected image; Determine an image to be tested based on the corrected image; Performing light source area recognition on the image to be tested to obtain a first light source illumination area; Splitting the first light source illumination area into a second light source illumination area and a third light source illumination area using a target symmetry axis of a minimum circumscribed rectangle of the first light source illumination area as a boundary, wherein the target symmetry axis is parallel to a shorter side of the minimum circumscribed rectangle of the first light source illumination area; Performing circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source, and obtaining a first target centroid of the first target circle contour; Performing circle fitting on the outer contour of the area illuminated by the third light source to obtain a second target circle contour of the area illuminated by the third light source, and obtaining a second target centroid of the second target circle contour; Determine a straight line passing through the first target centroid and the second target centroid as a horizontal axis, and determine a straight line perpendicular to the horizontal axis and passing through the center of a line connecting the first target centroid and the second target centroid as a vertical axis; Acquire a horizontal brightness variation curve of each pixel point located on the horizontal axis in the area illuminated by the first light source, and acquire a vertical brightness variation curve of each pixel point located on the vertical axis in the area illuminated by the first light source; Calculating a light source discovery coefficient based on the horizontal brightness variation curve and the vertical brightness variation curve; If the light source discovery coefficient does not meet the preset standard conditions, the preset image adjustment parameters and the preset gamma correction parameters are updated to obtain a new corrected image; determining new light source discovery coefficients based on the new corrected image; If the new light source discovery coefficients meet the preset standard conditions, the updated preset image adjustment parameters and preset gamma correction parameters are determined as the test parameters of the CMS monitor.
2. The parameter debugging method of the CMS monitor according to claim 1, characterized in that: The preset image adjustment parameters include a saturation adjustment factor and a hue shift, and the step of adjusting the image captured by the first HSV light source based on the preset image adjustment parameters to obtain the image captured by the second HSV light source includes: The saturation of the image captured by the first HSV light source is adjusted based on the saturation adjustment factor, and the hue of the image captured by the first HSV light source is adjusted based on the hue shift, so as to obtain the image captured by the second HSV light source.
3. The parameter debugging method of the CMS monitor according to claim 1, characterized in that: The calculating the light source discovery coefficient based on the horizontal brightness change curve and the vertical brightness change curve includes: Acquire a horizontal brightness maximum value of the horizontal brightness change curve and a vertical brightness maximum value of the vertical brightness change curve; Obtain a first horizontal distance between two points whose ordinates are half of the maximum horizontal brightness value on the horizontal brightness change curve, and obtain a second horizontal distance between two points whose ordinates are half of the maximum vertical brightness value on the vertical brightness change curve; A light source discovery coefficient is determined based on the maximum horizontal brightness, the maximum vertical brightness, the first horizontal distance, and the second horizontal distance, wherein the maximum horizontal brightness, the maximum vertical brightness, the first horizontal distance, the second horizontal distance, and the light source discovery coefficient satisfy the following formula: Among them, L H,max is the maximum horizontal brightness, L V,max is the maximum vertical brightness, S H is the first horizontal distance, S V is the second horizontal distance, and PLSDF is the light source discovery coefficient.
4. The parameter debugging method of the CMS monitor according to claim 1, characterized in that: The step of performing light source area recognition on the image to be tested to obtain a first light source illumination area includes: Obtaining the brightness value of each pixel of the image to be tested; Determine pixels on the image to be tested whose brightness values are higher than a preset brightness value as candidate light source pixels, and obtain a plurality of candidate light source pixels on the image to be tested; Obtaining pixel information and position information of each of the candidate light source pixels; Clustering each of the candidate light source pixels based on pixel information and position information of each of the candidate light source pixels to obtain a plurality of pixel regions corresponding to a plurality of pixel clusters; A pixel area with the largest number of pixels is determined as the first light source illumination area.
5. The parameter debugging method of the CMS monitor according to claim 1, characterized in that: A reference test camera is provided in the target test environment, and determining the image to be tested based on the corrected image includes: Acquire a monitor image captured by a benchmark test camera on the CMS monitor in the target test environment, wherein the monitor image includes the CMS monitor; Inputting the monitor image into a target illumination estimation model to perform illumination estimation and obtain illumination estimation parameters; The monitor image is rendered based on the illumination estimation parameters to obtain the image to be tested.
6. The parameter debugging method of the CMS monitor according to claim 1, characterized in that: The step of performing circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source and to obtain a first target centroid of the first target circle contour comprises: Performing circle fitting on the outer contour of the area illuminated by the second light source to obtain a plurality of first candidate circle contours of the area illuminated by the second light source, and obtaining a plurality of first candidate centroids of the plurality of first candidate circle contours; Calculating the standard deviation of the brightness values of multiple target pixel points that are equidistant from the first candidate centroid to obtain the standard deviation corresponding to the first candidate centroid, and obtaining multiple standard deviations corresponding to multiple first candidate centroids, wherein each of the target pixel points is equidistant from the first candidate centroid, the distance between the target pixel point and the first candidate centroid is less than the radius of the first candidate circle contour corresponding to the first candidate centroid, and the angle formed by the target pixel point, the first candidate centroid, and the second target centroid is an obtuse angle; The first candidate circular contour corresponding to the first candidate centroid having the smallest standard deviation is determined as the first target circular contour, and a first target centroid of the first target circular contour is obtained.
7. The parameter debugging method of the CMS monitor according to claim 1, characterized in that: The parameter debugging method of the CMS monitor comprises: If the new light source discovery coefficient does not meet the preset standard condition, obtaining the update times of the preset image adjustment parameters and the preset gamma correction parameters; If the update times do not exceed the preset times, the preset image adjustment parameters and the preset gamma correction parameters are updated to obtain a new corrected image. If the update times exceed the preset times, it is determined that the CMS monitor is abnormal.
8. A parameter debugging system for a CMS monitor, characterized in that: The parameter debugging system of the CMS monitor includes: A first acquisition module is used to acquire a first RGB light source captured image obtained by the camera to be tested capturing a vehicle light source simulation light source under a target test environment, wherein the vehicle light source simulation light source is used to simulate two headlights of a vehicle, and the camera to be tested is used to capture an image and display it on a CMS monitor; A first conversion module, used to convert the first RGB light source photographed image from RGB color space to HSV color space to obtain a first HSV light source photographed image; An adjustment module, configured to adjust the image captured by the first HSV light source based on preset image adjustment parameters to obtain an image captured by a second HSV light source; A second conversion module, used for converting the second HSV light source captured image from the HSV color space to the RGB color space to obtain a second RGB captured image; A correction module, configured to perform gamma correction on the second RGB captured image based on preset gamma correction parameters to obtain a corrected image; A first determination module, configured to determine an image to be tested based on the rectified image; An identification module, used to identify the light source area of the image to be tested to obtain the first light source illumination area; a splitting module, used to split the first light source illumination area into a second light source illumination area and a third light source illumination area by taking a target symmetry axis of a minimum circumscribed rectangle of the first light source illumination area as a boundary, wherein the target symmetry axis is parallel to a shorter side of the minimum circumscribed rectangle of the first light source illumination area; A first fitting module is used to perform circle fitting on the outer contour of the area illuminated by the second light source to obtain a first target circle contour of the area illuminated by the second light source and a first target centroid of the first target circle contour; A second fitting module is used to perform circle fitting on the outer contour of the area illuminated by the third light source to obtain a second target circle contour of the area illuminated by the third light source and obtain a second target centroid of the second target circle contour; A second determination module is used to determine a straight line passing through the first target centroid and the second target centroid as a horizontal axis, and a straight line perpendicular to the horizontal axis and passing through the center of a line connecting the first target centroid and the second target centroid as a vertical axis; A second acquisition module, used to acquire a horizontal brightness change curve of each pixel point located on the horizontal axis in the area illuminated by the first light source, and to acquire a vertical brightness change curve of each pixel point located on the vertical axis in the area illuminated by the first light source; A calculation module, used for calculating a light source discovery coefficient based on the horizontal brightness change curve and the vertical brightness change curve; An updating module, used for updating preset image adjustment parameters and preset gamma correction parameters to obtain a new corrected image if the light source discovery coefficient does not meet the preset standard conditions; A third determination module, configured to determine a new light source discovery coefficient based on the new corrected image; The fourth determination module is used to determine the updated preset image adjustment parameters and preset gamma correction parameters as test parameters of the CMS monitor if the new light source discovery coefficient meets the preset standard conditions.
9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the steps in the parameter debugging method of the CMS monitor according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the parameter debugging method of the CMS monitor according to any one of claims 1 to 7.
Citation Information
Patent Citations
Visual field adjusting method and device, monitor and vehicle
CN115696055A
Automatic and self-adaptive adjusting method for automobile CMS electronic outside rear-view mirror
CN115805870A