Vehicle-mounted total screen defect detection method and system

By iteratively segmenting, angle transformation, filtering and brightness adjustment processing on the vehicle-mounted screen image, combined with iterative processing of defect extraction cost function, the problem of inaccurate defect position recognition and inconspicuous defect contour in vehicle-mounted screen defect detection is solved, and the problem of inaccurate defect position recognition and inconspicuous defect contour is achieved. More efficient and accurate defect detection.

CN119205671APending Publication Date: 2024-12-27CHONGQING LIANGJIANG LIANCHUANG ELECTRONICS CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411263880.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, the defect detection of on-board total screens has problems such as inaccurate defect position recognition and inconspicuous output defect profiles.

Method used

By obtaining the vehicle-mounted screen image to be detected, iterative segmentation processing, angle transformation processing, filtering processing and brightness adjustment processing, the defect extraction cost function is determined, and iterative processing is used to output the defect profile curve, thereby extracting the defect image and defect location.

Benefits of technology

The accuracy and detection efficiency of defect positioning identification are improved, ensuring the accuracy of defect positioning and the obviousness of defect profile.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205671A_ABST
    Figure CN119205671A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle-mounted total screen defect detection method and system, and the method comprises the steps: obtaining a to-be-detected vehicle-mounted total screen image, and carrying out the iterative segmentation of the to-be-detected vehicle-mounted total screen image, so as to obtain a target image; performing angle transformation processing on the target image to obtain a transformed image; filtering the transformed image to obtain a filtered image; performing brightness adjustment processing on the filtered image to obtain an adjusted image; determining a defect extraction cost function, performing iterative processing on the defect extraction cost function to output a defect profile curve, extracting a corresponding defect from the adjusted image based on the defect profile curve to output a defect image and a defect position. Then, defect positioning is completed through the defect extraction cost function and the defect profile curve, the defect detection efficiency can be improved, it can be guaranteed that defect positioning is more accurate, and the defect profile is more obvious.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of defect detection, and specifically relates to a vehicle-mounted total screen defect detection method and system. Background Art

[0002] The vehicle-mounted main screen is a central control tool installed on the vehicle to control some of the vehicle's functions. With the development of electric vehicles, LCD vehicle-mounted main screens have been widely used in the operation and use of vehicles. In order to ensure a good experience and look and feel of the vehicle, the vehicle-mounted main screen needs to be inspected for defects after it is produced and before it is installed on the vehicle. However, in the actual defect detection process, most of it is done manually, and in the existing technology, some defect detection of the vehicle-mounted main screen is completed by machine vision, but it has defects such as inaccurate defect position identification and unclear output defect contour. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a vehicle-mounted total screen defect detection method and system, which are used to solve the technical problems in the prior art.

[0004] On the one hand, the present invention provides the following technical solution, a method for detecting defects of a vehicle-mounted total screen, comprising: Acquire a vehicle-mounted total screen image to be detected, and perform iterative segmentation processing on the vehicle-mounted total screen image to be detected to obtain a target image; Performing angle transformation processing on the target image to obtain a transformed image; Performing filtering on the transformed image to obtain a filtered image; Performing brightness adjustment processing on the filtered image to obtain an adjusted image; A defect extraction cost function is determined, the defect extraction cost function is iteratively processed to output a defect contour curve, and corresponding defects are extracted from the adjusted image based on the defect contour curve to output a defect image and a defect position.

[0005] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention first obtains the image of the vehicle-mounted total screen to be detected, and iteratively segments the image of the vehicle-mounted total screen to be detected to obtain a target image; then the target image is angle-transformed to obtain a transformed image; then the transformed image is filtered to obtain a filtered image; then the filtered image is brightness-adjusted to obtain an adjusted image; finally, a defect extraction cost function is determined, the defect extraction cost function is iteratively processed to output a defect contour curve, and corresponding defects are extracted from the adjusted image based on the defect contour curve to output a defect image and a defect position. The present invention can improve the accuracy of subsequent defect location and identification by performing a series of processing on the image, and then completes the defect location through the defect extraction cost function and the defect contour curve, which can improve the efficiency of defect detection while ensuring that the defect location is more accurate and the defect contour is more obvious.

