Method for detecting area of defrosting and demisting area of automobile windscreen

Through fixed cameras and computer vision algorithms, the defrost and defogging areas of windshield glass are automatically collected and identified, combined with the Tsai two-step calibration method and small-hole camera model, the problems of low detection efficiency and large error in the existing technology are solved, and high Accurate and efficient defrost and defogging area area detection.

CN119205877APending Publication Date: 2024-12-27CHANGCHUN AUTOMOTIVE TEST CENT +1

Patent Information

Application Number
CN202411041577.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing automotive wind window glass defrost and defogging area area detection methods have problems such as excessive manual operations, large data errors, low efficiency and low automation and intelligence.

Method used

Fixed cameras are used to automatically collect windshield glass images, and camera calibration is performed through computer vision algorithms and Tsai two-step calibration method. Small hole camera models are established, radial distortion is corrected, and the area of ​​the defrost and defogging area is calculated.

Benefits of technology

It improves the automation and intelligence of detection, reduces errors, significantly improves the calculation speed and efficiency, and realizes accurate area detection of windshield defrost and defogging areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205877A_ABST
    Figure CN119205877A_ABST
Patent Text Reader

Abstract

The invention provides a method for detecting the area of a defrosting and demisting area of an automobile windscreen, and the method comprises the following steps: S1, carrying out the automatic collection of the defrosting and demisting area of the windscreen through a fixed camera, obtaining an image of the windscreen in front of an automobile, and carrying out the preprocessing of the collected image; s2, performing contour recognition on the preprocessed image by using a computer vision algorithm to obtain a contour image of a defrosting and demisting area of the windshield glass; s3, performing camera calibration on the identified contour image of the defrosting and demisting area of the windshield glass by using a Tsai two-step calibration method, including preliminarily estimating internal parameters and external parameters of a camera, establishing a pinhole camera model according to the preliminarily estimated internal parameters and external parameters of the camera, and correcting radial distortion in the imaging process of the camera; and S4, carrying out area calculation according to the calibrated and corrected contour image of the defrosting and demisting area of the windshield glass.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automobile windshield area detection, and in particular to a method for detecting the defrosting and defogging area of ​​an automobile windshield. Background Art

[0002] The automobile windshield defrost and defogging area detection is carried out by detecting whether the automobile windshield defrost and defogging area can reach the specified value within the specified time, and checking whether the automobile windshield defrost and defogging area covers the specified area on the windshield.

[0003] The current detection method is to use a three-dimensional single-arm measuring and marking instrument to draw the windshield AB area and the defrost and defogging area on the front windshield of the car, and then draw the area on sulfuric acid paper. The area of ​​AB area and the defrost and defogging area are calculated and summed by an area integrator. Although this method can meet the above-mentioned detection requirements, its detection process has the following shortcomings: there are too many manual operations in the detection process, the data obtained from the test are prone to large errors, the test efficiency is low, and the degree of automation and intelligence is low. Summary of the Invention

[0004] The object of the present invention is to provide a method for detecting the defrosting and defogging area of ​​a car windshield, so as to solve the problems raised in the above-mentioned background technology.

[0005] The present invention is achieved through the following technical solution: a method for detecting the defrosting and defogging area of ​​a car windshield, the method comprising the following steps:

[0006] Step S1: using a fixed camera to automatically capture the defrost and defogging area of ​​the windshield, obtaining an image of the windshield in front of the vehicle, and preprocessing the captured image;

[0007] Step S2: using a computer vision algorithm to perform contour recognition on the pre-processed image to obtain a contour image of the defrosting and defogging area of ​​the windshield;

[0008] Step S3: Using the Tsai two-step calibration method to perform camera calibration on the identified contour image of the defrosted and defogging area of ​​the windshield, the method includes preliminarily estimating the camera's intrinsic and extrinsic parameters, then establishing a pinhole camera model based on the preliminarily estimated camera intrinsic and extrinsic parameters, and correcting radial distortion during the camera imaging process;

