Automatic calibration film defect detection and elimination method and system

By employing an automatically calibrated film defect detection method that calibrates the visual inspection position in real time, and combining a separate dual pressure roller and buffer design, the accuracy and efficiency issues of inspection and rejection in film roll production are solved, achieving high-precision, low-damage online inspection and rejection.

CN121607335APending Publication Date: 2026-03-06TIANJIN RIJIN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512042070.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

In the production process of film rolls, the accumulation of small stepping errors caused by mechanical transmission tolerances, tension fluctuations, material slippage, or lateral offsets results in inconsistencies in the coordinates of the visual inspection and rejection mechanisms, affecting quality and efficiency. Traditional pressure rollers are prone to scratches and secondary contamination when in contact with the film surface. A single algorithm is difficult to balance the detection rate and processing speed of multiple defect types, limiting detection accuracy and production capacity.

Method used

An automatic calibration film defect detection method is adopted. Real-time position calibration before visual inspection generates material feeding compensation instructions to achieve closed-loop correction between the detection position and the physical material feeding position. A separate double pressure roller structure is used to avoid contact between the film surface and the film surface. A suction leveling mechanism is set up to improve the flatness of the image. A buffer zone is set at the winding point to isolate tension fluctuations. Multi-stage visual algorithm processing logic covers a variety of defect morphologies.

Benefits of technology

It significantly reduces the probability of missed rejections and false rejections, improves yield and inspection accuracy, balances inspection accuracy and cycle efficiency, adapts to the needs of high-speed online inspection, and reduces mechanical damage and secondary contamination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121607335A_ABST
    Figure CN121607335A_ABST
Patent Text Reader

Abstract

The invention provides an automatic-calibration film defect detection and elimination method and system, belongs to the field of online quality detection and automatic elimination equipment and control methods in the production process of thin film roll materials, and is suitable for online detection of roll material thin films. The system comprises an unwinding and tension control unit, a guide unit, an air suction flatness detection station, upper and lower surface cameras, a telecentric lens light source, a feeding servo traction unit driven by edge separation type double compression rollers, an X-axis and Z-axis removing mechanism, a waste winding unit and a finished product winding unit with a U-shaped buffer area. During operation, product positioning and statistics are firstly completed during each time of photographing to obtain a feeding deviation delta Y, pixel coordinates are calibrated and converted into physical coordinates, then the physical coordinates are fed back to the PLC, and next target displacement is compensated; meanwhile, OK / NG and defect coordinates are written into a queue and move along with material feeding, and when the defects reach a rejection station, X and Z axes are driven to execute rejection. The buffer area controls a winding motor to start and stop intermittently through a photoelectric sensor, and the winding tension is isolated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of online quality inspection and automatic rejection equipment and control methods in the production process of film rolls, and in particular relates to an automatic calibration method and system for detecting and rejecting film defects. Background Technology

[0002] In applications such as waterproof and breathable membranes, optical membranes, and functional coated membranes, thin-film roll products typically require defect identification and handling during a continuous process of high-speed unwinding, guiding, inspection, and rewinding. However, in continuous material feeding scenarios, mechanical transmission tolerances, tension fluctuations, material slippage, or lateral offset can introduce minute step errors. If a fixed step size or open-loop control is used, these errors will gradually accumulate over long distances, causing discrepancies between the defect coordinates obtained by visual inspection and the actual positioning coordinates of the rejection mechanism. This can lead to missed or incorrect rejections, affecting both quality and efficiency.

[0003] Furthermore, traditional pressure rollers often employ a continuous structure, directly contacting and pressing the film surface during material feeding. For surface-sensitive or coated film materials, this contact can easily cause scratches, indentations, and secondary contamination, leading to a decline in material performance. Simultaneously, improper tension control from unwinding to rewinding can cause film stretching, slack, and vibration, resulting in unclear imaging, dimensional inaccuracies, and even unstable material feeding and deviation when the rewinding tension is transferred to the detection area.

[0004] At the level of detection algorithms, thin film defects have diverse morphologies and significant contrast differences. If a single algorithm or fixed parameters are used, it is often difficult to balance the detection rate and processing speed of multiple defect types in high-speed online scenarios, which further restricts the detection accuracy and production capacity of the entire line. Summary of the Invention

