Search

CN-121982108-A - Method and device for detecting aberration removal abnormality of camera and computer equipment

CN121982108ACN 121982108 ACN121982108 ACN 121982108ACN-121982108-A

Abstract

The application relates to a method and a device for detecting aberration removal abnormality of a camera and computer equipment. The method comprises the steps of obtaining an internal parameter containing a camera and a target image, carrying out lossless distortion correction on the target image according to the internal parameter to obtain a first full-width undistorted image, extracting a target contour in the first full-width undistorted image, determining distribution characteristics and geometric characteristics of the target contour in the first full-width undistorted image, and verifying the distribution characteristics and/or the geometric characteristics to determine a distortion removal abnormal result of the first full-width undistorted image. By adopting the method, the accuracy of the de-distortion anomaly detection of the camera can be improved.

Inventors

  • ZHENG LILI
  • ZHANG JUN
  • WU MENG

Assignees

  • 福思(杭州)智能科技有限公司

Dates

Publication Date
20260505
Application Date
20251205

Claims (11)

  1. 1. The method for detecting the aberration removal abnormality of the camera is characterized by comprising the following steps: acquiring internal parameters including a camera and a target image; performing lossless distortion correction on the target image according to the internal parameters to obtain a first full-width de-distortion map; extracting a target contour in the first full-width de-distortion map; determining the distribution characteristics and the geometric characteristics of the target profile in the first full-width de-distortion map; and verifying the distribution characteristics and/or the geometric characteristics, and determining the de-distortion abnormal result of the first full-width de-distortion graph.
  2. 2. The method of claim 1, wherein the extracting the target contour in the first full-width de-distortion map comprises: converting the first full-width de-distortion map to obtain a single-channel target image; Threshold segmentation is carried out on the single-channel target image to obtain a binary image only comprising foreground and background pixels; and carrying out contour extraction on the binary image to obtain contour information of all extracted candidate contours, and screening out target contours according to the contour information.
  3. 3. The method of claim 1, wherein prior to said determining the distribution and geometry of the target profile in the first full-width de-distortion map, the method further comprises: creating a mask image of the same resolution as the first full-width undistorted map; Determining a target contour in the mask image according to the position of the target contour in the first full-width de-distortion map, and setting the pixel value of each pixel point of a pixel filling area corresponding to the target contour in the mask image as a first pixel value; determining a gray average value of a pixel filling area in the first full-width de-distortion graph; and if the difference value between the first pixel value and the gray average value is in a preset value range, the target contour is effective.
  4. 4. The method of claim 2, wherein said determining the distribution and geometry of the target profile in the first full-width de-distortion map comprises: Determining a filling area formed by the target contour and the image edge of the first full-width de-distortion graph, and determining a first number of minimum circumscribed polygons formed by the filling area to obtain the distribution characteristics of the target contour in the first full-width de-distortion graph; Determining the position of the minimum circumscribing polygon in the first full-width de-distortion graph, and determining the second number of the minimum circumscribing polygons corresponding to the image edges in the first full-width de-distortion graph according to the position; Determining a geometric difference value between the minimum circumscribed polygons corresponding to the image edges in a preset direction corresponding to the distribution characteristics according to the distribution characteristics of the pixel filling areas; and determining the geometric characteristics of the target contour in the first full-width de-distortion map by using the second quantity and/or the geometric difference value.
  5. 5. The method of claim 4, wherein the verifying the distribution feature and/or the geometric feature to determine the de-distortion anomaly result for the first full-scale de-distortion map comprises: If at least one of the first number is not a first preset number value, the second number is not a second preset number value, and the geometric difference is smaller than a preset deviation exists, determining that a de-distortion abnormality result of the first full-width de-distortion graph is de-distortion abnormality.
  6. 6. The method according to any one of claims 1 to 5, further comprising: Generating at least one preset image comprising the preset geometric reference information according to the preset geometric reference information and the resolution of the target image; Respectively carrying out lossless distortion correction on each preset image according to the internal parameters to obtain respective corresponding second full-width de-distortion graphs; and detecting the geometric information in each second full-width de-distortion graph to obtain detection results, and determining abnormal results of distortion coefficients in the internal parameters according to each detection result.
  7. 7. The method according to claim 6, wherein the preset geometric reference information includes preset straight line information, the detecting geometric information in each of the second full-width de-distortion maps to obtain detection results, and determining an abnormal result of the distortion coefficient in the internal parameter according to each detection result includes: Traversing each pixel point in the second full-width de-distortion map aiming at each second full-width de-distortion map, and extracting a non-zero pixel position in the second full-width de-distortion map according to the pixel value of the traversed pixel point to obtain a first non-zero pixel point set used for representing a straight line; Fitting according to the non-zero pixel positions of all non-zero pixel points in the first non-zero pixel point set to obtain the number of straight lines of fitted straight lines, and determining the straightness of the fitted straight lines; If the number of straight lines and/or the straightness cannot meet the corresponding preset values, determining that the abnormal result of the distortion coefficient in the internal parameters is that the distortion coefficient is abnormal.
  8. 8. The method of claim 6, wherein the predetermined geometric reference information includes predetermined concentric circle information, the detecting geometric information in each of the second full-width de-distortion maps to obtain detection results, and determining an abnormal result of the distortion coefficient in the internal parameter according to each detection result includes: Traversing each pixel point in the second full-width de-distortion graph, and extracting a non-zero pixel position in the second full-width de-distortion graph according to the pixel value of the traversed pixel point to obtain a second non-zero pixel point set used for representing concentric circles; determining closed data of concentric circles and roundness of the concentric circles in the first full-width de-distortion map according to the second non-zero pixel point set; and if the closed data and/or the roundness of the concentric circles do not meet the respective corresponding preset values, determining that the abnormal result of the distortion coefficient in the internal parameters is that the distortion coefficient is abnormal.
  9. 9. A camera de-distortion anomaly detection device, the device comprising: The data acquisition module is used for acquiring internal parameters including a camera and a target image; The image generation module is used for generating a preset image comprising preset geometric reference information according to the preset geometric reference information and the resolution of the target image; The distortion correction module is used for carrying out lossless distortion correction on the target image according to the internal parameters to obtain a first full-width de-distortion map; the contour extraction module is used for extracting a target contour in the first full-width de-distortion graph; and the image detection module is used for determining the distribution characteristics and the geometric characteristics of the target contour in the first full-width de-distortion graph, checking the distribution characteristics and/or the geometric characteristics and determining the de-distortion abnormal result of the first full-width de-distortion graph.
  10. 10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
  11. 11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.