[0009] Step S4: Calculate the area of ​​the defrost and defogging area of ​​the windshield based on the contour image after calibration and correction.

[0010] Specifically, the specific process of step S2 is as follows:

[0011] First, edge detection algorithm is used to perform edge detection on the preprocessed image:

[0012] Perform gradient calculation on the preprocessed image and use the Sobel operator to calculate the gradients in the horizontal and vertical directions;

[0013] In edge detection, the non-maximum suppression method is used to retain the edge details, that is, for each pixel, only the local maximum in the gradient direction is retained to obtain the gradient image;

[0014] According to the set high threshold and low threshold, the gradient image is binarized and the pixels are marked as strong edge, weak edge and non-edge;

[0015] According to the gradient image and threshold processing results, a complete edge is formed by connecting strong edge pixels with adjacent weak edge pixels;

[0016] Second, based on the results of edge detection, extract the contours in the image:

[0017] Based on the connection relationship of edge pixels, adjacent edge pixels are grouped into a connected component, each connected component represents a contour, and a connectivity detection algorithm is used to determine the connection relationship between edge pixels;

[0018] The discrete points in the connected components are curve fitted to obtain a smoother contour.

[0019] Specifically, step S2 further includes performing image enhancement on the pre-processed image, as follows:

[0020] First, convert the color image into a grayscale image, traverse each pixel of the image, use its grayscale value as an index, increase the count at the corresponding position in the histogram, and obtain a histogram representing the distribution of image pixel values;

[0021] Second, the histogram is normalized so that the number of pixels at each gray level is between 0 and 1;

[0022] Third, the normalized histogram is used to calculate the cumulative distribution function. The pixels of the original image are mapped to new grayscale levels according to the cumulative distribution function, thereby changing the distribution of pixel values. For each pixel, its grayscale value is used as input, the cumulative distribution function is searched and the new grayscale level is calculated. The new grayscale level is assigned to the original image pixel to obtain the equalized image.

[0023] Fourth, the equalized image is divided into multiple regions, and a local contrast enhancement operation is performed on each region. The local contrast enhancement operation is performed on each region using the limited contrast adaptive histogram equalization method, and the parameters of the limited contrast adaptive histogram equalization method are adjusted to obtain a result suitable for the enhancement effect.

[0024] Specifically, the specific process of preliminarily estimating the intrinsic and extrinsic parameters of the camera in step S3 is as follows:

[0025] First, select a calibration plate of known size and shape and mark it for feature point extraction;

[0026] Second, use a fixed camera to shoot the calibration plate, ensuring that the camera position and direction do not change during the shooting process;

[0027] Third, the captured calibration plate image is preprocessed, and the feature point detection algorithm is used to extract the feature points on the calibration plate in the image;

[0028] Fourth, according to the marks on the calibration plate, the pixel coordinates of each feature point in the image coordinate system are extracted;

[0029] Fifth, based on the known size and shape of the calibration plate, calculate the actual coordinates of each feature point in the world coordinate system;

[0030] Sixth, a linear equation system is established based on the intrinsic and extrinsic parameters of the camera, wherein the unknown parameters are the intrinsic and extrinsic parameters of the camera;

[0031] Seventh, the camera's internal and external parameters are estimated using the least squares method.

[0032] Specifically, the step S3 further includes optimizing the estimated internal parameters, and the optimization goal is to minimize the reprojection error between the actual feature point coordinates and the feature points in the image.

[0033] Specifically, the specific process of establishing a pinhole camera model based on the preliminary estimation of the camera's internal and external parameters and correcting the radial distortion during the camera imaging process in step S3 is as follows:

[0034] First, the camera is abstracted into a pinhole camera model, which includes internal and external parameters;

[0035] Second, a standard radial distortion model is used to describe the effect of radial distortion, and the collected images are corrected to eliminate the influence of radial distortion.

[0036] Third, based on the radial distortion model and distortion parameters, a dedistortion operation is performed on each pixel in the image, and the distorted image is mapped into a distortion-corrected image. That is, the coordinates of each pixel are inversely mapped to obtain the coordinates on the distortion-corrected image.

