Film defect type detection method, device, equipment, medium and product for CCD detection line

CN122530701APending Publication Date: 2026-08-07ZHEJIANG YINGBOLAI NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG YINGBOLAI NEW ENERGY CO LTD
Filing Date
2026-06-24
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]本申请的目的是提供一种用于CCD检测线的薄膜缺陷类型检测方法、装置、设备、介质及产品,可解决易出现灵敏度漂移、缺陷误报率暴涨、存在漏检情况以及仅能识别缺陷存在,无法对缺陷类型进行精准分类的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122530701A_ABST
    Figure CN122530701A_ABST
Patent Text Reader

Abstract

The application discloses a film defect type detection method, device, equipment, medium and product for a CCD detection line, relates to the film defect detection field, and comprises the following steps: compensating the gray value of each pixel point in the image of part of the film to be detected according to a preset background gray reference value to obtain a compensation value; calibrating the gray value of the corresponding pixel point in the overall image of the film to be detected according to the compensation value to obtain a calibrated gray value; determining a film defect type index value corresponding to a defect picture according to the calibrated gray value; and determining the defect type of the film to be detected according to the film defect type index value corresponding to the defect picture. The application can solve the problems of sensitive drift, defect false positive rate explosion, missed detection and the like, and can only identify the existence of defects and cannot accurately classify the defect types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of thin film defect detection, and in particular to a method, apparatus, equipment, medium, and product for detecting thin film defect types in CCD detection lines. Background Technology

[0002] Currently, when using CCD inspection lines to detect defects in thin films during production, the following problems exist: 1. Because there is no unified standard for the background grayscale parameters of multiple CCD inspection lines, sensitivity drift is prone to occur, resulting in inconsistent inspection results from different production lines and making it impossible to achieve unified control.

[0003] 2. The CCD inspection line lacks an automatic calibration function. When the background grayscale decreases (below 80), the false alarm rate for defects skyrockets, and a large number of qualified products are mistakenly judged as unqualified, resulting in a waste of raw materials. At the same time, there are cases of missed detection, and unqualified products flow into the customer's hands, causing complaints such as short circuits and breakdowns.

[0004] 3. CCD inspection lines can only identify the presence of defects, but cannot accurately classify different defect types such as crystal points, black spots, bright spots, and wrinkles. This makes it difficult to quickly locate the cause of defects, which is not conducive to process optimization. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, equipment, medium, and product for detecting thin film defect types in CCD inspection lines, which can solve the problems of sensitivity drift, soaring defect false alarm rate, missed detection, and the inability to accurately classify defect types while only being able to identify the existence of defects.

[0006] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for detecting thin film defect types in CCD detection lines, including: A partial image of the thin film to be tested is acquired, and the grayscale value of each pixel in the partial image of the thin film to be tested is determined; the thin film to be tested is located on the CCD detection line.

[0007] The grayscale values ​​of each pixel in the image of a portion of the film to be tested are compensated based on the preset background grayscale reference value to obtain the compensation value of each pixel in the image of a portion of the film to be tested.

[0008] Acquire the overall image of the thin film to be tested, and determine the grayscale value of each pixel in the overall image of the thin film to be tested.

[0009] Based on the compensation values ​​of each pixel in a partial image of the film to be tested, the grayscale values ​​of the corresponding pixels in the overall image of the film to be tested are calibrated to obtain the calibrated grayscale values ​​of each pixel in the overall image of the film to be tested.

[0010] The defect type index value of the film defect image is determined based on the calibration gray value of each pixel in the overall image of the film to be tested. The defect image is the overall image of the film to be tested in the region where each pixel has a calibration gray value greater than the preset upper limit threshold of the background gray value and the region where each pixel has a calibration gray value less than the preset lower limit threshold of the background gray value.

[0011] The defect type of the film to be tested is determined based on the defect type index value corresponding to the defect image.

[0012] Secondly, this application provides a thin film defect type detection device for CCD detection lines, comprising: The first acquisition module is used to acquire a portion of the image of the thin film to be detected and determine the grayscale value of each pixel in the image of the thin film to be detected; the thin film to be detected is located on the CCD detection line.