[0006] Preferably, the step of iteratively segmenting the vehicle-mounted total screen image to be detected to obtain a target image comprises: Identify all pixel points in the vehicle-mounted total screen image to be detected and pre-set an initial segmentation threshold; The points whose pixel values ​​in the vehicle-mounted total screen image to be detected are higher than the initial segmentation threshold are taken as first pixel points, and the points whose pixel values ​​in the vehicle-mounted total screen image to be detected are not higher than the initial segmentation threshold are taken as second pixel points; Determine an image segmentation variance based on the first pixel point and the second pixel point : ; In the formula, is the image size of the vehicle screen image to be detected, Respectively represent the number of the first pixel and the second pixel, Respectively represent the grayscale mean of all first pixel points and all second pixel points; Changing the value of the initial segmentation threshold and recalculating the image segmentation variance, and taking the initial segmentation threshold corresponding to the maximum image segmentation variance as the final segmentation threshold; The vehicle-mounted total screen image to be detected is segmented based on the final segmentation threshold to obtain a target image.

[0007] Preferably, the step of performing angle transformation processing on the target image to obtain a transformed image comprises: Extract all edge points of the target image, extract all contours of the target image based on all the edge points, and take the largest contour as the target contour: The four corner point contour coordinates of the target contour are extracted, and the four corner point transformation coordinates after the angle transformation are pre-set, and the angle transformation equation is determined based on the corner point contour coordinates and the corner point transformation coordinates: ; In the formula, Indicates The coordinates of the corner points are transformed. Indicates The contour coordinates of the corner points, Represents the angle transformation matrix; Reversely solving the angle transformation equation based on the corner point contour coordinates and the corner point transformation coordinates to obtain an angle transformation matrix; The target image is angle-transformed based on the angle transformation matrix to obtain a transformed image.

[0008] Preferably, the step of filtering the transformed image to obtain a filtered image comprises: Determine an initial filter, and adjust the filtering direction and filtering frequency of the initial filter to obtain a plurality of adjustment filters; The transformed image is filtered based on the plurality of adjustment filters to obtain a filtered image. : ; ; In the formula, Indicates Filter frequency The corresponding filter factor is Indicates The filtering direction angles, represents the pixel coordinates in the transformed image, Indicates the filter bandwidth.

[0009] Preferably, the step of performing brightness adjustment processing on the filtered image to obtain an adjusted image includes: Calculate the average brightness of the filtered image : ; In the formula, represents the image size of the filtered image, express The gray value of the pixel at Setting a sliding window in the filtered image, scanning the entire filtered image in sequence by moving the sliding window and determining the grayscale value of each pixel in the sliding window; Count the grayscale values ​​of all pixels in the sliding window and the average brightness of the filtered image A grayscale difference between the two, and determining a difference matrix based on the grayscale difference; Performing interpolation processing on the difference matrix corresponding to each sliding window to obtain an expanded matrix; Identify the grayscale values ​​of the pixels of the filtered image to obtain a grayscale value matrix, subtract the grayscale value matrix from the expanded matrix to obtain a subtraction matrix, determine the grayscale values ​​of the adjusted pixels based on the subtraction matrix, and determine the adjusted image based on the grayscale values ​​of the adjusted pixels.

[0010] Preferably, the steps of determining a defect extraction cost function, iteratively processing the defect extraction cost function to output a defect contour curve, extracting corresponding defects from the adjusted image based on the defect contour curve, and outputting a defect image and a defect position include: Set a closed initial profile curve , based on the initial contour curve, determine the grayscale mean within the curve The gray value outside the curve : ; ; ; In the formula, , They represent the inner area and outer area of ​​the initial contour curve respectively. Indicates adjusting the grayscale value of the image. represents the regularization factor, Indicates the curve step value; Based on the grayscale mean value within the curve The gray value outside the curve Determining first generation value : ; In the formula, is the adjustment factor; Based on the initial contour curve Calculate the correction value : ; ; ; In the formula, Indicates the area where the image is adjusted. represents the Gaussian function, , Respectively represent the points on the initial contour curve after correction , The grayscale mean value within Respectively represent the points on the initial contour curve , The grayscale mean within ; Based on the correction value Determining the value of the second generation : ; Calculating the third generation value With the fourth generation of value : ; ; In the formula, represents the total differential; Based on the first generation value The second generation value , the third generation value And the fourth generation value Perform defect location to output defect image and defect position.