[0037] Fourth, when performing dedistortion correction, the distortion-corrected image is interpolated to fill in the missing pixel values ​​to obtain a smooth corrected image.

[0038] Specifically, the specific process of calculating the area of ​​the defrost and defogging area of ​​the windshield according to the calibrated and corrected contour image in step S4 is as follows:

[0039] First, extracting the boundary points of the contour from the contour image of the defrosted and defogging area of ​​the windshield after calibration and correction, wherein the boundary points are a set of pixel coordinates on the contour curve;

[0040] Second, the pixel coordinates of the contour boundary points are converted to actual coordinates according to the camera calibration parameters;

[0041] Third, the transformed boundary points are regarded as vertices of polygons and the area of ​​the contour region is calculated using the Gregorian formula.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The present invention provides a method for detecting the defrost and defogging area of ​​an automobile windshield. This method has the advantages of high automation, intelligence, high accuracy, and rapid calculation speed for detecting the defrost and defogging area of ​​an automobile windshield. The method also shortens the time required for conventional test data processing, significantly improving test efficiency and accuracy. Furthermore, by accurately calculating the defrost and defogging area of ​​the windshield, the method enables precise and extended defrosting and defogging of the windshield. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 This is a flow chart of the steps of a method for detecting the defrosting and defogging area of ​​a vehicle windshield provided by the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the present invention more apparent, exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present invention.

[0047] In the following description, numerous specific details are provided to provide a more thorough understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced without one or more of these details. In other instances, certain technical features well known in the art are not described to avoid confusion with the present invention.

[0048] It should be understood that the present invention can be implemented in different forms and should not be interpreted as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to make disclosure thorough and complete and to fully convey the scope of the present invention to those skilled in the art.

[0049] The purpose of the terms used herein is only to describe specific embodiments and is not intended to limit the present invention. When used herein, the singular forms "a", "an", and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "comprising" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0050] In order to fully understand the present invention, a detailed structure will be provided in the following description to illustrate the technical solution proposed by the present invention. Optional embodiments of the present invention are described in detail below. However, in addition to these detailed descriptions, the present invention may also have other implementations.

[0051] See also Figure 1 A method for detecting the defrosting and defogging area of ​​a car windshield comprises the following steps:

[0052] Step S1: using a fixed camera to automatically capture the defrost and defogging area of ​​the windshield, obtaining an image of the windshield in front of the vehicle, and preprocessing the captured image;

[0053] Step S2: using a computer vision algorithm to perform contour recognition on the pre-processed image to obtain a contour image of the defrosting and defogging area of ​​the windshield;

[0054] Step S3: Using the Tsai two-step calibration method to perform camera calibration on the identified contour image of the defrosted and defogging area of ​​the windshield, the method includes preliminarily estimating the camera's intrinsic and extrinsic parameters, then establishing a pinhole camera model based on the preliminarily estimated camera intrinsic and extrinsic parameters, and correcting radial distortion during the camera imaging process;

[0055] Step S4: Calculate the area of ​​the defrost and defogging area of ​​the windshield based on the contour image after calibration and correction.

[0056] The present invention provides a method for detecting the defrost and defogging area of ​​a vehicle windshield. First, a fixed camera automatically captures images of a previously drawn defrost and defogging area using a fixed camera. The captured images are then preprocessed, including image denoising, smoothing, and contrast enhancement, to improve subsequent processing. The preprocessed images are then further processed using contour recognition, image enhancement, and camera calibration. Camera calibration can better restore true information and reduce errors caused by limitations in shooting angle and camera physical properties. By establishing a pinhole camera model and taking into account the characteristics of the windshield defrost area and distortion correction theory, radial distortion during imaging is corrected to improve measurement precision and accuracy. Finally, the area of ​​the contour image of the defrost and defogging area of ​​the windshield after calibration and correction is calculated.

[0057] Specifically, the specific process of step S2 is as follows:

[0058] First, edge detection algorithm is used to perform edge detection on the preprocessed image:

[0059] Perform gradient calculation on the preprocessed image and use the Sobel operator to calculate the gradients in the horizontal and vertical directions;

[0060] For example, after obtaining the gradient images in the horizontal and vertical directions, the gradient magnitude and direction of each pixel can be calculated respectively. The gradient magnitude can be calculated using the following formula:

[0061] gradient_magnitude=sqrt((gradient_x)^2+(gradient_y)^2)

[0062] Where gradient_x and gradient_y represent the gradient values ​​in the horizontal and vertical directions respectively. The gradient direction can be calculated using the following formula:

[0063] gradient_direction=atan2(gradient_y,gradient_x)

[0064] In edge detection, the non-maximum suppression method is used to retain the edge details, that is, for each pixel, only the local maximum in the gradient direction is retained to obtain the gradient image;

[0065] According to the set high threshold and low threshold, the gradient image is binarized and the pixels are marked as strong edge, weak edge and non-edge;

[0066] According to the gradient image and threshold processing results, a complete edge is formed by connecting strong edge pixels with adjacent weak edge pixels;

[0067] Second, based on the results of edge detection, extract the contours in the image:

[0068] Based on the connection relationship of edge pixels, adjacent edge pixels are grouped into a connected component, each connected component represents a contour, and a connectivity detection algorithm is used to determine the connection relationship between edge pixels;

[0069] Exemplarily, each edge pixel in the image is marked for subsequent connection relationship analysis, and the marked edge pixels are traversed to detect the connection relationship between them, such as depth-first search (DFS) or breadth-first search (BFS) to traverse the edge pixels.

[0070] In the process of traversing edge pixels, it is determined whether adjacent pixels are edge pixels and whether their pixel values ​​are similar, and the connection relationship between them is determined.

[0071] Based on the detected connection relationship, a connection relationship graph or a connection table between edge pixels is established to represent the connection relationship between edge pixels.

[0072] The discrete points in the connected components are curve fitted to obtain a smoother contour.

[0073] Specifically, step S2 further includes performing image enhancement on the pre-processed image, as follows:

[0074] Convert the color image to a grayscale image, traverse each pixel of the image, use its grayscale value as an index, increase the count at the corresponding position in the histogram, and obtain a histogram representing the distribution of image pixel values;

[0075] Normalize the histogram so that the number of pixels at each gray level is between 0 and 1;

[0076] The normalized histogram is used to calculate the cumulative distribution function. The pixels of the original image are mapped to new grayscale levels according to the cumulative distribution function, thereby changing the distribution of pixel values. For each pixel, its grayscale value is used as input, the cumulative distribution function is searched and the new grayscale level is calculated. The new grayscale level is assigned to the original image pixel to obtain the equalized image.

[0077] For example, the histogram equalization method can enhance the contrast and dynamic range of an image. This method makes the distribution of pixel values ​​more uniform and fully utilizes the grayscale range, thereby improving the visual effect of the image.

[0078] The equalized image is divided into multiple regions, and a local contrast enhancement operation is performed on each region. The local contrast enhancement operation is performed on each region using the limited contrast adaptive histogram equalization method, and the parameters of the limited contrast adaptive histogram equalization method are adjusted to obtain a result suitable for the enhancement effect.

[0079] For example, the adjustment of the contrast limit can balance the enhancement effect and the control of image noise, thereby improving the details and clarity of the image. After the contrast enhancement is completed, the enhanced local areas are re-merged into the final image.

[0080] Specifically, the specific process of preliminarily estimating the intrinsic and extrinsic parameters of the camera in step S3 is as follows:

[0081] First, select a calibration plate of known size and shape and mark it for feature point extraction;

[0082] Second, use a fixed camera to shoot the calibration plate, ensuring that the camera position and direction do not change during the shooting process;

[0083] Third, the captured calibration plate image is preprocessed, and the feature point detection algorithm is used to extract the feature points on the calibration plate in the image;

[0084] For example, the specific process of extracting feature points on the calibration plate in the image using the Harris corner detection algorithm is as follows:

[0085] According to the calculated image gradient, the Harris response function is calculated at each pixel point. The calculation formula of the Harris response function is:

[0086] R=det(M)-k*trace(M)^2

[0087] Where R is the Harris response function, M is a 2x2 autocorrelation matrix, k is an adjustable parameter, det(M) is the determinant of M, and trace(M) is the trace of M.

[0088] The calculated Harris response function is thresholded and non-maximum suppressed to select corner points with higher Harris response. An appropriate threshold is set according to the value of the Harris response function, and non-maximum suppression is used to eliminate weaker corner points among adjacent corner points.

[0089] Perform sub-pixel precise positioning around the selected corner points to improve the precision and accuracy of feature points.

[0090] Fourth, according to the marks on the calibration plate, the pixel coordinates of each feature point in the image coordinate system are extracted;

[0091] Fifth, based on the known size and shape of the calibration plate, calculate the actual coordinates of each feature point in the world coordinate system;

[0092] Sixth, a linear equation system is established based on the intrinsic and extrinsic parameters of the camera, wherein the unknown parameters are the intrinsic and extrinsic parameters of the camera;

[0093] Seventh, the camera's internal and external parameters are estimated using the least squares method.

[0094] Specifically, the step S3 further includes optimizing the estimated internal parameters, and the optimization goal is to minimize the reprojection error between the actual feature point coordinates and the feature points in the image.

[0095] For example, the estimated internal parameters can be optimized by the least squares method to minimize the reprojection error between the actual feature point coordinates and the feature points in the image. The specific steps are as follows:

[0096] First, the optimization objective is defined as minimizing the reprojection error between the coordinates of the actual feature points and the feature points in the image. The reprojection error represents the accuracy of the estimated internal parameters in mapping the actual feature points to the image space.

[0097] Second, using the camera model and the estimated internal parameters, the coordinates of the actual feature points are projected into the image space to obtain the estimated feature point coordinates. The difference between the actual feature point coordinates and the estimated feature point coordinates is then calculated, which is the reprojection error.

[0098] Third, the optimization objective is transformed into a minimization problem, where the objective function is the sum of squares of the reprojection errors and the variables to be optimized are the internal parameters;

[0099] Fourth, iteratively optimize the intrinsic parameters. In each iteration, the reprojection error is calculated based on the current intrinsic parameter estimate, and the estimate of the intrinsic parameters is updated based on the gradient or Jacobian matrix of the reprojection error. This process is repeated until convergence conditions are reached, such as the reprojection error is less than a certain threshold or the change in the intrinsic parameters is small.

[0100] Through the above steps, the estimated internal parameters are optimized using the least squares method to minimize the reprojection error between the actual feature point coordinates and the feature points in the image. This can improve the accuracy of the camera model and the precision of the internal parameters, thereby improving the imaging effect of the camera in the actual scene.

[0101] Specifically, the specific process of establishing a pinhole camera model based on the preliminary estimation of the camera's internal and external parameters and correcting the radial distortion during the camera imaging process in step S3 is as follows:

[0102] First, the camera is abstracted into a pinhole camera model, which includes internal and external parameters;

[0103] Exemplarily, the internal parameters include focal length, principal point position, and lens distortion parameters, and the external parameters include the position and direction of the camera.

[0104] Second, a standard radial distortion model is used to describe the effect of radial distortion, and the collected images are corrected to eliminate the influence of radial distortion.

[0105] Third, based on the radial distortion model and distortion parameters, a dedistortion operation is performed on each pixel in the image, and the distorted image is mapped into a distortion-corrected image. That is, the coordinates of each pixel are inversely mapped to obtain the coordinates on the distortion-corrected image.

[0106] Fourth, when performing dedistortion correction, the distortion-corrected image is interpolated to fill in the missing pixel values ​​to obtain a smooth corrected image.

[0107] Illustratively, through the above steps, the established pinhole camera model and distortion correction method can be used to correct the radial distortion in the imaging process, thereby ensuring the accuracy and reliability of the measurement results during the camera calibration of the collected windshield defrost contour image.