[0013] The compensation module is used to compensate the gray values ​​of each pixel in the image of a portion of the film to be tested according to a preset background grayscale reference value, so as to obtain the compensation value of each pixel in the image of a portion of the film to be tested.

[0014] The second acquisition module is used to acquire the overall image of the thin film to be detected and determine the grayscale value of each pixel in the overall image of the thin film to be detected.

[0015] The calibration module is used to calibrate the grayscale values ​​of corresponding pixels in the overall image of the film under test based on the compensation values ​​of each pixel in a partial image of the film under test, so as to obtain the calibration grayscale values ​​of each pixel in the overall image of the film under test.

[0016] The index value determination module is used to determine the film defect type index value corresponding to the defect image based on the calibration grayscale value of each pixel in the overall image of the film to be inspected; the defect image is the overall image of the film to be inspected in the region where each pixel has a calibration grayscale value greater than the preset upper limit threshold of the background grayscale and the overall image of the film to be inspected in the region where each pixel has a calibration grayscale value less than the preset lower limit threshold of the background grayscale.

[0017] The defect type detection module is used to determine the defect type of the film to be detected based on the film defect type index value corresponding to the defect image.

[0018] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for detecting thin film defect types for CCD detection lines.

[0019] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for detecting thin film defect types for CCD detection lines.

[0020] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for detecting thin film defect types for CCD detection lines.

[0021] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method, apparatus, equipment, medium, and product for detecting thin film defect types in CCD detection lines. By setting a preset background grayscale reference value, the background grayscale parameters of multiple CCD detection lines are standardized to solve the problem of sensitivity drift.

[0022] By compensating the gray values ​​of each pixel in the image of a portion of the film to be tested according to a preset background gray value, a compensation value is obtained. The gray values ​​of the corresponding pixels in the overall image of the film to be tested are then calibrated based on the compensation value, which can solve the problem of a surge in false alarm rate and missed detection.

[0023] The defect type of the film to be inspected is determined by the defect type index value corresponding to the defect image, which solves the problem that the CCD detection line can only identify the existence of defects but cannot accurately classify the type of defects. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a schematic flowchart of a method for detecting thin film defect types in a CCD detection line, provided as an embodiment of this application.

[0026] Figure 2 This is a schematic diagram of the functional modules of a thin film defect type detection device for a CCD detection line, provided in an embodiment of this application.

[0027] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0030] In one exemplary embodiment, such as Figure 1 As shown, a method for detecting thin film defect types in CCD inspection lines is provided, including: Step 201: Acquire a partial image of the film to be inspected and determine the grayscale value of each pixel in the partial image of the film to be inspected. The film to be inspected is located on the CCD detection line.

[0031] Step 202: Compensate the gray values ​​of each pixel in the image of a portion of the film to be tested according to the preset background grayscale reference value, and obtain the compensation value of each pixel in the image of a portion of the film to be tested.

[0032] Step 203: Obtain the overall image of the thin film to be tested, and determine the grayscale value of each pixel in the overall image of the thin film to be tested.

[0033] Step 204: Based on the compensation values ​​of each pixel in the partial image of the film to be tested, the gray values ​​of the corresponding pixels in the overall image of the film to be tested are calibrated to obtain the calibrated gray values ​​of each pixel in the overall image of the film to be tested.

[0034] Step 205: Determine the film defect type index value corresponding to the defect image based on the calibration grayscale value of each pixel in the overall image of the film to be tested; the defect image is the overall image of the film to be tested in the region where each pixel in the overall image of the film to be tested has a calibration grayscale value greater than the preset upper limit threshold of the background grayscale and the overall image of the film to be tested in the region where each pixel in the overall image of the film to be tested has a calibration grayscale value less than the preset lower limit threshold of the background grayscale.

[0035] Step 206: Determine the defect type of the film to be tested based on the film defect type index value corresponding to the defect image.

[0036] In another exemplary embodiment of this application, acquiring an image of a portion of the film to be detected and determining the grayscale value of each pixel in the image of the portion of the film to be detected specifically includes: Images of a portion of the thin film to be tested are acquired at a preset frequency to obtain multiple test images.