[0005] In view of this, the present invention aims to provide an automatically calibrated method and system for detecting and eliminating membrane defects, so as to at least solve one of the problems in the background art.

[0006] To achieve the above objectives, the technical solution of the present invention is implemented as follows: The first aspect of this solution discloses an automatically calibrated method for detecting and rejecting membrane defects, applicable to online detection and rejection of continuous strips. The strip passes sequentially along the conveying direction through an unwinding station, a visual inspection station, a rejection station, and a rewinding station, including: An adjustable back tension is applied to the strip at the unwinding station; The material belt is moved in a stepping or positioning manner by a servo motor that drives the traction roller assembly. When the material belt reaches the vision inspection station, the material feeding stops, and the suction leveling mechanism adsorbs the material belt onto the inspection plane, triggering the camera to capture images. Product positioning is performed on the image to obtain a set of coordinates for multiple product instances within the field of view, and the statistical value of the transmission direction coordinates of the set of coordinates is compared with the preset standard coordinates to obtain the position deviation ΔY caused by this material movement; The position deviation ΔY is used as the calibration compensation amount for the next material feeding, and a compensation command for the material feeding target position or material feeding distance is generated and sent to the lower controller to realize closed-loop correction between the detection position and the physical material feeding position. After completing product positioning, defect detection is performed on the image to obtain the pass / fail status of each product instance and the defect coordinates, and a defect result matrix is ​​generated according to the arrangement of products on the material strip. In the upper control program, a data queue corresponding to a fixed distance between the visual inspection station and the rejection station is maintained. The defect result matrix is ​​written to the tail of the queue according to the material feeding update rule and shifted synchronously with each material feeding. When the product matrix corresponding to the head of the queue reaches the rejection station and there are defective products, the target coordinates of the defective products at the rejection station are calculated according to the transformation relationship from pixel coordinates to physical coordinates. The rejection mechanism is then controlled to move to the target coordinates in the width and vertical directions and perform the rejection action. A buffer sag hopper is formed at the winding station, and photoelectric sensors are used to detect the sag status to control the intermittent start and stop of the finished product winding motor, so as to avoid the transmission of winding tension fluctuations to the vision inspection station.

[0007] Furthermore, the positional deviation ΔY is determined by the difference between the average, weighted average, or median of the transmission direction coordinates of multiple product instances within the field of view and the preset standard coordinates, and abnormal positioning points are eliminated or downweighted during the statistical analysis.

[0008] Furthermore, the compensation instruction satisfies the following conditions: the target material position is equal to the theoretical target position minus the position deviation ΔY, or the material feeding distance is equal to the theoretical material feeding distance minus the position deviation ΔY.

[0009] Furthermore, the transformation relationship from pixel coordinates to physical coordinates is obtained through initial calibration. The initial calibration includes collecting multiple sets of paired points of pixel coordinates and corresponding physical coordinates, and using least squares fitting to obtain a two-dimensional affine transformation matrix, which is used to convert the defective pixel coordinates into physical coordinates that can be executed by the lower-level controller.

[0010] Furthermore, after each material feeding is completed, the historical data of the head of the queue that exceeds the rejection station is removed, and the defect result matrix obtained from this image analysis is written to the tail of the queue; the reading and writing of the data queue adopts a mutex lock or an equivalent synchronization mechanism to ensure data consistency.

[0011] Furthermore, the upper-level control program adopts a parallel task execution mode, placing the vision processing task and motion control task in independent execution units. The vision processing task pushes the defect result matrix to the data queue, and the motion control task reads the product status arriving at the rejection station from the data queue and triggers the rejection action.

[0012] Furthermore, the traction roller group is a separate double pressure roller structure, with two short pressure rollers located on both sides of the material belt and cooperating with the corresponding driven pressing rollers. The traction force is applied only to the edge area of ​​the material belt, so that the effective area of ​​the product does not come into contact with the pressure rollers during the traction process.

[0013] Furthermore, the suction and leveling mechanism includes a metal plate with a microporous array and a vacuum generator pipeline connected to its internal cavity, which uses negative pressure to adsorb and flatten the material strip at the moment of taking the picture.

[0014] Furthermore, the product positioning adopts template matching based on contour features. The matching process first performs coarse positioning on the low-resolution image, and then performs fine positioning in the corresponding local area of ​​the high-resolution image to obtain the center coordinates of each product instance.