[0108] Specifically, the specific process of calculating the area of ​​the defrost and defogging area of ​​the windshield according to the calibrated and corrected contour image in step S4 is as follows:

[0109] First, extracting the boundary points of the contour from the contour image of the defrosted and defogging area of ​​the windshield after calibration and correction, wherein the boundary points are a set of pixel coordinates on the contour curve;

[0110] Second, the pixel coordinates of the contour boundary points are converted to actual coordinates according to the camera calibration parameters;

[0111] Third, the transformed boundary points are regarded as vertices of polygons and the area of ​​the contour region is calculated using the Gregorian formula.

[0112] For example, the specific formula for calculating the area of ​​the defrost and defogging region of the windshield after calibration and correction using the Gregorian formula is as follows:

[0113] Suppose there is a polygon with n vertices, where the coordinates of the vertices are represented as (x1,y1),(x1,y2),...,(x n ,y n ), arranged in counter-clockwise order.

[0114] According to Gregorian formula, the area of ​​a polygon can be obtained by calculating the determinant of the vertex coordinates:

[0115] S=0.5*|(x1*y2+x2*y3+...+x n-1 *y n +x n *y1)-(y1*x2+y2

[0116] *x3+...+y n-1 *x n +y n *x1)|

[0117] Among them, “||” represents the operation of finding the absolute value, S represents the area of ​​the windshield defrosting and defogging area, and x n-1 Indicates the horizontal coordinate of the n-1th vertex, x n Indicates the horizontal coordinate of the nth vertex, y n Indicates the vertical coordinate of the nth vertex, y n-1 Indicates the vertical coordinate of the n-1th vertex.

[0118] By substituting the vertex coordinates on the contour image of the defrost and defogging area of ​​the windshield after calibration and correction into the above formula, the required area can be calculated, and the area of ​​the defrost and defogging area of ​​the windshield can be accurately calculated, thereby achieving accurate and larger-area defrosting and defogging of the windshield.

[0119] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting the defrosting and defogging area of ​​a car windshield, characterized in that: The method comprises the following steps: Step S1: using a fixed camera to automatically capture the defrosting and defogging area of ​​the windshield, obtaining an image of the windshield in front of the car, and preprocessing the captured image; Step S2: using a computer vision algorithm to perform contour recognition on the preprocessed image to obtain a contour image of the defrosting and defogging area of ​​the windshield; Step S3: using the Tsai two-step calibration method to perform camera calibration on the identified contour image of the defrosting and defogging area of ​​the windshield, including preliminarily estimating the internal and external parameters of the camera, and then establishing a pinhole camera model based on the preliminarily estimated internal and external parameters of the camera, and correcting the radial distortion in the camera imaging process; Step S4: Calculate the area of ​​the defrost and defogging area of ​​the windshield according to the calibrated and corrected contour image.

2. The method for detecting the defrosting and defogging area of ​​a car windshield according to claim 1, characterized in that: The specific process of step S2 is as follows: First, edge detection algorithm is used to perform edge detection on the preprocessed image: Perform gradient calculation on the preprocessed image and use the Sobel operator to calculate the gradients in the horizontal and vertical directions; In edge detection, the non-maximum suppression method is used to retain the detail information of the edge, that is, for each pixel, only the local maximum in the gradient direction is retained to obtain the gradient image; According to the set high threshold and low threshold, the gradient image is binarized and the pixels are marked as strong edge, weak edge and non-edge; According to the gradient image and threshold processing results, a complete edge is formed by connecting strong edge pixels with adjacent weak edge pixels; Second, based on the results of edge detection, extract the contours in the image: Based on the connection relationship of edge pixels, adjacent edge pixels are grouped into a connected component, each connected component represents a contour, and a connectivity detection algorithm is used to determine the connection relationship between edge pixels; The discrete points in the connected components are curve fitted to obtain a smoother contour.