[0037] Determine the grayscale value of each pixel in each detected image.

[0038] For pixels at the same location in all detected images, calculate the average gray value of the pixels at that location in all detected images to obtain the gray value of the pixels at that location in a portion of the images of the film to be detected.

[0039] In another exemplary embodiment of this application, before acquiring an image of a portion of the film to be detected and determining the grayscale value of each pixel in the image of the portion of the film to be detected, the method further includes: The judgment condition determines whether the length of the film to be detected corresponding to the image is less than a preset length threshold and whether the detection speed is greater than a preset speed threshold; the judgment image is an image of the film to be detected.

[0040] If so, obtain the grayscale value of each pixel in the condition judgment image, and determine whether to execute the step of obtaining a partial image of the film to be detected and determining the grayscale value of each pixel in the partial image of the film to be detected based on the grayscale value of each pixel in the condition judgment image.

[0041] In practical applications, this application performs background grayscale normalization through adaptive calibration, specifically as follows: Step 1: The encoder detects the device speed and determines the start conditions for adaptive calibration based on the shooting data (grayscale value) fed back by the camera: when the length of the film to be tested is less than 1 meter and the detection speed is greater than 1 m / min, the grayscale value of a continuous segment of pixels in the image of the film to be tested is less than 220.

[0042] Step 2: Perform background grayscale normalization and use the calibrated compensation value as the benchmark for the current roll film detection.

[0043] Step 2.1: Set the camera exposure time (adjustable).

[0044] Step 2.2: Each time the camera scans, it acquires an image and a set of data corresponding to the image (each pixel and its corresponding original grayscale value).

[0045] Step 2.3: The camera scans several times to obtain the average original grayscale value corresponding to each pixel.

[0046] Step 2.4: Based on the set background grayscale reference value, compensate each pixel within the detection area and calculate the corresponding compensation value. Unify the background grayscale reference value for all CCD detection lines to 100–120, establish a grayscale parameter database, and set reference values ​​separately for each film type (lithium battery separator, packaging film) to ensure consistent multi-line detection standards. Steps 1 and 2 are both completed when the length of the film to be detected is less than 1 meter, meaning that the length of the film corresponding to part of the image of the film to be detected is also less than 1 meter; when it is greater than 1 meter, it indicates that normal detection has begun.

[0047] In practical applications, when the original grayscale value is below 60, the system will automatically issue an early warning, prompting staff to check the lens cleanliness and light source intensity.

[0048] Perform a grayscale calibration before each power-on to ensure parameter stability during testing and avoid sensitivity drift.

[0049] In another exemplary embodiment of this application, the calibrated grayscale values ​​of each pixel in the overall image of the film to be tested are obtained by calibrating the grayscale values ​​of corresponding pixels in the overall image of the film to be tested based on the compensation values ​​of each pixel in the partial image of the film to be tested. Specifically: The compensation values ​​of each pixel in a portion of the image of the film to be tested are superimposed onto the gray values ​​of the corresponding pixels in the overall image of the film to be tested. The gray values ​​of the corresponding pixels in the overall image of the film to be tested are then calibrated to obtain the calibrated gray values ​​of each pixel in the overall image of the film to be tested.

[0050] In another exemplary embodiment of this application, the thin film defect type index value includes at least one of the following: image defect type, maximum brightness of a pixel, minimum brightness of a pixel, image length, image width, diameter of the defect region, length of the defect region, width of the defect region, area of ​​the defect region, and aspect ratio of the defect region; the image defect type is either a bright defect or a dark defect; the thin film defect type index value corresponding to the defect image is determined based on the calibrated grayscale value of each pixel in the overall image of the thin film to be detected, specifically as follows: A curve is plotted based on the calibration grayscale values ​​of each pixel in the overall image of the thin film to be tested; the horizontal axis of the curve represents the pixel coordinates, and the vertical axis represents the calibration grayscale value of the pixel.

[0051] Based on the curve, the preset upper limit threshold for background grayscale, and the preset lower limit threshold for background grayscale, the defect image is obtained, and the image defect type corresponding to the defect image is determined.

[0052] Get the length and width of the defect image.