[0015] Furthermore, based on the center coordinates of the product instance, row and column reconstruction is performed. The row and column reconstruction includes clustering according to the transmission direction coordinates to form row groups, and sorting according to the width direction coordinates within each row group to form column order, thereby obtaining a two-dimensional logical grid corresponding to the physical arrangement of the product; the two-dimensional logical grid is compared with a preset number of rows and columns to determine missing products or abnormal positions.

[0016] Furthermore, the defect detection includes directional texture filtering: constructing multiple sets of filter kernels in different directions and convolving them on the image to obtain multiple directional response feature maps; weighting and fusing the directional response feature maps to obtain a defect saliency map; thresholding and connected component analysis are performed on the defect saliency map; and noise is filtered based on the connected component area threshold to obtain candidate defect regions.

[0017] Furthermore, the defect detection includes dimensional verification: extracting inner and outer circle edge point sets near the product positioning point and performing circle fitting to obtain circle center and radius parameters, calculating concentricity, ring width or edge distance parameters and comparing them with set standards to determine whether the dimensions are qualified.

[0018] Furthermore, the defect detection includes arc edge integrity analysis: multiple virtual caliper lines are laid out at preset intervals along the fitted ideal arc path, and the gray-scale change profile of each virtual caliper line is analyzed. When the gray-scale jump intensity is lower than the threshold, the jump position offset exceeds the threshold, or multiple jumps occur, it is determined to be an edge defect.

[0019] Furthermore, the movement strategy of the material feeding servo includes: when there are defective products to be rejected in the data queue, calculating the shortest movement distance required to move the next product to be rejected to the rejection station and executing the movement; when there are no products to be rejected in the data queue, performing a fast movement at a camera field of view distance or an integer multiple thereof to enter the next photo detection.

[0020] Furthermore, this solution discloses an automatically calibrated membrane defect detection and rejection system, comprising: frame; The unwinding unit, guide roller group, vision inspection station, traction and rejection unit and rewinding unit are set on the frame; The visual inspection station includes a suction leveling mechanism, a camera, and a light source; The traction and rejection unit includes a feeding servo motor and a traction roller group for feeding materials, as well as an X-axis linear module arranged along the width direction of the material strip, a Z-axis linear module arranged along the vertical direction, and a rejection actuator arranged at the end of the Z-axis. The winding unit includes a finished winding shaft, a buffer sag bin formed between the traction roller group and the finished winding shaft, and a photoelectric sensor for detecting the sag state. The system also includes a host industrial control computer and a slave controller. The host industrial control computer is used to perform image processing, position deviation ΔY calculation, defect result matrix generation and data queue update. The slave controller is used to receive compensation instructions and control the feeding servo motor, X-axis linear module and Z-axis linear module to perform feeding positioning and rejection actions, and control the intermittent start and stop of the finished product winding shaft according to the photoelectric sensor signal.

[0021] Furthermore, the traction roller group is a separate double pressure roller structure, with two short pressure rollers respectively set on both sides of the material belt edge, and each cooperating with a driven pressing wheel to achieve edge traction.

[0022] Furthermore, the suction leveling mechanism includes a suction platform with a micropore array and a pipeline connected to a vacuum generator. The suction platform has a cavity structure inside, which is used to adsorb the material strip onto the detection plane at the time of taking the picture.

[0023] Furthermore, this solution discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the automatically calibrated membrane defect detection and removal method.