[0011] Preferably, the first generation value The second generation value , the third generation value And the fourth generation value The steps of locating defects to output defect images and defect locations include: Based on the first generation value The second generation value , the third generation value And the fourth generation value Determine the defect extraction cost function : ; In the formula, Represent the first, second, third, and fourth weights respectively; Adjust the initial contour curve And extract the cost function for the defect Perform minimization iteration processing to determine whether the defect extraction cost function after minimization is less than the judgment threshold. If the defect extraction cost function after minimization is less than the judgment threshold, the corresponding initial contour curve is output as the defect contour curve. Defects are located in the adjusted image according to the coordinate position of the defect contour curve and the contour, so as to output a defect image and a defect position.

[0012] In a second aspect, the present invention provides the following technical solution, a vehicle-mounted total screen defect detection system, the system comprising: A segmentation module is used to obtain the vehicle-mounted total screen image to be detected, and perform iterative segmentation processing on the vehicle-mounted total screen image to be detected to obtain a target image; A transformation module, used for performing angle transformation processing on the target image to obtain a transformed image; A filtering module, used for filtering the transformed image to obtain a filtered image; An adjustment module, used for performing brightness adjustment processing on the filtered image to obtain an adjusted image; The output module is used to determine a defect extraction cost function, iteratively process the defect extraction cost function to output a defect contour curve, extract corresponding defects from the adjusted image based on the defect contour curve, and output a defect image and a defect position.

[0013] In a third aspect, the present invention provides the following technical solution: a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, the vehicle-mounted total screen defect detection method as described above is implemented.

[0014] In a fourth aspect, the present invention provides the following technical solution: a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the vehicle-mounted total screen defect detection method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A flowchart of a vehicle-mounted total screen defect detection method provided in Embodiment 1 of the present invention; Figure 2 A structural block diagram of a vehicle-mounted total screen defect detection system provided in Embodiment 2 of the present invention; Figure 3 A schematic diagram of the hardware structure of a computer provided in another embodiment of the present invention.

[0017] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION

[0018] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the embodiments of the present invention, and should not be construed as limiting the present invention.

[0019] In the description of the embodiments of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0020] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0021] In the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific circumstances.

[0022] Embodiment 1 In the first embodiment of the present invention, Figure 1 As shown, a method for detecting defects of a vehicle-mounted total screen includes: S1, obtaining a vehicle-mounted total screen image to be detected, and performing iterative segmentation processing on the vehicle-mounted total screen image to be detected to obtain a target image; Specifically, the image of the vehicle-mounted total screen to be detected can be acquired through a camera device.

[0023] Wherein, the step S1 comprises: S11, identifying all pixel points in the vehicle-mounted total screen image to be detected, and presetting an initial segmentation threshold.

[0024] S12: taking points in the vehicle-mounted total screen image to be detected whose pixel values ​​are higher than the initial segmentation threshold as first pixel points and taking points in the vehicle-mounted total screen image to be detected whose pixel values ​​are not higher than the initial segmentation threshold as second pixel points.

[0025] S13: determining an image segmentation variance based on the first pixel point and the second pixel point : ; In the formula, is the image size of the vehicle screen image to be detected, Respectively represent the number of the first pixel and the second pixel, Respectively represent the grayscale mean of all first pixels and all second pixels.

[0026] S14, changing the value of the initial segmentation threshold and recalculating the image segmentation variance, and taking the initial segmentation threshold corresponding to the maximum image segmentation variance as the final segmentation threshold.

[0027] S15, performing segmentation processing on the vehicle-mounted total screen image to be detected based on the final segmentation threshold to obtain a target image; Specifically, by determining the optimal final segmentation threshold, the probability of image segmentation errors can be reduced, and the target image can be accurately segmented. The segmentation process is actually a binarization process, in which pixels greater than the final segmentation threshold are set as black pixels, and pixels less than the final segmentation threshold are set as white pixels, and the area composed of white pixels is used as the target image.

[0028] S2, performing angle transformation processing on the target image to obtain a transformed image; Specifically, since the positions of the shooting device and the vehicle-mounted main screen may be different, the image actually output is not a front view image, but a rotated and translated image. Therefore, it is necessary to perform angle transformation processing on the target image to obtain a transformed image of the front view perspective.