3. The method for detecting the defrosting and defogging area of ​​a car windshield according to claim 2, characterized in that: The step S2 also includes performing image enhancement on the preprocessed image, specifically as follows: First, convert the color image into a grayscale image, traverse each pixel of the image, use its grayscale value as an index, increase the count at the corresponding position in the histogram, and obtain a histogram representing the distribution of image pixel values; Second, the histogram is normalized so that the number of pixels at each gray level is between 0 and 1; Third, the normalized histogram is used to calculate the cumulative distribution function. According to the cumulative distribution function, the pixels of the original image are mapped to the new grayscale, thereby changing the distribution of the pixel values. For each pixel, its grayscale value is used as input, the cumulative distribution function is searched and the new grayscale is calculated. The new grayscale is assigned to the original image pixel to obtain the equalized image. Fourth, the equalized image is divided into multiple regions, a local contrast enhancement operation is performed on each region, a limited contrast adaptive histogram equalization method is used to perform a local contrast enhancement operation on each region, and the parameters of the limited contrast adaptive histogram equalization method are adjusted to obtain a result suitable for the enhancement effect.

4. The method for detecting the defrosting and defogging area of ​​a car windshield according to claim 3, characterized in that: The specific process of preliminarily estimating the internal and external parameters of the camera in step S3 is as follows: First, select a calibration plate of known size and shape and mark it for feature point extraction; Second, use a fixed camera to shoot the calibration plate to ensure that the camera position and direction do not change during the shooting process; Third, the captured calibration plate image is preprocessed, and the feature point detection algorithm is used to extract the feature points on the calibration plate in the image; Fourth, according to the marks on the calibration plate, the pixel coordinates of each feature point in the image coordinate system are extracted; Fifth, based on the known size and shape of the calibration plate, calculate the actual coordinates of each feature point in the world coordinate system; Sixth, a linear equation system is established according to the internal parameters and external parameters of the camera, wherein the unknown parameters are the internal parameters and external parameters of the camera; Seventh, the camera's internal and external parameters are initially estimated using the least squares method.

5. The method for detecting the defrosting and defogging area of ​​a car windshield according to claim 4, characterized in that: The step S3 also includes optimizing the estimated internal parameters, and the optimization goal is to minimize the reprojection error between the actual feature point coordinates and the feature points in the image.

6. A method for detecting the defrosting and defogging area of ​​a car windshield according to claim 5, characterized in that: The specific process of establishing a pinhole camera model based on the preliminary estimation of the camera's internal and external parameters and correcting the radial distortion during the camera imaging process in step S3 is as follows: First, the camera is abstracted into a pinhole camera model, which includes internal and external parameters; Second, a standard radial distortion model is used to describe the effect of radial distortion, and the collected images are distorted to eliminate the influence of radial distortion; Third, according to the radial distortion model and distortion parameters, a dedistortion operation is performed on each pixel in the image, and the distorted image is mapped into a distortion-corrected image, that is, the coordinates of each pixel are inversely mapped to obtain the coordinates on the distortion-corrected image; Fourth, when performing de-distortion correction, the distortion-corrected image is interpolated to fill in the missing pixel values ​​to obtain a smooth corrected image.

7. A method for detecting the defrosting and defogging area of ​​a car windshield according to claim 6, characterized in that: The specific process of calculating the area according to the contour image of the defrosting and defogging area of ​​the windshield after calibration and correction in step S4 is as follows: First, extracting the boundary points of the contour from the contour image of the defrosting and defogging area of ​​the windshield after calibration and correction, wherein the boundary points are a set of pixel coordinates on the contour curve; Second, the pixel coordinates of the contour boundary points are converted into actual coordinates according to the camera calibration parameters; Third, the transformed boundary points are regarded as vertices of polygons and the area of ​​the contour region is calculated using the Gregorian formula.

Citation Information

Patent Citations

  • Automobile defrosting test-used foreside windscreen area acquisition method under low temperature warehouse environment

    CN108428246A

Cited By

  • Double-cavity catheter positioning system based on image registration

    CN120053842A