[0024] Compared with existing technologies, the automatic calibration membrane defect detection and rejection method and system described in this invention have the following advantages: (1) This invention achieves high-precision tracking of defects from "detection to rejection" through the collaborative design of detection system and motion control. Its core lies in using the results of each photo for real-time position calibration: before defect analysis, the vision algorithm completes product positioning and statistically analyzes the Y-axis position of the product within the field of view, and compares it with the preset standard position to obtain the material deviation ΔY; the main controller feeds back the deviation to the PLC, and compensates for the target position in the next movement command, thereby suppressing the cumulative error caused by mechanical tolerance, tension fluctuation and slight slippage, so that the defect coordinates are consistent with the rejection position coordinates, significantly reducing the probability of missed rejection and false rejection, and improving the rejection hit rate and consistency; (2) In view of the problem that the film surface is easily damaged and easily contaminated, this application adopts an edge-separated double pressure roller traction structure, which applies traction force only on both sides of the material belt, so that the effective area of ​​the product avoids contact with the pressure roller during the traction process; and a suction leveling unit is set in the inspection station, which uses negative pressure to adsorb the film onto the leveling platform, reducing vibration and improving imaging flatness. While ensuring stable material feeding, it reduces mechanical damage to the surface and the risk of secondary contamination, thereby improving the yield. (3) In view of the interference of winding tension on the detection area, this application sets up a buffer zone between the traction unit and the finished winding and uses photoelectric sensors to control the winding motor to start and stop intermittently, so that the winding action is decoupled from the front-end traction, the winding tension fluctuation is isolated, and the detection area maintains a constant low tension state, thereby providing a stable physical premise for high-precision imaging and size determination, and reducing size error and deviation caused by tension. (4) In terms of system efficiency, this application maintains a defect data queue corresponding to the physical space on the software side, and logically synchronizes the visual inspection results with the rejection station position. The defect moves with the material and triggers the X-axis and Z-axis rejection mechanism to perform actions when it reaches the rejection station. It can also combine motion planning strategies to prioritize rejection when there are defects and move quickly across the field of view when there are no defects, thereby taking into account both detection accuracy and cycle efficiency, and adapting to the needs of high-speed online detection. (5) In terms of algorithm robustness, this application provides multi-stage processing logic such as product array reconstruction, directional texture filtering enhancement, edge integrity analysis and defect attribution determination, which can simultaneously cover various defect forms such as foreign objects, dirt, scratches, glue threads, edge damage and missing parts; and supports rapid model changeover through configurable parameter management, shortening the debugging time for switching between different specifications of products and improving production line flexibility. Attached Figure Description

[0025] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the device structure according to an embodiment of the present invention.

[0026] Explanation of reference numerals in the attached figures: 1- Feeding roller; 2- Upper detection camera; 3- Rejection mechanism; 4- Pulling roller; 5- Receiving roller; 6- Frame; 7- Lower detection camera. Detailed Implementation

[0027] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0028] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0029] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0030] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0031] The automatic calibration membrane defect detection and rejection system and method of this application will be further described below with reference to the accompanying drawings. It should be understood that this embodiment is used to explain the technical solution of this application and does not constitute a limitation on the scope of protection. The overall material flow of the system is from left to right, and it mainly consists of an unwinding and tension control unit, a guiding feeding unit, a vision inspection unit, a traction and rejection unit, a rewinding unit, and an electrical control and host computer software system. The system performs real-time feedback correction on the material feeding position through the vision inspection results, and performs a rejection action according to the coordinates when the defect reaches the rejection station, thereby reducing the risk of position drift and erroneous rejection caused by long-distance continuous conveying.

[0032] In one embodiment, the main mechanical body of the equipment is constructed using industrial-grade 8080 aluminum profiles to form a rectangular frame structure. Connectors are integrated and end caps are used at the joints to ensure overall rigidity and stability. The unwinding and tension control unit is located on the left side of the equipment. It utilizes an active unwinding shaft in conjunction with a drive motor to achieve unwinding, and provides constant and adjustable back tension in the initial stage of the conveyor belt delivery through a tension motor or magnetic powder brake to prevent the belt from slackening due to inertia. The guiding feeding unit is equipped with multiple sets of parallel guide rollers to regulate the conveying path. Some guide rollers can be fitted with adjustable-width limiting rings at both ends to physically limit lateral deviation of the belt.

[0033] The vision inspection unit is located after the guiding feeding unit. To obtain stable imaging conditions, suction platforms are set on both sides of the vision inspection station. The suction platforms can be metal plates with microporous arrays and hollow internal structures. They are connected to an external vacuum generator through pipes. When the conveyor belt passes through, negative pressure instantly adsorbs the conveyor belt onto the platform surface through the micropores, achieving near-micron-level flatness. The vision components are mounted across the equipment frame via a gantry-type bracket. An upper camera is set at the top to inspect the upper surface of the product, and a lower camera is set at the bottom to inspect the lower surface or contour information of the product. The cameras can be equipped with telecentric lenses to reduce field of view distortion and are configured with coaxial light sources and backlights for surface defect illumination and contour transmission imaging, respectively. The bracket provides positional fine-tuning capabilities to meet the installation and calibration requirements of different film materials and product layouts.