[0029] Wherein, the step S2 comprises: S21, extracting all edge points of the target image, extracting all contours of the target image based on all the edge points, and taking the largest contour as the target contour: Specifically, the edge point extraction process can be performed using the Canny algorithm.

[0030] S22, extracting the contour coordinates of four corner points of the target contour, and presetting the four corner point transformation coordinates after the angle transformation, and determining the angle transformation equation based on the corner point contour coordinates and the corner point transformation coordinates: ; In the formula, Indicates The coordinates of the corner points are transformed. Indicates The contour coordinates of the corner points, Represents the angle transformation matrix; Specifically, the corner point contour coordinates can be obtained through Hough transform, and for the angle transformation matrix, , , , , Represents the rotation amount in six directions respectively. , , Represents the displacement in three directions respectively.

[0031] S23. Reversely solve the angle transformation equation based on the corner point contour coordinates and the corner point transformation coordinates to obtain an angle transformation matrix.

[0032] S24, performing angle transformation on the target image based on the angle transformation matrix to obtain a transformed image; Specifically, after obtaining the angle transformation matrix, the actual endpoints of the target in the target image are multiplied by the angle transformation matrix, and the transformed endpoint coordinates can be output, thereby obtaining the transformed image.

[0033] S3, filtering the transformed image to obtain a filtered image; Specifically, the purpose of filtering the transformed image is to suppress the interference of the background on the vehicle-mounted main screen and improve the clarity of the image.

[0034] Wherein, the step S3 comprises: S31, determining an initial filter, and adjusting a filtering direction and a filtering frequency of the initial filter to obtain a plurality of adjustment filters; Specifically, in this embodiment, filters of four directions and three frequencies are selected, for a total of twelve adjustment filters.

[0035] S32, filtering the transformed image based on the plurality of adjustment filters to obtain a filtered image : ; ; In the formula, Indicates Filter frequency The corresponding filter factor is Indicates The filtering direction angles, represents the pixel coordinates in the transformed image, Indicates the filter bandwidth.

[0036] S4, performing brightness adjustment processing on the filtered image to obtain an adjusted image; Specifically, in actual situations, the obtained filtered image may have uneven brightness between regions, which in turn affects the identification of defects. Therefore, in this step, the brightness of the image is adjusted to improve the overall brightness uniformity of the image.

[0037] Wherein, the step S4 comprises: S41, calculating the average brightness of the filtered image : ; In the formula, represents the image size of the filtered image, express The gray value of the pixel at .

[0038] S42, setting a sliding window in the filtered image, scanning the entire filtered image in sequence by moving the sliding window and determining the grayscale value of each pixel in the sliding window.

[0039] S43: Counting the grayscale values ​​of all pixels in the sliding window and the average brightness of the filtered image A grayscale difference between the two is determined, and a difference matrix is ​​determined based on the grayscale difference.

[0040] S44, performing interpolation processing on the difference matrix corresponding to each sliding window to obtain an expanded matrix; Specifically, the interpolation process here is bicubic interpolation process, the purpose of which is to expand the difference matrix of the window to the entire filtered image.

[0041] S45. Identify the grayscale values ​​of the pixels of the filtered image to obtain a grayscale value matrix, subtract the grayscale value matrix from the expanded matrix to obtain a subtraction matrix, determine the grayscale values ​​of the adjusted pixels based on the subtraction matrix, and determine the adjusted image based on the grayscale values ​​of the adjusted pixels.

[0042] S5, determining a defect extraction cost function, iteratively processing the defect extraction cost function to output a defect contour curve, extracting corresponding defects from the adjusted image based on the defect contour curve, and outputting a defect image and a defect position; Wherein, the step S5 comprises: S51. Set a closed initial contour curve , based on the initial contour curve, determine the grayscale mean within the curve The gray value outside the curve : ; ; ; In the formula, , They represent the inner area and outer area of ​​the initial contour curve respectively. Indicates adjusting the grayscale value of the image. represents the regularization factor, Indicates the curve step value.

[0043] S52, based on the grayscale mean value in the curve The gray value outside the curve Determining first generation value : ; In the formula, is the adjustment factor; Specifically, in this embodiment, is 0.5.