[0053] The defective region in the defective image, as well as the maximum and minimum brightness of the corresponding pixels, are determined based on the grayscale values ​​of each pixel in the defective image.

[0054] Based on the defect area in the defect image, obtain the diameter, length, width, area, and aspect ratio of the corresponding defect area.

[0055] In practical applications, intelligent defect type differentiation specifically includes: Step 1: During normal detection, the calculated compensation value is superimposed on the detected background grayscale value to obtain the calibrated background grayscale value, and a curve is generated accordingly. Existing vision software sets upper and lower thresholds for the background grayscale value, and exports the images of the regions containing pixels exceeding the upper threshold and the regions containing pixels below the lower threshold to obtain defect images. Images above the upper threshold are classified as bright defects, and images below the lower threshold are classified as dark defects. Based on the distribution of pixels exceeding or below the thresholds in the defect images, the software generates the maximum brightness, minimum brightness, length, width, diameter, aspect ratio, and area of ​​the defect, as well as the length and width of the image.

[0056] Step 2: By mapping the image defect type, maximum brightness, minimum brightness, length, width, diameter, aspect ratio, area, and the length and width of the image to defect types such as crystal points, black spots, bright spots, wrinkles, delamination, and pinholes, the user can automatically classify defects.

[0057] In another exemplary embodiment of this application, after determining the film defect type index value corresponding to the defect image based on the calibration grayscale value of each pixel in the overall image of the film to be detected, the method further includes: The defect level of the film to be inspected is determined based on the area of ​​the defect region corresponding to the defect image.

[0058] In practical applications, the defect classification and determination rules are as follows: Level 1 defects (area within 0.08 mm) 2 The following is for statistical monitoring only and does not affect product grade. It records the number and distribution of defects every hour for process trend analysis.

[0059] Secondary defects (area between 0.08 and 0.3 mm) 2 ): Focus on monitoring, mark the location of defects, and isolate the defective areas after production to prevent them from flowing to high-requirement clients.

[0060] Level 3 defects (area within 0.3mm) 2(Above): Products directly deemed unqualified will be downgraded or scrapped, and their flow to the customer will be prohibited. Related technologies lack clear grading standards for defect judgment, employing a uniform treatment method for defects of different sizes, resulting in either over-treatment (downgrading small defects) or under-treatment (missing large defects), leading to poor rationality. This application addresses this problem by establishing unified defect grading and judgment rules.

[0061] In practical applications, it can also automatically record the quantity and distribution of various defects, and generate a defect statistics report every hour (the defect statistics report includes information such as defect type, quantity, distribution, and inspection line number, which makes it easy for managers to grasp the inspection situation in real time), providing data support for process optimization (such as an increase in black spots can be traced back to filter heating problems, and an increase in wrinkles can be traced back to stretching process problems; when the number of a certain type of defect suddenly increases (more than 30% higher than the normal level), the system will automatically alarm and prompt staff to trace the corresponding production process (cleaning, filter, temperature, etc.) to promptly investigate abnormalities).

[0062] In practical applications, a defect data archiving mechanism can also be established to retain more than 6 months of test data for process optimization, customer complaint tracing, and patent implementation effect verification.

[0063] The false positive rate of this application has been reduced from 12% to below 1.5%, and the false negative rate has been controlled to below 0.5%, which significantly reduces the waste of qualified products and can save more than 800,000 yuan in raw material costs annually.

[0064] This application achieves unified multi-line CCD detection parameters, improving the consistency of detection results by more than 95% and avoiding product quality fluctuations caused by inconsistent detection standards.

[0065] This application provides accurate defect classification, enabling rapid identification of defect causes, process optimization, efficiency improvement of 60%, and reduction of production downtime due to abnormalities.

[0066] The defect classification in this application is reasonable, avoiding over- or under-processing, improving product qualification rate, reducing customer complaints, and is highly practical and applicable for widespread adoption.

[0067] Based on the same inventive concept, this application also provides a thin film defect type detection device for CCD detection lines to implement the aforementioned method for detecting thin film defect types in CCD detection lines. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the thin film defect type detection device for CCD detection lines provided below can be found in the limitations of the thin film defect type detection method for CCD detection lines described above, and will not be repeated here.