[0034] The traction and rejection unit is a core electromechanical unit. A Y-axis servo traction mechanism is set in the material feeding direction, and the output shaft of the Y-axis servo motor is connected to the active traction roller shaft via a coupling or synchronous belt. To reduce crushing damage to the surface of sensitive film materials, the traction roller adopts a separate double pressure roller structure, that is, two independent short pressure rollers are installed only at the edges of the corresponding material belt, and each short pressure roller is equipped with a driven pressure roller; during operation, only the edge area is subjected to pressure and traction force, and the effective product area in the middle does not come into contact with the pressure roller, thereby reducing the probability of scratches, indentations and secondary contamination. The rejection mechanism is set above the traction mechanism, preferably with a Cartesian coordinate structure: an X-axis linear module is set along the width direction of the equipment, driven by the X-axis servo; a Z-axis linear module is vertically installed on the X-axis slider, driven by the Z-axis servo; a rejection actuator is installed at the end of the Z-axis, which can be a suction nozzle or an adhesive probe, used to stick and remove waste tape or remove defective areas from the material belt.

[0035] The winding unit includes waste material winding and finished product winding. Waste material winding is located next to the rejection station, and a motor-driven winding shaft collects the waste tape used in the rejection process. Finished product winding is located on the right side of the equipment. To reduce the impact of winding tension on the front-end material feeding and imaging stability, a buffer zone is set between the Y-axis traction unit and the finished product winding shaft, allowing the tape to naturally droop to form a U-shaped hopper. A photoelectric sensor is installed above the bottom of the hopper. The finished product winding shaft is driven by an independent motor, and the photoelectric sensor detects the amount of tape droop. When the droop obstructs the sensor, the winding motor starts winding; when the droop decreases and the sensor resumes triggering, the winding motor stops, achieving intermittent winding. This isolates the winding tension from the front-end traction action, creating low-tension operating conditions in the detection area.

[0036] In one embodiment, the electrical control system uses a PLC as its core to realize motion control, logic control, and data communication. An external three-phase AC power supply enters the electrical control cabinet via the main circuit breaker and is distributed through multiple miniature circuit breakers; one path is converted to 24V DC by a switching power supply for the PLC, touchscreen, human-machine interface, sensors, and control loops; another or more paths power servo drives, industrial computers, and light source controllers. The PLC can be a Siemens S7-1200 series CPU. The touchscreen HMI is connected to the PLC via Ethernet for parameter setting, start / stop control, status monitoring, and alarm information display. Start, stop, and emergency stop buttons are connected to the PLC's digital input terminals, and the photoelectric sensor in the finished product winding area is also connected to the PLC's digital input terminals. The motion execution layer is equipped with three servo drives to control the Y-axis feeding, X-axis rejection, and Z-axis rejection respectively. The PLC sends position and speed commands to the servo drives via an industrial Ethernet switch and receives feedback. Waste material winding can use stepper motors and stepper drives; the PLC controls its rotation angle and speed through pulse output. In terms of vision and main control communication, two industrial cameras can be connected to an industrial switch via a data acquisition card or 10 Gigabit Ethernet. The industrial control computer and PLC are connected to the same switch to form a local area network. The industrial control computer executes the vision inspection software and the main control software. The vision inspection results are sent to the main control logic via TCP / IP, and then the main control logic sends instructions such as movement and rejection coordinates to the PLC via S7 communication.

[0037] In one embodiment, the system operation process can be summarized into stages such as material feeding and positioning, adsorption and imaging, visual analysis, position deviation calculation, material feeding compensation, defect tracking and rejection, and finished product winding adjustment. After startup, the unwinding unit applies initial tension, and the PLC drives the Y-axis servo to drive the separate double pressure rollers to pull the material belt forward according to the set step length or the imaging position; when the material belt reaches the visual inspection station, the Y-axis stops and the suction system is activated to flatten the material belt, triggering the camera to take pictures and perform image analysis. The main control software calculates the deviation ΔY between the actual position of the material belt and the standard position based on visual analysis, and generates compensation instructions for the next movement. At the same time, it writes the OK or NG status and defect coordinates of each product in the current field of view into the data queue corresponding to the physical space for subsequent rejection scheduling; when the PLC executes the next movement, it uses the compensated target position for material feeding and positioning. When a non-compliant (NG) product in the queue moves with the conveyor belt to the rejection station, the PLC controls the Y-axis to precisely position and stop it. Then, based on the X-axis coordinates of the NG product provided by the host computer, the PLC controls the X-axis and Z-axis servos to move the rejection actuator above the target, presses down to execute the rejection action, and then lifts it back to its original position. At the same time, the photoelectric sensor in the finished product winding area continuously detects the sag of the U-shaped hopper and controls the start and stop of the winding motor, reducing the impact of the winding action on the front-end traction and imaging stability.