[0044] S53, based on the initial contour curve Calculate the correction value : ; ; ; In the formula, Indicates the area where the image is adjusted. represents the Gaussian function, , Respectively represent the points on the initial contour curve after correction , The grayscale mean value within Respectively represent the points on the initial contour curve , The mean gray value within .

[0045] S54, based on the correction value Determining the value of the second generation : .

[0046] S55. Calculate the third generation value With the fourth generation of value : ; ; In the formula, represents the total differential.

[0047] S56, based on the first generation value The second generation value , the third generation value And the fourth generation value Perform defect location to output defect image and defect position; Wherein, the step S56 comprises: S561, based on the first generation value The second generation value , the third generation value And the fourth generation value Determine the defect extraction cost function : ; In the formula, Represent the first, second, third, and fourth weights respectively; Specifically, the first, second, third and fourth weights can be obtained by fitting.

[0048] S562: Adjust the initial contour curve And extract the cost function for the defect Perform minimization iteration processing to determine whether the defect extraction cost function after minimization is less than the judgment threshold. If the defect extraction cost function after minimization is less than the judgment threshold, the corresponding initial contour curve is output as the defect contour curve.

[0049] S563, locating the defect in the adjusted image according to the coordinate position and the contour of the defect contour curve, so as to output a defect image and a defect position; Specifically, after determining the defect contour curve, since the defect contour curve is a closed curve, the area enclosed by the defect contour curve is the actual position of the defect, and the expression of the defect contour curve is an expression about coordinates, so its specific position in the adjusted image can be determined through its expression, that is, the defect position.

[0050] The vehicle-mounted total screen defect detection method provided in the first embodiment of the present invention first obtains the vehicle-mounted total screen image to be detected, and iteratively segments the vehicle-mounted total screen image to be detected to obtain a target image; then, the target image is angle-transformed to obtain a transformed image; then, the transformed image is filtered to obtain a filtered image; then, the filtered image is brightness-adjusted to obtain an adjusted image; finally, a defect extraction cost function is determined, and the defect extraction cost function is iteratively processed to output a defect contour curve, and corresponding defects are extracted from the adjusted image based on the defect contour curve to output a defect image and a defect position. The present invention can improve the accuracy of subsequent defect positioning and identification by performing a series of processing on the image, and then completes the positioning of the defect through the defect extraction cost function and the defect contour curve, which can improve the efficiency of defect detection while ensuring that the defect positioning is more accurate and the defect contour is more obvious.

[0051] Embodiment 2 like Figure 2 As shown, in the second embodiment of the present invention, a vehicle-mounted total screen defect detection system is provided, and the system includes: Segmentation module 1, used for acquiring the vehicle-mounted total screen image to be detected, and performing iterative segmentation processing on the vehicle-mounted total screen image to be detected to obtain a target image; Transformation module 2, used for performing angle transformation processing on the target image to obtain a transformed image; A filtering module 3, used for filtering the transformed image to obtain a filtered image; An adjustment module 4, used for performing brightness adjustment processing on the filtered image to obtain an adjusted image; The output module 5 is used to determine a defect extraction cost function, iteratively process the defect extraction cost function to output a defect contour curve, extract the corresponding defect from the adjusted image based on the defect contour curve, and output a defect image and a defect position.

[0052] The segmentation module 1 comprises: An identification submodule, used to identify all pixels in the vehicle-mounted total screen image to be detected and preset an initial segmentation threshold; A pre-segmentation submodule, used to take points in the vehicle-mounted total screen image to be detected whose pixel values ​​are higher than the initial segmentation threshold as first pixel points and take points in the vehicle-mounted total screen image to be detected whose pixel values ​​are not higher than the initial segmentation threshold as second pixel points; A variance submodule, configured to determine the image segmentation variance based on the first pixel point and the second pixel point : ; In the formula, is the image size of the vehicle screen image to be detected, Respectively represent the number of the first pixel and the second pixel, Respectively represent the grayscale mean of all first pixel points and all second pixel points; A changing submodule, used to change the value of the initial segmentation threshold and recalculate the image segmentation variance, and use the initial segmentation threshold corresponding to the maximum image segmentation variance as the final segmentation threshold; The segmentation submodule is used to perform segmentation processing on the vehicle-mounted total screen image to be detected based on the final segmentation threshold to obtain a target image.