[0068] In one exemplary embodiment, such as Figure 2As shown, a thin film defect type detection device for CCD inspection lines is provided, comprising: The first acquisition module is used to acquire a portion of the image of the thin film to be detected and determine the grayscale value of each pixel in the image of the thin film to be detected; the thin film to be detected is located on the CCD detection line.

[0069] The compensation module is used to compensate the gray values ​​of each pixel in the image of a portion of the film to be tested according to a preset background grayscale reference value, so as to obtain the compensation value of each pixel in the image of a portion of the film to be tested.

[0070] The second acquisition module is used to acquire the overall image of the thin film to be detected and determine the grayscale value of each pixel in the overall image of the thin film to be detected.

[0071] The calibration module is used to calibrate the grayscale values ​​of corresponding pixels in the overall image of the film under test based on the compensation values ​​of each pixel in a partial image of the film under test, so as to obtain the calibration grayscale values ​​of each pixel in the overall image of the film under test.

[0072] The index value determination module is used to determine the film defect type index value corresponding to the defect image based on the calibration grayscale value of each pixel in the overall image of the film to be inspected; the defect image is the overall image of the film to be inspected in the region where each pixel has a calibration grayscale value greater than the preset upper limit threshold of the background grayscale and the overall image of the film to be inspected in the region where each pixel has a calibration grayscale value less than the preset lower limit threshold of the background grayscale.

[0073] The defect type detection module is used to determine the defect type of the film to be detected based on the film defect type index value corresponding to the defect image.

[0074] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 3As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data on thin-film defect types for CCD detection lines. The I / O interfaces allow the processor to exchange information with external devices. The communication interface allows communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for detecting thin-film defect types in CCD detection lines.

[0075] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0076] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method embodiments.

[0077] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described method embodiments.

[0078] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method embodiments.

[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0080] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0081] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, etc., and are not limited to these.

[0082] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above 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.

[0083] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for detecting thin film defect types in CCD inspection lines, characterized in that, The method for detecting thin film defect types in CCD detection lines includes: Acquire images of a portion of the thin film to be inspected and determine the grayscale value of each pixel in the images of the portion of the thin film to be inspected; the thin film to be inspected is located on the CCD detection line; The gray values ​​of each pixel in the image of a portion of the film to be tested are compensated based on the preset background gray value to obtain the compensation value of each pixel in the image of a portion of the film to be tested. Acquire the overall image of the thin film to be tested, and determine the grayscale value of each pixel in the overall image of the thin film to be tested; The calibrated gray values ​​of each pixel in the overall image of the thin film to be tested are obtained by calibrating the gray values ​​of the corresponding pixels in the overall image of the thin film to be tested based on the compensation values ​​of each pixel in the partial image of the thin film to be tested. The defect type index value of the film defect image is determined based on the calibration gray value of each pixel in the overall image of the film to be tested. The defect image is the overall image of the film to be tested in the region where each pixel has a calibration gray value greater than the preset upper limit threshold of the background gray value and the overall image of the film to be tested in the region where each pixel has a calibration gray value less than the preset lower limit threshold of the background gray value. The defect type of the film to be tested is determined based on the defect type index value corresponding to the defect image.

2. The method for detecting thin film defect types in CCD inspection lines according to claim 1, characterized in that, Acquire a portion of the image of the thin film to be inspected, and determine the grayscale value of each pixel in the image of the portion of the thin film to be inspected, specifically including: Images of a portion of the thin film to be tested are acquired at a preset frequency to obtain multiple test images; Determine the grayscale value of each pixel in each detected image; For pixels at the same location in all detected images, calculate the average gray value of the pixels at that location in all detected images to obtain the gray value of the pixels at that location in a portion of the images of the film to be detected.

3. The method for detecting thin film defect types in CCD inspection lines according to claim 1, characterized in that, Before acquiring a portion of the image of the film to be inspected and determining the grayscale value of each pixel in the image of the portion of the film to be inspected, the process also includes: The judgment condition determines whether the length of the film to be detected corresponding to the image is less than a preset length threshold and whether the detection speed is greater than a preset speed threshold; the judgment image is an image of the film to be detected captured by the judgment condition. If so, obtain the grayscale value of each pixel in the condition judgment image, and determine whether to execute the step of obtaining a partial image of the film to be detected and determining the grayscale value of each pixel in the partial image of the film to be detected based on the grayscale value of each pixel in the condition judgment image.