[0038] In one embodiment, to suppress the cumulative position error caused by continuous conveying, the system performs position feedback correction once per imaging cycle. Specifically, the main control software establishes a virtual two-dimensional array in memory corresponding to the camera's field of view based on the product's layout parameters on the conveyor belt (such as row and column spacing). After obtaining the image, the vision software first performs product positioning. The positioning output is used not only to determine the product instance but also to calculate the Y-coordinate of the identified product within the current field of view and compare it with the preset standard Y-coordinate to obtain the current conveying deviation ΔY. Subsequently, ΔY is sent to the PLC, which applies compensation to the theoretical target position during the next conveying cycle, correcting the next target position by "theoretical position minus ΔY". This keeps the drift between the visual coordinates and physical coordinates within a small range, reducing long-term offsets caused by mechanical tolerances, tension fluctuations, slippage, etc.

[0039] In one implementation, to achieve defect tracking and scheduling between the camera and the rejection station, the main control software maintains a first-in-first-out (FIFO) data queue to simulate the material transfer process from the camera to the rejection station. After each material feed, the queue undergoes a logical shift. Data at the head of the queue, representing data that has reached or passed the rejection station, is removed, while the tail of the queue is replenished with newly captured product matrix data. When the position corresponding to the head of the queue reaches the rejection station and is marked as containing an NG product, the main control software calculates the XYZ coordinates of the NG product relative to the origin of the rejection mechanism based on calibration parameters and sends them to the PLC for rejection. To improve cycle time, motion control can employ a rejection priority strategy and a shortest movement strategy: after confirming that the current rejection position has been completed, the next NG product to be rejected is moved to the rejection position first; if there are no NG products in the queue between the camera and the rejection position, the camera's field of view is moved one or more times before the next image analysis is performed.

[0040] In one implementation, the visual algorithm employs multi-stage processing to balance speed and detection accuracy. First, product localization and grid reconstruction are performed: the operator can select an ideal product as a template on a standard image, and the system extracts the template's edge contours as features. During detection, an image pyramid strategy is used for both coarse and fine localization, outputting a list of center coordinates for all products within the field of view. Subsequently, a data processing script clusters the center coordinates along the Y-axis and sorts them along the X-axis, reconstructing the disordered coordinates into a two-dimensional logical grid, which is then compared with a preset standard number of rows and columns to determine missing or abnormally arranged points. Second, surface anomaly enhancement is performed: to detect low-contrast defects such as foreign objects and dirt, multi-directional filtering kernels (e.g., sensitive to 0°, 30°, 60°, 90°, and 120° directions) are constructed and convolved with the image to obtain multiple texture response feature maps. These feature maps are then weighted and fused to generate a defect saliency map, suppressing uniform background textures and enhancing local anomalies. Dimension verification and arc edge integrity analysis are performed again: Edge point sets of inner and outer rings are extracted near each product positioning point. Edge detection is used, and the center and radius of the rings are obtained through least-squares circle fitting. Dimensional compliance is determined by combining parameters such as concentricity of inner and outer rings and ring width. For edge damage or adhesive residue, virtual caliper lines are emitted inward and outward at small intervals (e.g., 8 pixels) along the fitted arc path. The grayscale profile is analyzed to identify edge defects such as abrupt weakening, abrupt position offset exceeding a threshold (e.g., 19 pixels), or multiple abrupt changes. Finally, defect confirmation and attribution are performed: The defect saliency map is thresholded (e.g., threshold 100), connected component analysis is performed to obtain defect spots, and the area is calculated. Noise spots are filtered using an area threshold (e.g., greater than 750 pixels). The center coordinates of confirmed defects are spatially correlated with a two-dimensional logical grid to determine which product's detection frame the defect falls into, thus achieving a one-to-one correspondence between defects and specific product instances. The existence matrix and defect matrix are output and provided to the main control logic in JSON format for rejection decisions.