[0053] The transformation module 2 comprises: The first extraction submodule is used to extract all edge points of the target image, extract all contours of the target image based on all the edge points, and take the largest contour as the target contour: The second extraction submodule is used to extract the contour coordinates of the four corner points of the target contour, and pre-set the four corner point transformation coordinates after the angle transformation, and determine the angle transformation equation based on the corner point contour coordinates and the corner point transformation coordinates: ; In the formula, Indicates The coordinates of the corner points are transformed. Indicates The contour coordinates of the corner points, Represents the angle transformation matrix; A solving submodule, used for reversely solving the angle transformation equation based on the corner point contour coordinates and the corner point transformation coordinates to obtain an angle transformation matrix; The transformation submodule is used to perform angle transformation on the target image based on the angle transformation matrix to obtain a transformed image.

[0054] The filtering module 3 comprises: A first filtering submodule, used for determining an initial filter, and adjusting a filtering direction and a filtering frequency of the initial filter to obtain a plurality of adjusted filters; The second filtering submodule is used to filter the transformed image based on the plurality of adjustment filters to obtain a filtered image. : ; ; In the formula, Indicates Filter frequency The corresponding filter factor is Indicates The filtering direction angles, represents the pixel coordinates in the transformed image, Indicates the filter bandwidth.

[0055] The adjustment module 4 comprises: The brightness calculation submodule is used to calculate the average brightness of the filtered image. : ; In the formula, represents the image size of the filtered image, express The gray value of the pixel at A window submodule, used for setting a sliding window in the filtered image, scanning the entire filtered image in sequence by moving the sliding window and determining the gray value of each pixel in the sliding window; The difference submodule is used to count the grayscale values ​​of all pixels in the sliding window and the average brightness of the filtered image. A grayscale difference between the two, and determining a difference matrix based on the grayscale difference; An interpolation submodule, used for interpolating the difference matrix corresponding to each sliding window to obtain an expanded matrix; The adjustment submodule is used to identify the grayscale values ​​of the pixels of the filtered image to obtain a grayscale value matrix, subtract the grayscale value matrix from the expanded matrix to obtain a subtraction matrix, determine the grayscale values ​​of the adjusted pixels based on the subtraction matrix, and determine the adjusted image based on the grayscale values ​​of the adjusted pixels.

[0056] The output module 5 comprises: The curve setting submodule is used to set a closed initial contour curve , based on the initial contour curve, determine the grayscale mean within the curve The gray value outside the curve : ; ; ; In the formula, , They represent the inner area and outer area of ​​the initial contour curve respectively. Indicates adjusting the grayscale value of the image. represents the regularization factor, Indicates the curve step value; The first calculation submodule is used to calculate the grayscale mean value in the curve based on the grayscale mean value in the curve. The gray value outside the curve Determining first generation value : ; In the formula, is the adjustment factor; The second calculation submodule is used to calculate the initial contour curve based on the initial contour curve. Calculate the correction value : ; ; ; In the formula, Indicates the area where the image is adjusted. represents the Gaussian function, , Respectively represent the points on the initial contour curve after correction , The grayscale mean value within Respectively represent the points on the initial contour curve , The grayscale mean within ; The third calculation submodule is used to calculate the correction value based on the correction value. Determining the value of the second generation : ; The fourth calculation submodule is used to calculate the third generation value With the fourth generation of value : ; ; In the formula, represents the total differential; Defect output submodule is used to The second generation value , the third generation value And the fourth generation value Perform defect location to output defect image and defect position.

[0057] The defect output submodule includes: A function determining unit for determining a value based on the first generation value The second generation value , the third generation value And the fourth generation value Determine the defect extraction cost function : ; In the formula, Represent the first, second, third, and fourth weights respectively; Iteration unit for adjusting the initial contour curve And extract the cost function for the defect Perform minimization iteration processing to determine whether the defect extraction cost function after minimization is less than the judgment threshold. If the defect extraction cost function after minimization is less than the judgment threshold, the corresponding initial contour curve is output as the defect contour curve. The output unit is used to locate the defect in the adjusted image according to the coordinate position of the defect contour curve and the contour, so as to output the defect image and the defect position.

