Vehicle-mounted screen fine defect detection method and system
By preprocessing, brightness correction, frequency domain compensation and detail feature enhancement of vehicle-mounted screen images, and combining them with detection models, the problems of precision and accuracy in identifying subtle defects on vehicle-mounted screens are solved, achieving more efficient defect detection.
Patent Information
- Application Number
- CN202510522976.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-09-19
AI Technical Summary
Existing technologies are unable to effectively identify subtle defects in vehicle-mounted screens, which affects the precision and accuracy of defect identification.
Defect detection is performed through a series of image processing steps, including preprocessing, brightness correction and normalization, frequency domain compensation, and detail feature enhancement, combined with a preset detection model.
It improves the precision and accuracy of defect detection, effectively removes noise and artifacts in images, retains detailed features, and improves model detection effects.
Smart Images

Figure CN120672648A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of defect detection, and specifically relates to a method and system for detecting subtle defects in vehicle-mounted screens. Background Art
[0002] The vehicle-mounted main screen is specifically 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.
[0003] For the sake of aesthetics and good use of the car screen, defects need to be detected before installation. Existing technology generally uses machine vision to perform defect detection, by acquiring images and performing denoising and other processing on the images, and then outputting the detection results through the model. However, since the car screen is generally a whole screen, subtle defects in it are difficult for the model to be recognized, which in turn affects the defect recognition precision and accuracy. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides a method and system for detecting subtle defects of vehicle-mounted screens, which are used to solve the technical problems in the prior art.
[0005] In one aspect, the present invention provides the following technical solution: a method for detecting subtle defects in an in-vehicle display, comprising: Acquire a target vehicle-mounted screen image, and pre-process the target vehicle-mounted screen image to obtain a processed vehicle-mounted screen image; Performing brightness correction and normalization processing on the processed vehicle-mounted screen image to obtain a corrected vehicle-mounted screen image; Performing frequency domain compensation processing on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image; Performing detail feature enhancement processing on the compensated vehicle-mounted screen image to obtain an enhanced vehicle-mounted screen image; Acquire a training vehicle-mounted screen image, input the training vehicle-mounted screen image into a preset detection model for training, and input the enhanced vehicle-mounted screen image into the trained preset detection model for detection to output a defect detection result.
[0006] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention first obtains the target vehicle-mounted screen image, pre-processes the target vehicle-mounted screen image to obtain a processed vehicle-mounted screen image; then performs brightness correction and normalization on the processed vehicle-mounted screen image to obtain a corrected vehicle-mounted screen image; then performs frequency domain compensation on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image; then performs detail feature enhancement on the compensated vehicle-mounted screen image to obtain an enhanced vehicle-mounted screen image; then obtains a training vehicle-mounted screen image, inputs the training vehicle-mounted screen image into a preset detection model for training, and inputs the enhanced vehicle-mounted screen image into the trained preset detection model for detection to output a defect detection result. The present invention performs brightness correction on the image to avoid the image from being locally too dark or too bright, and then performs frequency domain compensation on the image to effectively perform denoising and eliminate moiré patterns and artifacts in the image. Then, the image is enhanced in detail features to effectively retain and highlight the detail features in the image, so as to improve the precision and accuracy of subsequent model detection.
[0007] Preferably, the step of preprocessing the target vehicle screen image to obtain a processed vehicle screen image includes: The target vehicle-mounted screen image is subjected to image rotation, image cropping, median filtering, and ROI area extraction in sequence to obtain a processed vehicle-mounted screen image.
[0008] Preferably, the step of performing brightness correction and normalization on the processed vehicle screen image to obtain a corrected vehicle screen image includes: Get the shooting distance between the processed vehicle screen image and the shooting camera, and move the shooting camera to a preset distance And obtain the distance adjustment image taken at the corresponding position, and calculate the correction factor based on the processed vehicle screen image and the distance adjustment image : ; Where, is the camera focal length, Indicates the initial distance between the shooting camera and the vehicle screen in the processed vehicle screen image; Calculate the compensation factor for processing the vehicle screen image : ; Where, Indicates the distance between the centers of two adjacent pixels in the photosensitive chip of the camera. Indicates processing of vehicle screen images The number of pixels between the pixel and the center pixel; The processed vehicle screen image is normalized to obtain a normalized image based on the correction factor With the compensation factor Correct the normalized image to obtain a normalized corrected image : ; Where, Indicates processing of vehicle screen images The pixel value of the pixel at The normalized correction image Denormalization is performed to obtain the corrected vehicle screen image.
[0009] Preferably, the step of performing frequency domain compensation processing on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image includes: Performing grayscale conversion and Fourier transform processing on the corrected vehicle-mounted screen image in sequence to obtain a transformed image; Perform spectrum centering on the transformed image to obtain a centered image, and calculate the segmentation threshold of the centered image. : ; Where, Represent the grayscale mean and grayscale standard deviation of the centered image, respectively. represents the compensation factor; Based on the segmentation threshold Perform threshold segmentation on the centered image to obtain a segmented image : ; Where, Represents a centralized image Gray value at ; Based on the segmented image Determine the compensation for the vehicle screen image.
[0010] Preferably, the segmented image The steps for determining the compensation vehicle screen image include: The segmented image Perform frequency screening to obtain a screening image : ; Where, Represent the center point coordinates of the centralized image, Indicates is the radius of the spectrum circle with its center at Based on the screening image Determine the frequency image ; ; The frequency image is sequentially decentralized and inverse Fourier transformed to obtain a compensated vehicle screen image.
[0011] Preferably, the step of performing detail feature enhancement processing on the compensated vehicle screen image to obtain an enhanced vehicle screen image includes: Divide the compensated vehicle screen image into several equal-sized sub-blocks and calculate the initial grayscale update value of each sub-block ; The compensated vehicle screen image is divided into several sub-regions, each sub-region includes several sub-blocks, the sub-block close to the boundary of the sub-region is used as the boundary sub-block, the sub-block at the corner point of the corresponding sub-region in the boundary sub-block is used as the first sub-block, the remaining sub-blocks in the boundary sub-block are used as the second sub-block, and the remaining sub-blocks in the sub-region except the boundary sub-block are used as the third sub-block; If the pixel point in the sub-region is in the first sub-block, the initial grayscale update value of the first sub-block is used as the grayscale value of the pixel point; If the pixel point in the sub-region is in the second sub-block, the average value of the initial grayscale update values of the second sub-block and the two sub-blocks adjacent to the second sub-block is calculated, and the average value is used as the grayscale value of the pixel point; If the pixel point in the sub-area is in the third sub-block, the four sub-blocks adjacent to the third sub-block are obtained, and the grayscale value of the pixel point is determined based on the four sub-blocks. , to get the enhanced car screen image: ; Where, Respectively represent the initial grayscale update values of the adjacent upper, lower, left, and right sub-blocks, Respectively represent the pixel point to the corresponding third sub-block center pixel point 、 Distance in direction.
[0012] Preferably, the compensated vehicle screen image is divided into a number of sub-blocks of equal size, and the initial grayscale update value of each sub-block is calculated. The steps include: Divide the compensated vehicle screen image into several equal-sized sub-blocks and calculate the grayscale distribution correlation function of each sub-block : ; Where, Indicates the sub-block size, Indicates the Histogram distribution function of sub-blocks; The grayscale distribution correlation function Take the derivative to get the correlation slope, and calculate the maximum gray level based on the correlation slope : ; Where, represents the maximum value of the association slope; Set preset grayscale threshold , the histogram of the compensated vehicle screen image is greater than the preset gray level threshold Extract the partial copy and distribute it evenly to other gray levels to get the initial grayscale update value : ; Where, Indicates the The gray level of each sub-block, Indicates the height of the assigned gray level.
[0013] In a second aspect, the present invention provides the following technical solution: a system for detecting subtle defects in an in-vehicle display, the system comprising: A processing module, configured to obtain a target vehicle-mounted screen image and pre-process the target vehicle-mounted screen image to obtain a processed vehicle-mounted screen image; a correction module, configured to perform brightness correction and normalization processing on the processed vehicle-mounted screen image to obtain a corrected vehicle-mounted screen image; a compensation module, configured to perform frequency domain compensation processing on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image; an enhancement module, configured to perform detail feature enhancement processing on the compensated vehicle-mounted screen image to obtain an enhanced vehicle-mounted screen image; The detection module is used to obtain a training vehicle-mounted screen image, input the training vehicle-mounted screen image into a preset detection model for training, and input the enhanced vehicle-mounted screen image into the trained preset detection model for detection to output a defect detection result.
[0014] In the 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 method for detecting subtle defects in a vehicle-mounted screen as described above is implemented.
[0015] In a fourth aspect, the present invention provides the following technical solution: a storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned method for detecting subtle defects in vehicle-mounted screens. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] 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 embodiments or the description of the prior art. 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 any creative work.
[0017] Figure 1 Flowchart of the method for detecting subtle defects in vehicle-mounted screens provided in Example 1 of the present invention; Figure 2 This is a structural block diagram of the vehicle-mounted screen subtle defect detection system provided in Example 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.
[0018] The embodiments of the present invention will be further described below with reference to the accompanying drawings. DETAILED DESCRIPTION
[0019] The following describes embodiments of the present invention in detail, 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.
[0020] Example 1 In the first embodiment of the present invention, Figure 1 As shown, a method for detecting subtle defects of a vehicle-mounted screen includes: S1. Acquire a target vehicle screen image and pre-process the target vehicle screen image to obtain a processed vehicle screen image; Wherein, the step S1 is: The target vehicle screen image is sequentially subjected to image rotation, image cropping, median filtering, and ROI region extraction to obtain a processed vehicle screen image; Specifically, the above preprocessing steps are commonly used image processing methods in the prior art, and therefore will not be described in detail here.
[0021] S2. performing brightness correction and normalization processing on the processed vehicle screen image to obtain a corrected vehicle screen image; Wherein, the step S2 includes: S21, obtaining the shooting distance between the processed vehicle screen image and the shooting camera, and moving the shooting camera by a preset distance And obtain the distance adjustment image taken at the corresponding position, and calculate the correction factor based on the processed vehicle screen image and the distance adjustment image : ; Where, is the camera focal length, Indicates the initial distance between the shooting camera and the vehicle screen in the processed vehicle screen image; Specifically, first select one of the processed car screen images, then obtain the distance between the processed car screen image and the shooting camera, then add the preset distance to the distance, move the shooting camera, and then shoot to obtain the distance adjusted image.
[0022] S22, calculating the compensation factor for processing the vehicle screen image : ; Where, Indicates the distance between the centers of two adjacent pixels in the photosensitive chip of the camera. Indicates processing of vehicle screen images The number of pixels between the center pixel.
[0023] S23, normalizing the processed vehicle screen image to obtain a normalized image based on the correction factor With the compensation factor Correct the normalized image to obtain a normalized corrected image : ; Where, Indicates processing of vehicle screen images The pixel value of the pixel at .
[0024] S24, normalizing and correcting the image Denormalization is performed to obtain the corrected vehicle screen image.
[0025] S3. Performing frequency domain compensation processing on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image; Wherein, the step S3 includes: S31 , performing grayscale conversion and Fourier transform processing on the corrected vehicle-mounted screen image in sequence to obtain a transformed image.
[0026] S32: Perform spectrum centering processing on the transformed image to obtain a centered image, and calculate the segmentation threshold of the centered image. : ; Where, Represent the grayscale mean and grayscale standard deviation of the centered image, respectively. represents the compensation factor; Specifically, after obtaining the transformed image, the low-frequency component is at the edge of the transformed image, and the high-frequency component is in the middle of the transformed image. After the spectrum centering process, the center position is changed to the low-frequency component, and the high-frequency component is set outward along the center. The compensation factor here is set to 0.8.
[0027] S33, based on the segmentation threshold Perform threshold segmentation on the centered image to obtain a segmented image : ; Where, Represents a centralized image The gray value at .
[0028] S34, based on the segmented image Determine and compensate the vehicle screen image; Wherein, the step S34 includes: S341, the segmented image Perform frequency screening to obtain a screening image : ; Where, Represent the center point coordinates of the centralized image, Indicates is the radius of the spectrum circle with its center at Specifically, by segmenting the image, areas with larger grayscale values can be determined. However, the noise and background information of the image are in low-frequency areas with larger grayscale values. Therefore, screening is required to effectively retain the image feature information, and the spectral circle radius here can be pre-specified.
[0029] S342, based on the screening image Determine the frequency image ; .
[0030] S343. Decenter and inverse Fourier transform the frequency image in sequence to obtain a compensated vehicle screen image.
[0031] S4, performing detail feature enhancement processing on the compensated vehicle-mounted screen image to obtain an enhanced vehicle-mounted screen image; Wherein, the step S4 includes: S41, dividing the compensated vehicle screen image into several sub-blocks of equal size, and calculating the initial grayscale update value of each sub-block ; Wherein, the step S41 includes: S411: Divide the compensated vehicle screen image into several sub-blocks of equal size, and calculate the grayscale distribution correlation function of each sub-block. : ; Where, Indicates the sub-block size, Indicates the The histogram distribution function of the sub-blocks.
[0032] S412, the grayscale distribution correlation function Take the derivative to get the correlation slope, and calculate the maximum gray level based on the correlation slope : ; Where, Indicates the maximum value of the association slope.
[0033] S413: Setting a preset grayscale threshold , the histogram of the compensated vehicle screen image is greater than the preset gray level threshold Extract the partial copy and distribute it evenly to other gray levels to get the initial grayscale update value : ; Where, Indicates the The gray level of each sub-block, Indicates the rising height of the assigned gray level; Specifically, by making the histogram of the compensated vehicle screen image greater than the preset gray level threshold The partial copy is extracted and evenly distributed to other gray levels, which can avoid the existence of areas with drastic gradient changes in the histogram of the image and make the histogram distribution smoother.
[0034] S42: Divide the compensated on-board screen image into several sub-regions, each sub-region including several sub-blocks, define a sub-block close to a boundary of the sub-region as a boundary sub-block, define a sub-block at a corner point of the boundary sub-block as a first sub-block, define the remaining sub-blocks in the boundary sub-block as a second sub-block, and define the remaining sub-blocks in the sub-region except the boundary sub-block as a third sub-block; Specifically, the boundary sub-block here is the sub-block at the edge of the sub-region, the sub-block located at the corner point of the sub-region in the boundary sub-block is the first sub-block, the remaining sub-blocks in the boundary sub-block are the second sub-blocks, and the sub-block close to the center area of the sub-region is the third sub-block.
[0035] S43: If the pixel point in the sub-region is in the first sub-block, use the initial grayscale update value of the first sub-block as the grayscale value of the pixel point; Specifically, assuming that pixel point A is in one of the first sub-blocks, the initial grayscale update value corresponding to the first sub-block is used as the grayscale value of pixel point A.
[0036] S44: If the pixel point in the sub-region is in the second sub-block, an average value of the initial grayscale update values of the second sub-block and two sub-blocks adjacent to the second sub-block is calculated, and the average value is used as the grayscale value of the pixel point; Specifically, assuming that pixel A is in one of the second sub-blocks, the second sub-block and the two sub-blocks adjacent to the second sub-block are selected, totaling three sub-blocks. If pixel A is in the second sub-block located at the upper and lower edges of the sub-image, the two sub-blocks adjacent to the left and right of the second sub-block are selected. If pixel A is in the second sub-block located at the left and right edges of the sub-image, the two sub-blocks to the left, right, upper and lower of the second sub-block are selected. Then, the average value of the initial grayscale update values corresponding to the three sub-blocks is calculated, and the average value is used as the grayscale value of the pixel A.
[0037] S45: If the pixel point in the sub-area is in the third sub-block, obtain four sub-blocks adjacent to the third sub-block in the top, bottom, left, and right directions, and determine the grayscale value of the pixel point based on the four sub-blocks. , to get the enhanced car screen image: ; Where, Respectively represent the initial grayscale update values of the adjacent upper, lower, left, and right sub-blocks, Respectively represent the pixel point to the corresponding third sub-block center pixel point 、 Distance in direction.
[0038] S5. Obtain a training vehicle-mounted screen image, input the training vehicle-mounted screen image into a preset detection model for training, and input the enhanced vehicle-mounted screen image into the trained preset detection model for detection to output a defect detection result.
[0039] Specifically, it should be noted that the enhanced vehicle screen image is input into the trained preset detection model for defect detection, and the corresponding defect detection results are output, and the preset detection model here is a convolutional neural network CNN model.
[0040] The method for detecting subtle defects of vehicle-mounted screens provided in the first embodiment of the present invention first obtains a target vehicle-mounted screen image, pre-processes the target vehicle-mounted screen image to obtain a processed vehicle-mounted screen image; then performs brightness correction and normalization on the processed vehicle-mounted screen image to obtain a corrected vehicle-mounted screen image; then performs frequency domain compensation on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image; then performs detail feature enhancement on the compensated vehicle-mounted screen image to obtain an enhanced vehicle-mounted screen image; then obtains a training vehicle-mounted screen image, inputs the training vehicle-mounted screen image into a preset detection model for training, and inputs the enhanced vehicle-mounted screen image into the trained preset detection model for detection to output a defect detection result. The present invention performs brightness correction on the image to avoid the image from being locally too dark or too bright, and then performs frequency domain compensation on the image to effectively perform denoising and eliminate moiré patterns and artifacts in the image. Then, the image is enhanced in detail features to effectively retain and highlight the detail features in the image, so as to improve the precision and accuracy of subsequent model detection.
[0041] Example 2 like Figure 2 As shown, in a second embodiment of the present invention, a vehicle-mounted screen fine defect detection system is provided, the system comprising: Processing module 1, used to obtain a target vehicle screen image and pre-process the target vehicle screen image to obtain a processed vehicle screen image; Correction module 2, used for performing brightness correction and normalization processing on the processed vehicle screen image to obtain a corrected vehicle screen image; The compensation module 3 is used to perform frequency domain compensation processing on the corrected vehicle screen image to obtain a compensated vehicle screen image; An enhancement module 4 is configured to perform detail feature enhancement processing on the compensated vehicle screen image to obtain an enhanced vehicle screen image; Detection module 5, used to obtain a training vehicle screen image, input the training vehicle screen image into a preset detection model for training, input the enhanced vehicle screen image into the trained preset detection model for detection, and output a defect detection result; The processing module 1 is specifically used for: The target vehicle-mounted screen image is subjected to image rotation, image cropping, median filtering, and ROI area extraction in sequence to obtain a processed vehicle-mounted screen image.
[0042] The correction module 2 includes: The distance adjustment submodule is used to obtain the shooting distance between the processed vehicle screen image and the shooting camera, and move the shooting camera to a preset distance. And obtain the distance adjustment image taken at the corresponding position, and calculate the correction factor based on the processed vehicle screen image and the distance adjustment image : ; Where, is the camera focal length, Indicates the initial distance between the shooting camera and the vehicle screen in the processed vehicle screen image; The factor calculation submodule is used to calculate the compensation factor of the vehicle screen image processing : ; Where, Indicates the distance between the centers of two adjacent pixels in the photosensitive chip of the camera. Indicates processing of vehicle screen images The number of pixels between the pixel and the center pixel; The correction submodule is used to normalize the processed vehicle screen image to obtain a normalized image based on the correction factor With the compensation factor Correct the normalized image to obtain a normalized corrected image : ; Where, Indicates processing of vehicle screen images The pixel value of the pixel at Denormalization submodule, used to normalize the image Denormalization is performed to obtain the corrected vehicle screen image.
[0043] The compensation module 3 includes: A transformation submodule, configured to sequentially perform grayscale conversion and Fourier transformation on the corrected vehicle-mounted screen image to obtain a transformed image; The centralization submodule is used to perform spectrum centralization processing on the transformed image to obtain a centralized image and calculate the segmentation threshold of the centralized image. : ; Where, Represent the grayscale mean and grayscale standard deviation of the centered image, respectively. represents the compensation factor; Segmentation submodule, for segmentation based on the segmentation threshold Perform threshold segmentation on the centered image to obtain a segmented image : ; Where, Represents a centralized image Gray value at ; A filtering submodule for segmenting the image based on the Determine the compensation for the vehicle screen image.
[0044] The filtering submodule includes: A screening unit for the segmented image Perform frequency screening to obtain a screening image : ; Where, Represent the center point coordinates of the centralized image, Indicates is the radius of the spectrum circle with its center at frequency unit for filtering images based on the Determine the frequency image ; ; The output unit is used to sequentially perform decentering and inverse Fourier transformation on the frequency image to obtain a compensated vehicle screen image.
[0045] The enhancement module 4 includes: The sub-block segmentation sub-module is used to segment the compensated vehicle screen image into several sub-blocks of equal size and calculate the initial grayscale update value of each sub-block. ; a sub-block differentiation submodule, configured to divide the compensated vehicle screen image into a plurality of sub-regions, each sub-region including a plurality of sub-blocks, wherein a sub-block close to a boundary of the sub-region is used as a boundary sub-block, a sub-block at a corner point of the corresponding sub-region in the boundary sub-block is used as a first sub-block, the remaining sub-blocks in the boundary sub-block are used as a second sub-block, and the remaining sub-blocks in the sub-region except the boundary sub-block are used as a third sub-block; a first output submodule, configured to use the initial grayscale update value of the first subblock as the grayscale value of the pixel point if the pixel point in the subregion is in the first subblock; a second output submodule, configured to calculate an average of initial grayscale update values of the second subblock and two subblocks adjacent to the second subblock if the pixel point in the subregion is in the second subblock, and use the average as the grayscale value of the pixel point; The third output submodule is used to obtain the four subblocks adjacent to the third subblock in the upper, lower, left, and right directions if the pixel point in the sub-area is in the third subblock, and determine the grayscale value of the pixel point based on the four subblocks. , to get the enhanced car screen image: ; Where, Respectively represent the initial grayscale update values of the adjacent upper, lower, left, and right sub-blocks, Respectively represent the pixel point to the corresponding third sub-block center pixel point 、 Distance in direction.
[0046] The sub-block segmentation sub-module includes: A segmentation unit is used to segment the compensated vehicle screen image into several sub-blocks of equal size and calculate the grayscale distribution correlation function of each sub-block : ; Where, Indicates the sub-block size, Indicates the Histogram distribution function of sub-blocks; A derivation unit for the grayscale distribution correlation function Take the derivative to get the correlation slope, and calculate the maximum gray level based on the correlation slope : ; Where, represents the maximum value of the association slope; Allocation unit for setting preset gray level thresholds , the histogram of the compensated vehicle screen image is greater than the preset gray level threshold Extract the partial copy and distribute it evenly to other gray levels to get the initial grayscale update value : ; Where, Indicates the The gray level of each sub-block, Indicates the height of the assigned gray level.
[0047] In 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 on the memory 102 and executable on the processor 101; the processor 101 implements the above-described method for detecting subtle defects in vehicle-mounted screens when executing the computer program.
[0048] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured as one or more integrated circuits for implementing the embodiments of the present invention.
[0049] Memory 102 may include a large-capacity memory for data or instructions. By way of example, and not limitation, memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), 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, memory 102 may include removable or non-removable (or fixed) media. Where appropriate, memory 102 may be internal or external to the data processing device. In certain embodiments, memory 102 is non-volatile memory. In certain embodiments, memory 102 includes read-only memory (ROM) and 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), where 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.
[0050] 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 .
[0051] The processor 101 implements the above-mentioned method for detecting subtle defects of the vehicle-mounted screen by reading and executing the computer program instructions stored in the memory 102.
[0052] 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.
[0053] The communication interface 103 is used to implement communication between the various modules, devices, units, and / or equipment in the embodiments 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.
[0054] Bus 100 includes hardware, software, or both, and couples components of a computer device to each other. 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. Bus 100 may include one or more buses, where appropriate. Although embodiments of the present invention describe and illustrate a particular bus, the present invention contemplates any suitable bus or interconnect.
[0055] The computer can execute the vehicle-mounted screen subtle defect detection method of the present invention based on the vehicle-mounted screen subtle defect detection system obtained, thereby realizing the vehicle-mounted screen subtle defect detection.
[0056] In some further embodiments of the present invention, combined with the above-mentioned method for detecting subtle defects in vehicle-mounted screens, embodiments of the present invention provide the following technical solutions: a storage medium storing a computer program, which implements the above-mentioned method for detecting subtle defects in vehicle-mounted screens when executed by a processor.
[0057] Those skilled in the art will appreciate that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device), or in conjunction with such instruction execution system, apparatus, or device. For purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device.
[0058] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be 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 processing in another suitable manner as necessary, and then stored in a computer memory.
[0059] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the aforementioned embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following technologies known in the art may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
[0060] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned 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.
[0061] The above-described embodiments merely represent several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person of ordinary skill in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, and these variations and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A method for detecting subtle defects of a vehicle-mounted screen, characterized in that: include: Acquire a target vehicle-mounted screen image, and pre-process the target vehicle-mounted screen image to obtain a processed vehicle-mounted screen image; Performing brightness correction and normalization processing on the processed vehicle-mounted screen image to obtain a corrected vehicle-mounted screen image; Performing frequency domain compensation processing on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image; Performing detail feature enhancement processing on the compensated vehicle-mounted screen image to obtain an enhanced vehicle-mounted screen image; Acquire a training vehicle-mounted screen image, input the training vehicle-mounted screen image into a preset detection model for training, and input the enhanced vehicle-mounted screen image into the trained preset detection model for detection to output a defect detection result.
2. The method for detecting subtle defects of an in-vehicle display according to claim 1, characterized in that: The step of preprocessing the target vehicle screen image to obtain a processed vehicle screen image includes: The target vehicle-mounted screen image is subjected to image rotation, image cropping, median filtering, and ROI area extraction in sequence to obtain a processed vehicle-mounted screen image.
3. The method for detecting subtle defects of an in-vehicle display according to claim 1, wherein: The step of performing brightness correction and normalization processing on the processed vehicle screen image to obtain a corrected vehicle screen image includes: Get the shooting distance between the processed vehicle screen image and the shooting camera, and move the shooting camera to a preset distance And obtain the distance adjustment image taken at the corresponding position, and calculate the correction factor based on the processed vehicle screen image and the distance adjustment image : ; Where, is the camera focal length, Indicates the initial distance between the shooting camera and the vehicle screen in the processed vehicle screen image; Calculate the compensation factor for processing the vehicle screen image : ; Where, Indicates the distance between the centers of two adjacent pixels in the photosensitive chip of the camera. Indicates processing of vehicle screen images The number of pixels between the pixel and the center pixel; The processed vehicle screen image is normalized to obtain a normalized image based on the correction factor With the compensation factor Correct the normalized image to obtain a normalized corrected image : ; Where, Indicates processing of vehicle screen images The pixel value of the pixel at The normalized correction image Denormalization is performed to obtain the corrected vehicle screen image.
4. The method for detecting subtle defects of an in-vehicle display according to claim 1, wherein: The step of performing frequency domain compensation processing on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image includes: Performing grayscale conversion and Fourier transform processing on the corrected vehicle-mounted screen image in sequence to obtain a transformed image; Perform spectrum centering on the transformed image to obtain a centered image, and calculate the segmentation threshold of the centered image. : ; Where, Represent the grayscale mean and grayscale standard deviation of the centered image, respectively. represents the compensation factor; Based on the segmentation threshold Perform threshold segmentation on the centered image to obtain a segmented image : ; Where, Represents a centralized image Gray value at ; Based on the segmented image Determine the compensation for the vehicle screen image.
5. The method for detecting subtle defects of an in-vehicle display according to claim 4, characterized in that: Based on the segmented image The steps for determining the compensation vehicle screen image include: The segmented image Perform frequency screening to obtain a screening image : ; Where, Represent the center point coordinates of the centralized image, Indicates is the radius of the spectrum circle with its center at Based on the screening image Determine the frequency image ; ; The frequency image is sequentially decentralized and inverse Fourier transformed to obtain a compensated vehicle screen image.
6. The method for detecting subtle defects of an in-vehicle display according to claim 1, wherein: The step of performing detail feature enhancement processing on the compensated vehicle screen image to obtain an enhanced vehicle screen image includes: Divide the compensated vehicle screen image into several equal-sized sub-blocks and calculate the initial grayscale update value of each sub-block ; The compensated vehicle screen image is divided into several sub-regions, each sub-region includes several sub-blocks, the sub-block close to the boundary of the sub-region is used as the boundary sub-block, the sub-block at the corner point of the corresponding sub-region in the boundary sub-block is used as the first sub-block, the remaining sub-blocks in the boundary sub-block are used as the second sub-block, and the remaining sub-blocks in the sub-region except the boundary sub-block are used as the third sub-block; If the pixel point in the sub-region is in the first sub-block, the initial grayscale update value of the first sub-block is used as the grayscale value of the pixel point; If the pixel point in the sub-region is in the second sub-block, the average value of the initial grayscale update values of the second sub-block and the two sub-blocks adjacent to the second sub-block is calculated, and the average value is used as the grayscale value of the pixel point; If the pixel point in the sub-area is in the third sub-block, the four sub-blocks adjacent to the third sub-block are obtained, and the grayscale value of the pixel point is determined based on the four sub-blocks. , to get the enhanced car screen image: ; Where, Respectively represent the initial grayscale update values of the adjacent upper, lower, left, and right sub-blocks, Respectively represent the pixel point to the corresponding third sub-block center pixel point 、 Distance in direction.
7. The method for detecting subtle defects of an in-vehicle display according to claim 6, characterized in that: The compensated vehicle screen image is divided into several equal-sized sub-blocks, and the initial grayscale update value of each sub-block is calculated. The steps include: Divide the compensated vehicle screen image into several equal-sized sub-blocks and calculate the grayscale distribution correlation function of each sub-block : ; Where, Indicates the sub-block size, Indicates the Histogram distribution function of sub-blocks; The grayscale distribution correlation function Take the derivative to get the correlation slope, and calculate the maximum gray level based on the correlation slope : ; Where, represents the maximum value of the association slope; Set preset gray level threshold , the histogram of the compensated vehicle screen image is greater than the preset gray level threshold Extract the partial copy and distribute it evenly to other gray levels to get the initial grayscale update value : ; Where, Indicates the The gray level of each sub-block, Indicates the height of the assigned gray level.
8. A vehicle-mounted screen subtle defect detection system, characterized in that: The system comprises: A processing module, configured to obtain a target vehicle-mounted screen image and pre-process the target vehicle-mounted screen image to obtain a processed vehicle-mounted screen image; a correction module, configured to perform brightness correction and normalization processing on the processed vehicle-mounted screen image to obtain a corrected vehicle-mounted screen image; a compensation module, configured to perform frequency domain compensation processing on the corrected vehicle-mounted screen image to obtain a compensated vehicle-mounted screen image; an enhancement module, configured to perform detail feature enhancement processing on the compensated vehicle-mounted screen image to obtain an enhanced vehicle-mounted screen image; The detection module is used to obtain a training vehicle-mounted screen image, input the training vehicle-mounted screen image into a preset detection model for training, and input the enhanced vehicle-mounted screen image into the trained preset detection model for detection to output a defect detection result.
9. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for detecting subtle defects of a vehicle-mounted screen 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, which, when executed by a processor, implements the method for detecting subtle defects of a vehicle-mounted screen as described in any one of claims 1 to 7.