4. The method for detecting thin film defect types in CCD inspection lines according to claim 1, characterized in that, Based on the compensation values ​​of each pixel in a partial image of the thin film to be tested, the grayscale values ​​of the corresponding pixels in the overall image of the thin film to be tested are calibrated to obtain the calibrated grayscale values ​​of each pixel in the overall image of the thin film to be tested. Specifically: The compensation values ​​of each pixel in a portion of the image of the film to be tested are superimposed onto the gray values ​​of the corresponding pixels in the overall image of the film to be tested. The gray values ​​of the corresponding pixels in the overall image of the film to be tested are then calibrated to obtain the calibrated gray values ​​of each pixel in the overall image of the film to be tested.

5. The method for detecting thin film defect types in CCD inspection lines according to claim 1, characterized in that, The thin film defect type index value includes at least one of the following: image defect type, maximum pixel brightness, minimum pixel brightness, image length, image width, defect region diameter, defect region length, defect region width, defect region area, and defect region aspect ratio; the image defect type is either a bright defect or a dark defect; the thin film defect type index value corresponding to the defect image is determined based on the calibrated grayscale values ​​of each pixel in the overall image of the thin film to be inspected, specifically: A curve is plotted based on the calibration grayscale values ​​of each pixel in the overall image of the thin film to be tested; the horizontal axis of the curve represents the pixel coordinates, and the vertical axis of the curve represents the calibration grayscale value of the pixel. Based on the curve, the preset upper limit threshold of background grayscale, and the preset lower limit threshold of background grayscale, the defect image is obtained, and the image defect type corresponding to the defect image is determined. Get the length and width of the defect image; Determine the defect area in the defect image and the maximum and minimum brightness of the corresponding pixels in the defect image based on the grayscale values ​​of each pixel in the defect image. Based on the defect area in the defect image, obtain the diameter, length, width, area, and aspect ratio of the corresponding defect area.

6. The method for detecting thin film defect types in a CCD detection line according to claim 5, characterized in that, After determining the film defect type index value corresponding to the defect image based on the calibration grayscale value of each pixel in the overall image of the film to be inspected, the following is also included: The defect level of the film to be inspected is determined based on the area of ​​the defect region corresponding to the defect image.

7. A device for detecting thin film defect types in CCD inspection lines, characterized in that, The thin film defect type detection device for CCD detection lines includes: The first acquisition module is used to acquire a portion of the image of the film to be detected and determine the grayscale value of each pixel in the image of the portion of the film to be detected; the film to be detected is located on the CCD detection line; The compensation module is used to compensate the gray values ​​of each pixel in the image of a portion of the film to be tested according to a preset background grayscale reference value, so as to obtain the compensation value of each pixel in the image of a portion of the film to be tested. The second acquisition module is used to acquire the overall image of the thin film to be detected and determine the gray value of each pixel in the overall image of the thin film to be detected. The calibration module is used to calibrate the grayscale values ​​of corresponding pixels in the overall image of the film to be tested based on the compensation values ​​of each pixel in a partial image of the film to be tested, so as to obtain the calibration grayscale values ​​of each pixel in the overall image of the film to be tested. The index value determination module is used to determine the film defect type index value corresponding to the defect image based on the calibration gray value of each pixel in the overall image of the film to be inspected; the defect image is the overall image of the film to be inspected in the region where each pixel has a calibration gray value greater than the preset upper limit threshold of the background gray value and the overall image of the film to be inspected in the region where each pixel has a calibration gray value less than the preset lower limit threshold of the background gray value. The defect type detection module is used to determine the defect type of the film to be detected based on the film defect type index value corresponding to the defect image.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the thin film defect type detection method for CCD detection lines according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the thin film defect type detection method for CCD inspection lines as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the thin film defect type detection method for CCD inspection lines as described in any one of claims 1-6.