Description

Method and device for detecting aberration removal abnormality of camera and computer equipment Technical Field The present application relates to the field of image processing technologies, and in particular, to a method and apparatus for detecting a camera de-distortion anomaly, and a computer device. Background The camera de-distortion anomaly detection is a key step in computer vision and image processing, the traditional camera internal parameter calibration method usually carries out one-time calibration under a laboratory environment, the obtained distortion parameters are fixedly used, and when the calibration operation is not standard (such as improper placement of a calibration plate and insufficient number of calibration images) or the calibration algorithm is selected improperly, the obtained distortion parameters have errors, but the system cannot identify the anomaly. More seriously, such abnormal distortion parameters are continuously used, resulting in all subsequent image processing and analysis being based on the wrong geometry. However, camera de-distortion anomaly detection is a key element in ensuring accuracy, safety, and reliability of the vision system. Therefore, a method for improving the accuracy of the de-distortion anomaly detection of the camera is needed. Disclosure of Invention In view of the foregoing, it is desirable to provide a camera de-distortion anomaly detection method, apparatus, computer device, computer readable storage medium, and computer program product that can improve the accuracy of camera de-distortion anomaly detection. In a first aspect, the present application provides a method for detecting a camera de-distortion anomaly, including: acquiring internal parameters including a camera and a target image; performing lossless distortion correction on the target image according to the internal parameters to obtain a first full-width de-distortion map; extracting a target contour in the first full-width de-distortion map; determining the distribution characteristics and the geometric characteristics of the target profile in the first full-width de-distortion map; and verifying the distribution characteristics and/or the geometric characteristics, and determining the de-distortion abnormal result of the first full-width de-distortion graph. In one embodiment, the extracting the target contour in the first full-width de-distortion map includes: converting the first full-width de-distortion map to obtain a single-channel target image; Threshold segmentation is carried out on the single-channel target image to obtain a binary image only comprising foreground and background pixels; and carrying out contour extraction on the binary image to obtain contour information of all extracted candidate contours, and screening out target contours according to the contour information. In one embodiment, before said determining the distribution features and the geometric features of the target contour in the first full-width de-distortion map, the method further comprises: creating a mask image of the same resolution as the first full-width undistorted map; Determining a target contour in the mask image according to the position of the target contour in the first full-width de-distortion map, and setting the pixel value of each pixel point of a pixel filling area corresponding to the target contour in the mask image as a first pixel value; determining a gray average value of a pixel filling area in the first full-width de-distortion graph; and if the difference value between the first pixel value and the gray average value is in a preset value range, the target contour is effective. In one embodiment, the determining the distribution features and the geometric features of the target contour in the first full-width de-distortion map includes: Determining a filling area formed by the target contour and the image edge of the first full-width de-distortion graph, and determining a first number of minimum circumscribed polygons formed by the filling area to obtain the distribution characteristics of the target contour in the first full-width de-distortion graph; Determining the position of the minimum circumscribing polygon in the first full-width de-distortion graph, and determining the second number of the minimum circumscribing polygons corresponding to the image edges in the first full-width de-distortion graph according to the position; Determining a geometric difference value between the minimum circumscribed polygons corresponding to the image edges in a preset direction corresponding to the distribution characteristics according to the distribution characteristics of the pixel filling areas; and determining the geometric characteristics of the target contour in the first full-width de-distortion map by using the second quantity and/or the geometric difference value. In one embodiment, the verifying the distribution feature and/or the geometric feature, determining the de-disto