[0058] In some other embodiments of the present invention, the embodiments of the present invention provide the following technical solutions: a computer, comprising a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101; the processor 101 implements the vehicle-mounted total screen defect detection method as described above when executing the computer program.

[0059] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0060] Among them, the memory 102 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 102 may be inside or outside the data processing device. In a specific embodiment, the memory 102 is a non-volatile memory. In a specific embodiment, the memory 102 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0061] The memory 102 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101 .

[0062] The processor 101 implements the above-mentioned vehicle-mounted total screen defect detection method by reading and executing computer program instructions stored in the memory 102.

[0063] In some embodiments, the computer may further include a communication interface 103 and a bus 100. Figure 3 As shown, the processor 101, the memory 102, and the communication interface 103 are connected via a bus 100 and communicate with each other.

[0064] The communication interface 103 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present invention. The communication interface 103 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.

[0065] The bus 100 includes hardware, software or both, and couples the components of the computer device to each other. The bus 100 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although embodiments of the present invention describe and illustrate a particular bus, the present invention contemplates any suitable bus or interconnect.

[0066] The computer can execute the vehicle-mounted total screen defect detection method of the present invention based on the vehicle-mounted total screen defect detection system obtained, thereby realizing the vehicle-mounted total screen defect detection.

[0067] In some further embodiments of the present invention, in combination with the above-mentioned vehicle-mounted total screen defect detection method, the embodiments of the present invention provide the following technical solutions, a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned vehicle-mounted total screen defect detection method is implemented.

[0068] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0069] More specific examples of readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0070] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0071] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0072] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for detecting defects of a vehicle-mounted total screen, characterized in that: include: Acquire a vehicle-mounted total screen image to be detected, and perform iterative segmentation processing on the vehicle-mounted total screen image to be detected to obtain a target image; Performing angle transformation processing on the target image to obtain a transformed image; Performing filtering on the transformed image to obtain a filtered image; Performing brightness adjustment processing on the filtered image to obtain an adjusted image; A defect extraction cost function is determined, the defect extraction cost function is iteratively processed to output a defect contour curve, and corresponding defects are extracted from the adjusted image based on the defect contour curve to output a defect image and a defect position.

2. The vehicle-mounted total screen defect detection method according to claim 1, characterized in that: The step of iteratively segmenting the vehicle-mounted total screen image to be detected to obtain a target image comprises: Identify all pixel points in the vehicle-mounted total screen image to be detected and pre-set an initial segmentation threshold; The points whose pixel values ​​in the vehicle-mounted total screen image to be detected are higher than the initial segmentation threshold are taken as first pixel points, and the points whose pixel values ​​in the vehicle-mounted total screen image to be detected are not higher than the initial segmentation threshold are taken as second pixel points; Determine an image segmentation variance based on the first pixel point and the second pixel point : ; In the formula, is the image size of the vehicle screen image to be detected, Respectively represent the number of the first pixel and the second pixel, Respectively represent the grayscale mean of all first pixel points and all second pixel points; Changing the value of the initial segmentation threshold and recalculating the image segmentation variance, and taking the initial segmentation threshold corresponding to the maximum image segmentation variance as the final segmentation threshold; The vehicle-mounted total screen image to be detected is segmented based on the final segmentation threshold to obtain a target image.

3. The vehicle-mounted total screen defect detection method according to claim 1, characterized in that: The step of performing angle transformation processing on the target image to obtain a transformed image comprises: Extract all edge points of the target image, extract all contours of the target image based on all the edge points, and take the largest contour as the target contour: The four corner point contour coordinates of the target contour are extracted, and the four corner point transformation coordinates after the angle transformation are pre-set, and the angle transformation equation is determined based on the corner point contour coordinates and the corner point transformation coordinates: ; In the formula, Indicates The coordinates of the corner points are transformed. Indicates The contour coordinates of the corner points, Represents the angle transformation matrix; Reversely solving the angle transformation equation based on the corner point contour coordinates and the corner point transformation coordinates to obtain an angle transformation matrix; The target image is angle-transformed based on the angle transformation matrix to obtain a transformed image.