[0041] In one implementation, the software system uses Python to implement modular control applications, and the graphical interface is built on PySide6. The system can adopt an event-driven architecture, running the vision processing thread and motion control thread in parallel: the vision processing thread is responsible for image analysis, position deviation calculation, and defect matrix generation; the motion control thread uses a finite state machine to cyclically execute actions such as "checking equipment status, rejection decision, movement decision, and material feeding after position compensation". To achieve unification between pixel space and physical space, the system collects multiple sets of pixel coordinate points and physical coordinate points during the initial calibration phase, and uses least squares fitting of a two-dimensional affine transformation matrix to convert the visual output pixel coordinates into millimeter-level coordinates usable by the PLC; before formal operation, a benchmark positioning process can also be executed to correct the macroscopic deviation between the initial physical position of the product and the theoretical benchmark, and then continuously uses ΔY obtained from each photo as a dynamic correction amount to participate in movement calculation during operation. The hardware communication layer encapsulates vision data reception, PLC data block reading and writing, heartbeat and status register monitoring, enabling the upper-layer logic to issue movement and rejection instructions and obtain execution status through a unified interface.

[0042] Referring to the accompanying drawings, in a specific implementation, one can refer to... Figure 1 The structural arrangement shown is as follows: The unloading roller 1 is located on the left for unwinding; the upper detection camera 2 and the lower detection camera 7 are used for upper and lower surface or contour detection, respectively; the rejection mechanism 3 is located downstream of the cameras and above the traction mechanism; the pulling roller 4 is driven by a Y-axis servo to feed the material; the take-up roller 5 is located on the right for finished product take-up; and the frame 6 supports each unit and maintains relative positional accuracy. Through the coordination of the above mechanical structure, vision algorithm, and control logic, the system can achieve coordinate consistency between defect detection results and rejection actions under high-speed continuous conveying conditions, and improve the imaging quality and recognition stability of minute defects under low tension and high flatness conditions.

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

Claims

1. An automatic calibration method for detecting and rejecting film defects, which is suitable for on-line detection and rejection of a continuous material belt, the material belt sequentially passing through an unwinding station, a visual detection station, a rejection station and a winding station along a conveying direction, characterized in that, The application relates to a method for calibrating the position of a vision inspection station in a product inspection system. The method comprises the following steps: Adjustable back tension is applied to the material belt at a unwinding station; The material belt is driven to move step by step or to be positioned by a traction roller group driven by a material feeding servo motor; When the material belt reaches a vision inspection station, the material feeding is stopped, the material belt is adsorbed on a detection plane by an air suction leveling mechanism, and then a camera is triggered to collect an image; Product positioning is performed on the image to obtain a coordinate set of multiple product instances in a field of view, and a transmission direction coordinate statistical value of the coordinate set is compared with a preset standard coordinate to obtain a position deviation Delta Y generated by the current material feeding; The position deviation Delta Y is used as a calibration compensation amount for the next material feeding, a compensation instruction of a target position or a distance of the material feeding is generated, and the compensation instruction is sent to a lower controller, so that closed-loop correction of the detection position and the physical material feeding position is realized; After the product positioning is completed, defect detection is performed on the image to obtain a pass / fail identification and a defect coordinate of each product instance, and a defect result matrix is generated according to the arrangement relationship of the products on the material belt; In a upper control program, a data queue corresponding to a fixed distance between the vision inspection station and a rejection station is maintained, the defect result matrix is written to the tail of the queue according to a material feeding update rule, and the defect result matrix is shifted synchronously with each material feeding; When a product matrix corresponding to the head of the queue reaches the rejection station and there is an unqualified product, a target coordinate of the unqualified product at the rejection station is calculated according to a transformation relationship between pixel coordinates and physical coordinates, the rejection mechanism is controlled to move to the target coordinate in a width direction and a vertical direction and to perform a rejection action; 2. The method of claim 1, wherein, At a winding station, a buffer sagging material bin is formed, and a photoelectric sensor is used to detect a sagging state to control an intermittent start and stop of a finished product winding motor, so that winding tension fluctuation is avoided from being transmitted to the vision inspection station. The position deviation Delta Y is determined by the difference between the average value, the weighted average value or the median of the transmission direction coordinates of the multiple product instances in the field of view and the preset standard coordinate, and abnormal positioning points are removed or given a lower weight during the statistics.