4. The vehicle-mounted total screen defect detection method according to claim 1, characterized in that: The step of filtering the transformed image to obtain a filtered image comprises: Determine an initial filter, and adjust the filtering direction and filtering frequency of the initial filter to obtain a plurality of adjustment filters; The transformed image is filtered based on the plurality of adjustment filters to obtain a filtered image. : ; ; In the formula, Indicates Filter frequency The corresponding filter factor is Indicates The filtering direction angles, represents the pixel coordinates in the transformed image, Indicates the filter bandwidth.

5. The vehicle-mounted total screen defect detection method according to claim 1, characterized in that: The step of performing brightness adjustment processing on the filtered image to obtain an adjusted image comprises: Calculate the average brightness of the filtered image : ; In the formula, represents the image size of the filtered image, express The gray value of the pixel at Setting a sliding window in the filtered image, scanning the entire filtered image in sequence by moving the sliding window and determining the grayscale value of each pixel in the sliding window; Count the grayscale values ​​of all pixels in the sliding window and the average brightness of the filtered image A grayscale difference between the two, and determining a difference matrix based on the grayscale difference; Performing interpolation processing on the difference matrix corresponding to each sliding window to obtain an expanded matrix; Identify the grayscale values ​​of the pixels of the filtered image to obtain a grayscale value matrix, subtract the grayscale value matrix from the expanded matrix to obtain a subtraction matrix, determine the grayscale values ​​of the adjusted pixels based on the subtraction matrix, and determine the adjusted image based on the grayscale values ​​of the adjusted pixels.

6. The vehicle-mounted total screen defect detection method according to claim 1, characterized in that: The steps of determining a defect extraction cost function, iteratively processing the defect extraction cost function to output a defect contour curve, extracting corresponding defects from the adjusted image based on the defect contour curve, and outputting a defect image and a defect position include: Set a closed initial profile curve , based on the initial contour curve, determine the grayscale mean within the curve The gray value outside the curve : ; ; ; In the formula, , They represent the inner area and outer area of ​​the initial contour curve respectively. Indicates adjusting the grayscale value of the image. represents the regularization factor, Indicates the curve step value; Based on the grayscale mean value within the curve The gray value outside the curve Determining first generation value : ; In the formula, is the adjustment factor; Based on the initial contour curve Calculate the correction value : ; ; ; In the formula, Indicates the area where the image is adjusted. represents the Gaussian function, , Respectively represent the points on the initial contour curve after correction , The grayscale mean value within Represent the points on the initial contour curve , The grayscale mean within ; Based on the correction value Determining the value of the second generation : ; Calculating the third generation value With the fourth generation of value : ; ; In the formula, represents the total differential; Based on the first generation value The second generation value , the third generation value And the fourth generation value Perform defect location to output defect image and defect position.

7. The vehicle-mounted total screen defect detection method according to claim 6, characterized in that: Based on the first generation value The second generation value , the third generation value And the fourth generation value The steps of locating defects to output defect images and defect locations include: Based on the first generation value The second generation value , the third generation value And the fourth generation value Determine the defect extraction cost function : ; In the formula, Represent the first, second, third, and fourth weights respectively; Adjust the initial contour curve And extract the cost function for the defect Perform minimization iteration processing to determine whether the defect extraction cost function after minimization is less than the judgment threshold. If the defect extraction cost function after minimization is less than the judgment threshold, the corresponding initial contour curve is output as the defect contour curve. Defects are located in the adjusted image according to the coordinate position of the defect contour curve and the contour, so as to output a defect image and a defect position.

8. A vehicle-mounted total screen defect detection system, characterized in that: The system comprises: A segmentation module is used to obtain the vehicle-mounted total screen image to be detected, and perform iterative segmentation processing on the vehicle-mounted total screen image to be detected to obtain a target image; A transformation module, used for performing angle transformation processing on the target image to obtain a transformed image; A filtering module, used for filtering the transformed image to obtain a filtered image; An adjustment module, used for performing brightness adjustment processing on the filtered image to obtain an adjusted image; The output module is used to determine a defect extraction cost function, iteratively process the defect extraction cost function to output a defect contour curve, extract corresponding defects from the adjusted image based on the defect contour curve, and output a defect image and a defect position.

9. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the vehicle-mounted total screen defect detection method as described in any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the vehicle-mounted total screen defect detection method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Naked eye light field 3D display image fusion method and system

    CN119399042A

  • A naked eye light field 3D display image fusion method and system

    CN119399042B