3. The method of claim 1, wherein, The compensation instruction satisfies that the target position of the material feeding is equal to a theoretical target position minus the position deviation Delta Y, or the distance of the material feeding is equal to a theoretical distance of the material feeding minus the position deviation Delta Y.

4. The method of claim 1, wherein, The transformation relationship between the pixel coordinates and the physical coordinates is obtained through initial calibration, the initial calibration comprises collecting a plurality of pixel coordinate and corresponding physical coordinate matching point sets, and a two-dimensional affine transformation matrix is obtained by least square fitting, which is used for converting defect pixel coordinates into physical coordinates executable by the lower controller.

5. The method of claim 1, wherein, The data queue is a first-in first-out queue; after each material feeding is completed, historical data exceeding the rejection station at the head of the queue is removed, and a defect result matrix obtained by image analysis is written to the tail of the queue; a mutual lock or an equivalent synchronization mechanism is used to ensure data consistency during reading and writing of the data queue. The upper control program adopts a parallel task execution mode, and the vision processing task and the motion control task are respectively arranged in independent execution units to run; the vision processing task pushes the defect result matrix to the data queue, and the motion control task reads the product state reaching the rejection station from the data queue and triggers the rejection action.

6. The method of claim 1, wherein, Performing row-column reconstruction based on the product instance center coordinates, the row-column reconstruction includes clustering in the transmission direction coordinate to form row groups and sorting in the width direction coordinate within each row group to form column sequences, thereby obtaining a two-dimensional logical grid corresponding to the product physical arrangement; comparing the two-dimensional logical grid with a preset row-column number to determine missing products or position abnormalities.

7. The method of claim 1, wherein, The defect detection includes directional texture filtering: constructing multiple groups of filtering kernels with different directions and respectively convolving the image to obtain multiple directional response feature maps, and performing weighted fusion on the directional response feature maps to obtain a defect saliency map; performing thresholding and connected component analysis on the defect saliency map, and filtering noise according to a connected component area threshold to obtain a candidate defect region.

8. The method of claim 1, wherein, The defect detection includes circular arc edge integrity analysis: arranging multiple virtual caliper lines at a preset interval along the ideal circular arc path fitted out, and analyzing the gray level change profile of each virtual caliper line; when the gray level jump strength is lower than a threshold value, the jump position offset exceeds a threshold value, or multiple jumps occur, it is determined as an edge defect.

9. The method of claim 1, wherein, The moving strategy of the material walking servo includes: when there is a substandard product to be removed in the data queue, calculating the shortest moving distance required to move the next product to be removed to the removal station and performing the movement; when there is no product to be removed in the data queue, performing a fast movement by a camera field of view distance or an integer multiple thereof to enter the next photographing detection.

10. An automatically calibrated film defect detection rejection system characterized by, Comprise: A rack; A unwinding unit, a guide roller group, a visual detection station, a traction and removal unit and a winding unit arranged on the rack; The visual detection station comprises an air suction leveling mechanism, a camera and a light source; The traction and removal unit comprises a material walking servo motor and a traction roller group for material walking, and an X-axis linear module arranged along the width direction of the material belt, a Z-axis linear module arranged in the vertical direction and a removal executor arranged at the end of the Z-axis; The winding unit comprises a finished product winding shaft, a buffer sag material bin formed between the traction roller group and the finished product winding shaft, and a photoelectric sensor for detecting the sag state; The system further comprises an upper industrial computer and a lower controller, the upper industrial computer is used for image processing, position deviation ΔY calculation, defect result matrix generation and data queue updating, the lower controller is used for receiving compensation instructions and controlling the material walking servo motor, the X-axis linear module and the Z-axis linear module to perform material walking positioning and removal actions, and controlling the finished product winding shaft to start and stop intermittently according to the photoelectric sensor signal; The traction roller group is a separate double compression roller structure, two short compression rollers are arranged on both sides of the material belt respectively, and each compression roller is matched with a driven compression wheel to realize edge traction. The air suction leveling mechanism comprises an air suction platform with a micro-pore array and a pipeline in communication with a vacuum generator, the air suction platform is a cavity structure inside, used for adsorbing the material belt to the detection plane at the photographing moment.