A surface defect identification method for aluminum plate calendering
Patent Information
- Application Number
- CN202610814362.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-08-21
AI Technical Summary
[0003]然而,铝板表面的高反光特性、油膜反射效应与轧制纹理背景之间存在强耦合干扰,在检测过程中,补光角度、曝光状态、带速变化以及油膜分布差异会使镜面高光、反射条带与真实缺陷在图像中相互混杂,导致同一缺陷在不同帧中显隐不稳定,而正常轧制纹理又可能呈现与缺陷相似的局部响应,由于这种背景纹理、反光分量与缺陷特征之间难以有效分离,现有方案往往难以在连续生产条件下同时保证检出稳定性与定位一致性,容易出现误报、漏报、重复计数或缺陷片段化问题,从而削弱表面检测结果对后续分级、追溯与工艺调整的支撑作用
本发明通过构建监测帧对齐、反光分量剥离、纹理基准生成、稳定缺陷对象归并与复核反馈更新的闭环识别机制,实现了铝板压延加工过程中表面缺陷的稳定识别、准确定位与持续优化;该方法融合表面图像与带速、补光状态、曝光配置等工况信息,能够区分镜面高光、油膜反射与真实缺陷之间的差异,减弱反光干扰和轧制纹理对识别结果的影响,在此基础上,通过构建纹理周期背景并提取缺陷残差响应,结合跨帧坐标映射与形态归并,提升了划伤、压痕、麻点等缺陷的检出稳定性和连续性,同时引入追溯记录与复核反馈机制,对反光掩膜边界、纹理周期范围与归并门限进行自适应修正,降低误报、漏报、重复计数与片段化风险,从而提高识别精度、追溯能力与现场适应性。
Smart Images

Figure CN122617841A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of surface image detection technology, and more specifically, to a method for identifying surface defects in aluminum plate rolling processes. Background Technology
[0002] In the field of aluminum sheet rolling, online surface defect identification technology has been widely used in continuous production scenarios such as cold rolling, finishing, and pre-coiling quality inspection. This type of technology typically uses computer programs to control line scanning cameras, area scanning cameras, supplementary lighting devices, and image analysis units to continuously image the surface of aluminum sheets running at high speeds, and detect, locate, and record abnormal areas such as scratches, indentations, pits, oil stains, and roll marks in the images. Existing technical solutions focus on improving the accuracy and efficiency of defect identification through image enhancement, texture analysis, feature extraction, or intelligent recognition models to meet the quality control requirements of continuous operation, real-time judgment, and online traceability in the aluminum sheet rolling process. Such solutions generally rely on machine vision to automatically detect the surface of continuous strip materials, and their technical implementation involves the collaborative application of image processing, surface defect detection, and online quality analysis.
[0003] However, the high reflectivity of aluminum plate surfaces, the oil film reflection effect, and the rolling texture background are strongly coupled and interfered with. During the detection process, the supplementary lighting angle, exposure state, belt speed changes, and differences in oil film distribution can cause specular highlights, reflective strips, and real defects to mix in the image, resulting in the same defect appearing and disappearing unstablely in different frames. Meanwhile, normal rolling textures may exhibit local responses similar to defects. Since it is difficult to effectively separate the background texture, reflective components, and defect features, existing solutions often cannot simultaneously guarantee detection stability and location consistency under continuous production conditions. This can easily lead to false alarms, missed alarms, duplicate counting, or defect fragmentation, thereby weakening the supporting role of surface inspection results for subsequent grading, traceability, and process adjustment. Summary of the Invention
[0004] In order to overcome the above-mentioned defects of the prior art, the following solution is proposed to solve the problem of false detection of reflective textures in the above-mentioned background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for identifying surface defects in aluminum sheet rolling processes includes the following steps: S1. Collect the surface image sequence of the rolling station and simultaneously collect the belt speed, supplementary lighting status and exposure configuration, and generate a monitoring frame sequence by aligning them according to a unified time reference. S2. Statistically determine the high-brightness tail section for each frame's brightness distribution, locate the specular highlight area and the oil film reflection enhancement area to generate a reflective mask, connect and extend along the rolling direction to obtain the reflective influence domain, reconstruct the background brightness surface within the influence domain with neighborhood consistency constraints and replace the reflective component to obtain the reflective correction map. S3. Extract the main direction gradient from the reflection correction map to determine the rolling direction, construct the strip texture response sequence and perform periodic consistency detection to generate a texture reference map, perform background subtraction to obtain the defect residual map, perform structural enhancement and directional continuity constraint on the residual map at different scales to output candidate response maps for extracting connected regions; S4. Extract connected regions from candidate response maps to generate defect object entries, including location, scale, orientation and inter-frame persistence fields. Map strip coordinates according to strip speed and frame number, and associate and merge across frames according to position threshold and morphological compatibility rules to form stable defect objects. S5. Extract morphological and residual stability features from stable defect objects, output defect category and severity, and write them into the traceability record. Adaptively update the reflective mask boundary, texture period range, and merging threshold based on the review conclusion.
[0006] Furthermore, the generation of the monitoring frame sequence in S1, aligned according to a unified time base, includes: Determine the timestamp of the surface image frame as the alignment key; Within a preset time window, retrieve the belt speed, supplementary lighting status, and exposure configuration that match the timestamp, and write the belt speed field, supplementary lighting status field, and exposure configuration field into the same frame record to form a monitoring frame. The monitoring frame contains at least the frame number, timestamp, surface image frame, belt speed field, supplementary lighting status field, and exposure configuration field. When no matching data is obtained for any operating condition field within a preset time window, the corresponding monitoring frame is marked as an unavailable frame and is skipped in subsequent steps or recorded as a traceability entry separately.
[0007] Furthermore, the statistical brightness distribution in S2 determines the high-brightness tail region, including: Generate brightness histograms or cumulative distribution curves for surface image frames; In the brightness distribution, determine the brightness range corresponding to the main peak of the background, and determine the starting brightness threshold of the tail based on the attenuation trend of the main peak towards the bright end. Define the brightness range that is not less than the brightness threshold as the bright tail range. High-brightness candidate regions are generated based on the high-brightness tail region to locate the specular highlight area and the oil film reflection enhancement area.
[0008] Furthermore, in S2, the high-gloss area of the positioning mirror and the oil film reflection enhancement area generate a reflective mask and extend it along the rolling direction to obtain the reflective influence domain, which includes: Extract connected regions within the highlighted candidate regions and generate a set of connected components; Based on the brightness consistency of connected regions, the abrupt boundary gradient characteristics, and the strip continuity along the rolling direction, the reflectivity type of the connected region set is determined. Connected regions that satisfy the specular highlight characteristics are marked as specular highlight regions, and connected regions that satisfy the strip reflection enhancement characteristics are marked as oil film reflection enhancement regions. These are then merged to obtain a reflective mask. Hole repair and fracture connection are performed on the reflective mask, and directional expansion is performed along the rolling direction to cover the reflective overflow edge, thus obtaining the reflective influence domain.
[0009] Furthermore, in S2, the background brightness surface is reconstructed within the reflective influence domain using neighborhood consistency constraints, and the reflected component is replaced to obtain the reflective correction map, including: Determine the boundary ring region of the reflective influence area and extract the brightness value of the boundary ring region as the boundary condition; An initial value of the background brightness surface is established within the reflective influence domain. The background brightness surface is iteratively updated while keeping the boundary conditions unchanged, so that the brightness value of each point in the domain satisfies the smooth and continuous constraint that is consistent with the brightness of its neighboring pixels, thus obtaining the reconstructed background brightness surface. The original luminance components within the reflection influence domain are replaced with the reconstructed background luminance surface, while keeping the pixels outside the reflection influence domain unchanged, and a reflection correction map is output.
[0010] Furthermore, in S3, extracting the principal direction gradient from the reflection correction map to determine the rolling direction includes: Calculate the gradient magnitude and gradient direction for the reflection correction map, and generate a direction statistics histogram; The dominant direction angle is determined as a candidate rolling direction from the direction statistics histogram; A consistency determination is performed on the candidate rolling directions of adjacent monitoring frames. When the consistency determination is satisfied, the current rolling direction is output. When the consistency determination is not satisfied, the dominant direction angle within the time window is used as the current rolling direction.
[0011] Furthermore, the process of constructing a striped texture response sequence and performing periodic consistency detection to generate a texture baseline map in S3 includes: Perform strip projection or row-column convergence operations on the reflectivity correction image along the rolling direction to obtain the strip texture response sequence; A candidate set of periods is calculated for the strip texture response sequence, and the repetition consistency of each candidate period in adjacent segments is evaluated. Periods whose consistency meets the threshold are selected as the texture period range. A texture reference map is generated based on the texture period range, so that the texture reference map represents the periodic background component of the rolling texture in the rolling direction.
[0012] Furthermore, in S3, the residual map is subjected to structural enhancement at different scales and directional continuity constraints to output candidate response maps, including: Linear and point structural responses are extracted from the defect residual map at various scales to form response sets at different scales. Response connectivity filtering is performed on response sets at different scales to retain response segments that meet the minimum continuous length condition in the rolling direction and suppress isolated short segments; The filtered response sets at different scales are mapped to candidate response maps for extracting connected regions.
[0013] Furthermore, in S4, defect object entries are generated by extracting connected components from the candidate response map and then associated and merged across frames to form stable defect objects, including: Perform connectivity labeling on the candidate response graph to obtain a set of candidate connected regions; For each candidate connected region, extract its position, scale, orientation, residual peak value, continuous length along the rolling direction, and inter-frame persistence, and write them into the defect object entry; Based on the belt speed and frame number, the defect object entries are mapped to the strip coordinate system to obtain the strip position range of the defect object; Between adjacent monitoring frames, cross-frame matching is performed based on the overlap relationship of the strip position interval and the direction deviation threshold, and when the matching is successful, the defect object entries are merged and updated. When multiple defect object entries satisfy the same strip location range and have compatible shapes, they are merged into the same stable defect object and a set of stable defect objects is output.
[0014] Furthermore, the S5 process of writing traceability records and adaptively updating the reflective mask boundary, texture period range, and merging threshold based on the review conclusions includes: For each stable defect object, generate a traceability entry. The traceability entry should include at least the defect category, severity, strip coordinates, frame number range, confidence flag, and verification flag. When the verification flag indicates a false alarm, adjust the reflective mask boundary or increase the connectivity screening conditions of the candidate response map to suppress similar false alarms; When the verification flag indicates a missed report, adjust the texture period range or reduce the minimum continuous length condition of the candidate response map to improve the detection of weak defects; When the verification flag indicates duplicate counting or fragmentation, adjust the strip position overlap threshold and orientation deviation threshold for cross-frame matching to optimize the merging threshold; Write the updated reflective mask boundary, texture period range, and merging threshold into the parameter version entry and store them in association with the traceback entry.
[0015] The technical effects and advantages of the surface defect identification method for aluminum plate rolling process of the present invention are as follows: This invention achieves stable identification, accurate positioning, and continuous optimization of surface defects during aluminum plate rolling by constructing a closed-loop identification mechanism that integrates monitoring frame alignment, reflective component stripping, texture benchmark generation, stable defect object merging, and verification feedback updates. The method integrates surface images with operating condition information such as belt speed, supplementary lighting status, and exposure configuration, enabling it to distinguish between specular highlights, oil film reflections, and real defects, reducing the impact of reflective interference and rolling textures on the identification results. Furthermore, by constructing a texture periodic background and extracting defect residual responses, combined with cross-frame coordinate mapping and morphological merging, the detection stability and continuity of defects such as scratches, indentations, and pitting are improved. Simultaneously, a traceability recording and verification feedback mechanism is introduced to adaptively correct reflective mask boundaries, texture periodic ranges, and merging thresholds, reducing the risks of false alarms, missed alarms, duplicate counting, and fragmentation, thereby improving identification accuracy, traceability, and on-site adaptability. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a surface defect identification method for aluminum plate rolling processing according to the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] In order to achieve the above objectives, Figure 1 A schematic diagram of a surface defect identification method for aluminum plate rolling processing according to the present invention is provided, which specifically includes the following steps; S1. Acquire a sequence of surface images at the calendering station and simultaneously acquire belt speed, supplementary lighting status, and exposure configuration. Generate a monitoring frame sequence aligned with a unified time reference. Specific implementation steps include: In this embodiment, the online identification of surface defects in the rolling production line uses a monitoring frame sequence as the basic data structure for subsequent reflection correction, texture reference modeling, and defect object merging. The monitoring frame sequence consists of multiple monitoring frames arranged in chronological order. Each monitoring frame is used to express the binding relationship between surface image information and imaging-related working condition information at the same moment or within the same short time slice, so as to ensure the consistency of subsequent processing in the image domain and the working condition domain.
[0019] In one implementation, a line scan camera or area scan camera is configured at the rolling station to acquire a sequence of surface images. Simultaneously, the production line controller or data acquisition module acquires the belt speed, supplementary lighting status, and exposure configuration. Belt speed is used to characterize the speed at which the strip moves in the rolling direction. The supplementary lighting status is used to characterize the on / off status, working level, or working mode of the supplementary lighting device; Exposure configuration is used to characterize camera exposure time, gain, or equivalent exposure parameters; The above belt speed, fill light status and exposure configuration are all output with independent data channels, and each has its own sampling timestamp or update time mark.
[0020] This step uses the timestamp of the surface image frame as the alignment key to achieve unified time reference alignment. Specifically: For each surface image frame, its acquisition time is read as the image timestamp, and an incrementing frame number is assigned to that image frame. A preset time window is established with the image timestamp as the center. The width of the time window is set according to the production line sensor update cycle, controller refresh cycle and camera sampling frequency, so that the time window can cover the possible range of one working condition update near the image frame. Subsequently, within this time window, data on three types of operating conditions—belt speed, supplementary lighting status, and exposure configuration—were retrieved, and the record whose timestamp fell within the window and was closest to the image timestamp was selected as the matching result. When writing operating condition fields into the same frame record to form a monitoring frame, this embodiment specifies that the monitoring frame must include at least the following fields: The system includes a frame number, a timestamp, a surface image frame, a belt speed field, a supplementary lighting status field, and an exposure configuration field. The frame number indicates the order of the monitoring frame in the monitoring frame sequence; the timestamp indicates the reference time used for aligning the monitoring frames; the surface image frame provides pixel-level image information; the belt speed field records the belt speed value matching the image frame; the supplementary lighting status field records the supplementary lighting working status matching the image frame; and the exposure configuration field records the set of exposure parameters matching the image frame. This allows the resulting monitoring frame to be directly used as input for subsequent steps, enabling each image processing step to reference the working condition fields recorded in the same frame for condition selection or parameter adaptation.
[0021] In an optional implementation, the fill light status field is encoded using a discrete enumeration method, such as using "off," "low," "medium," and "high" to represent the fill light intensity level, or using "forward oblique incidence," "lateral diffuse reflection," and "alternating strobe" to represent the working mode; the exposure configuration field is stored in the form of parameter groups, such as including exposure time, gain, line frequency, or equivalent exposure coefficient; the belt speed field can directly record the belt speed set value or measured value output by the controller, and a speed source marker can be added to the monitoring frame to distinguish between the set value and the feedback value, but this does not affect the basic requirement of including at least one field.
[0022] When no matching data is obtained for any working condition field within a preset time window, in order to avoid misusing the image frame of the missing working condition for subsequent reflection correction and merging calculations, this step marks the corresponding monitoring frame as an unusable frame. The unusable frame mark can be set as a binary mark field or a status code field, and it will be skipped directly in subsequent steps to avoid entering the reflection mask generation, texture period detection and cross-frame merging process. At the same time, this embodiment can also write the frame number, timestamp, missing field type and missing reason of the unusable frame into a traceability entry. The traceability entry is stored in association with the monitoring frame sequence to facilitate subsequent investigation of abnormalities in the sensor link, supplementary lighting control link or camera configuration link.
[0023] An example of an alignment process is as follows: When a camera acquires a surface image frame whose timestamp falls between a belt speed update and an exposure parameter update, and the supplementary lighting state remains unchanged during this period, the belt speed record, supplementary lighting state record, and exposure configuration record closest to the image timestamp are selected within a preset time window, and these three are written into the frame record of the image frame to form a monitoring frame. If the exposure configuration record cannot be retrieved within the time window (e.g., due to a short-term interruption of the camera parameter reading link), the frame record is marked as an unusable frame, and subsequent steps skip this frame. At the same time, a traceability entry is generated to record the event of missing exposure configuration. Through this process, it is possible to avoid mixing image frames under unknown exposure conditions with normal frames for calculation, thereby reducing the risk of false alarms and false negatives occurring simultaneously during operating condition switching.
[0024] In another example, when the production line switches between fill light levels or exposure configurations, the fill light status field and exposure configuration field will be updated frequently in a short period of time. At this time, the image timestamp is still used as the alignment key. Selecting the most recently matched record within the preset time window can ensure that each frame of the image uses the fill light and exposure parameters closest to it. If it is necessary to further improve the alignment stability, the working condition switching mark can be additionally recorded in the traceability entry, so that subsequent steps can adopt stricter reflection influence domain expansion conditions or more conservative cross-frame merging thresholds for the monitoring frames during the switching period. However, the construction process of the monitoring frame still follows the above field writing and unusable frame marking principles.
[0025] S2. Determine the high-brightness tail region for each frame's statistical brightness distribution, locate the specular highlight area and the oil film reflection enhancement area to generate a reflective mask, connect and extend along the rolling direction to obtain the reflective influence domain, reconstruct the background brightness surface within the influence domain using neighborhood consistency constraints and replace the reflective components to obtain the reflective correction map. Specific implementation steps include: Step S2 first performs the process of determining the highlighted tail region, which specifically includes: Calculate the brightness histogram for the current surface image frame, or generate a cumulative distribution curve based on the brightness histogram. Then, identify the background peak with the most concentrated number of pixels in the brightness distribution, and take the brightness range corresponding to the background peak as the main background brightness range of the current frame. Since the brightness distribution of rolled aluminum plates is usually concentrated in the flat area, while the specular highlights and oil film reflection enhancement areas will form a sparse and prominent tail distribution at the high brightness end, the brightness decay trend can be searched along the main peak of the background towards the high brightness end. When the decay trend changes from a continuous and gentle change to a significant sparse high brightness distribution, the turning point is determined as the tail start brightness threshold, and the brightness range not less than this threshold is defined as the high brightness tail interval. Based on the high-brightness tail region, threshold screening is performed on the image to obtain high-brightness candidate regions. This processing method is consistent with the actual imaging law that reflective material surfaces are prone to generating high-brightness hotspots, which leads to defects being obscured.
[0026] Furthermore, an operable determination method is provided to directly determine the highlighted tail region, specifically including: First, the brightness histogram is smoothed to reduce local spikes caused by individual noisy pixels. Then, the peak position of the main background peak and the drop-off intervals on both sides are used as the background brightness reference area. Then, the main background peak is scanned step by step towards the bright end. When the pixel ratio of adjacent brightness levels continues to decrease and a sparse bright area that is significantly separated from the main background peak appears, it is considered that the bright end interval has been entered. If a cumulative distribution curve is used, the starting point of the tail is the position where the slope of the cumulative distribution curve becomes significantly gentler at the bright end. For example, when the supplementary lighting is stable but there is local oil film accumulation on the surface of the aluminum plate, the oil film will form a bright band extending along the rolling direction in the image. The pixel group corresponding to this band is usually located at the bright tail to the right of the main peak of the background. Therefore, it can be included in the bright candidate area in advance in the above way, without being confused with the ordinary bright background.
[0027] Step S2 further performs reflection type discrimination on the connected regions within the highlight candidate region, specifically including: Within the highlighted candidate region, connected components are labeled to obtain a set of connected components; For each connected component, calculate the brightness uniformity, the degree of abrupt change in boundary gradient, and the strip continuity along the rolling direction; If the brightness is highly concentrated within a certain connected region, the boundary changes steeply, and it exhibits localized block-like clustering, then the connected region is identified as a specular highlight region. If a connected region extends in a strip shape along the rolling direction, with a relatively slow change in local width, and the response on adjacent rows or adjacent strips has a continuous relationship, then the connected region is determined to be an oil film reflection enhancement region. After completing the type identification, the specular highlight region and the oil film reflection enhancement region are merged to obtain a reflective mask. This distinction makes specular highlights closer to local overexposure or strong reflection patches, while enhanced oil film reflection is more often manifested as bright bands extending along the material's movement direction. The two differ in spatial morphology, and separating them is more conducive to subsequent expansion of the affected field and background reconstruction.
[0028] After obtaining the reflective mask, this embodiment further performs hole repair, fracture connection, and directional expansion along the rolling direction on the reflective mask to form a reflective influence domain, specifically including: Hole repair is used to fill the voids inside the bright areas caused by minute textures, noise, or local exposure fluctuations, preventing the reflective areas from being artificially cut apart. Disconnection joints are used to reconnect multiple connected segments that belong to the same reflective strip but are interrupted by fine dark lines; The directional extension along the rolling direction is used to cover the overflow and transition areas of the reflective edge, because when the aluminum plate moves at high speed and the oil film is unevenly distributed, the reflection does not always appear with a strictly closed bright boundary, and its influence on the brightness of the adjacent area often continues to spread along the rolling direction.
[0029] For example, when the incident angle of the supplementary lighting device remains constant while the local oil film thickness changes, a strip of reflection with a strong central brightness and gradually brightening sides may appear in the image. If only the bright central area is retained, subsequent reconstruction will leave a brightness abrupt change at the edge. After directional expansion, this gradual edge can be included in the reflection influence domain, thereby improving the integrity of the correction.
[0030] Perform background brightness surface reconstruction on the reflective influence area, specifically including: First, determine the boundary ring area near the outer edge of the reflective influence domain, and extract the brightness value in the ring area as the boundary condition. The boundary ring area is preferentially selected as the pixel band that is adjacent to the outside of the reflective influence domain, has not been interfered with by strong reflection, but can represent the brightness change trend of the surrounding background, so as to ensure that the reconstructed background brightness surface inherits the local background structure and does not bring the highlight anomaly into the domain. Subsequently, an initial value for the background brightness surface is established within the reflective influence domain. The initial value can be the local average value of the brightness of the boundary ring area, the neighbor interpolation result, or a smooth starting surface determined according to the background brightness trend before and after the rolling direction. Then, while keeping the boundary conditions unchanged, the brightness value of each pixel in the domain is iteratively updated so that the brightness of each point and its neighboring brightness satisfy the smooth and continuous constraint until the brightness surface in the domain no longer shows significant jumps, thus obtaining the reconstructed background brightness surface. When the brightness change between two consecutive iterations is less than the preset convergence threshold, or when the preset maximum number of iterations is reached, the reconstruction of the background brightness surface ends. The preset convergence threshold and the preset maximum number of iterations are set according to the actual scene.
[0031] The process continues until no significant jumps occur in the brightness surface within the domain, resulting in a reconstructed background brightness surface. To define the termination condition for the iteration, the brightness change between two adjacent iterations can be calculated using the following formula: ; The background brightness surface reconstruction iteration within the current reflective influence domain ends when the following equation is satisfied: ,in, Represents the coordinates within the reflective influence domain after the i-th iteration. Background brightness value at that location; Indicates the first Background brightness value at the same coordinates after each iteration; This represents the set of pixel coordinates corresponding to the current reflective influence area; Indicates the first The iteration and the The maximum brightness change between iterations; This indicates the preset convergence threshold.
[0032] When the maximum brightness change does not exceed the preset convergence threshold, the current background brightness surface is considered to have reached a stable state, and the result of this iteration can be used as the output of the reconstructed background brightness surface.
[0033] If the overall average change is used as the stopping condition, it can be replaced with the following form: and in satisfying The iteration ends when the time is right, where, Indicates the first The iteration and the The average brightness change between iterations; This indicates the total number of pixels within the reflective influence area; This represents the preset convergence threshold corresponding to the average change.
[0034] When using the reconstructed background brightness surface for reflection correction, this embodiment replaces the original brightness components within the reflection influence domain with the reconstructed background brightness surface, while keeping the pixels outside the reflection influence domain unchanged, thereby outputting a reflection correction map. The purpose of this processing is to restore the proper background brightness change trend only within the areas confirmed to be affected by reflection, so that the edges of real defects can still be preserved after reflection elimination. To avoid mistaking real bright defects as completely erased reflections, constraints can be applied in the type discrimination stage, combining boundary gradient and strip continuity. Bright anomalies with closed edges, abrupt local morphological changes, and that do not conform to the specular or stripe reflection rules are not directly included in the reflective mask, but are retained for subsequent defect residual extraction processing.
[0035] In summary, a reflection correction map can be obtained for each monitoring frame after processing. This reflection correction map has removed the main brightness distortion caused by the specular highlight area and the oil film reflection enhancement area. Furthermore, through the expansion of the reflection influence domain and the reconstruction of the background brightness surface, the interference of the highlight center area and its edge transition area on subsequent texture analysis has been reduced.
[0036] S3. Extract the principal direction gradient from the reflection correction map to determine the rolling direction, construct a strip texture response sequence and perform periodic consistency detection to generate a texture reference map, perform background subtraction to obtain a defect residual map, and perform structural enhancement and directional continuity constraints on the residual map at different scales to output candidate response maps for extracting connected regions. The specific implementation steps include: Based on the obtained reflection correction map, while minimizing the interference of specular and oil film reflections, the rolling texture is further separated from the defect information to form a candidate response map, providing input for the next step of connected region extraction and stable defect object generation.
[0037] First, extract the principal direction gradient from the reflection correction map to determine the rolling direction. This can be done as follows: First, calculate the gradient magnitude and gradient direction of each pixel in the reflection correction image to form a gradient field; Then, according to the preset direction partition, the gradient energy or gradient pixel count in each direction is counted to generate a direction statistics histogram; The direction angle with the largest cumulative response in the direction statistics histogram is used as the candidate rolling direction for the current frame. The above method is adopted because the rolling texture on the surface of the rolled aluminum plate has obvious directionality. The normal background has a high degree of structural repetition in the dominant direction, while defects usually manifest as a local perturbation of this dominant direction. Therefore, determining the direction field first and then performing texture modeling can reduce the interference of background texture on subsequent anomaly judgment.
[0038] To avoid local dirt, shallow scratches or residual bright spots in a single frame causing a deviation in the direction determination, this embodiment does not directly use the candidate rolling direction of a single frame as the final direction. Instead, it continues to perform consistency determination on the candidate rolling directions of adjacent monitoring frames. Specifically, the candidate direction of the current frame can be compared with the candidate directions of the previous frame, the previous two frames, or several adjacent frames within the same time window. When the direction difference remains within the preset tolerance range, the current candidate direction is output as the current rolling direction; When the directional difference exceeds the tolerance range, the frequency of occurrence or directional response intensity of each candidate direction is counted within the time window, and the dominant directional angle is selected as the current rolling direction.
[0039] For example, when there is a diagonal scratch in a frame of an image, the scratch may generate a strong gradient in a local area. However, since the adjacent monitoring frames still maintain the original texture flow direction, the consistency judgment will suppress the misguidance of the rolling direction by the local anomaly, thereby ensuring that the subsequent texture modeling is carried out around the real rolling background.
[0040] After determining the rolling direction, this embodiment constructs a strip texture response sequence. Specifically, the reflection correction image can be first aligned with the current rolling direction to make the rolling direction consistent with one of the principal axes of the image. Subsequently, continuous narrow strips are divided along the rolling direction. Projection or row-column convergence operation is performed on each strip to obtain response values representing the intensity change of the background texture of the strip. These values are then arranged sequentially to form a strip texture response sequence. Strip projection converges the brightness, gradient energy, local frequency response, or median brightness within the strip to preserve the stable change trend of the periodic texture and suppress the accidental influence of a single abnormal pixel or local noise. Projecting, filtering, or energy response analysis on materials with regular textures and using this information to find local anomalies is a common approach in industrial surface inspection. For objects with directional and repetitive textures, such as rolled strips, there is a clear implementation basis for expressing background textures using strip response sequences.
[0041] After obtaining the striped texture response sequence, this embodiment further performs periodic consistency detection to form a texture periodic range and generate a texture reference map accordingly. Specifically, the following method can be used: First, search for the spacing between adjacent peaks, the spacing between local autocorrelation peaks, or the dominant period in the frequency response in the strip texture response sequence to generate a candidate period set; The image is then divided into adjacent segments along its length, and the repetition consistency of each segment under each period candidate is calculated. If a certain periodic candidate shows stable repetition in multiple adjacent segments, it is determined as the texture periodic range. When multiple periodic candidates simultaneously meet the consistency condition, the periodic candidate with the most covered segments and the highest consistency is selected as the current texture periodic range. When no suitable periodic candidate is found in the current frame, the texture periodic range of the previous valid monitoring frame is used, or the periodic range with the highest frequency of occurrence within the time window is used as the current texture periodic range. Then, standard strip texture units are constructed based on the texture periodic range and repeatedly spread along the rolling direction to obtain a texture reference map. The texture reference map obtained in this way represents the periodic background component that still exists after reflection correction, without including non-periodic anomalies such as local scratches, indentations, holes or spots.
[0042] After generating the texture reference map, this embodiment performs background subtraction on the reflection correction map and the texture reference map to obtain the defect residual map. The purpose of background subtraction is to cancel out the background components that conform to the texture period range and direction rules as much as possible, and only retain the local abnormal responses that deviate from the period structure.
[0043] For example, normal rolling texture can be continuously represented in the texture reference map, so only a weak residual is left after subtraction. However, shallow scratches, interrupted roll marks, pits, or local indentations will appear as relatively prominent abnormal areas in the residual map because they disrupt the original periodicity and directional consistency.
[0044] After the defect residual map is generated, this embodiment performs structural enhancement and directional continuity constraints at different scales to output candidate response maps. Specifically, linear structural responses and point structural responses can be extracted at at least two different scales. Linear structural responses are used to highlight anomalies such as scratches, roll marks, and cracks that extend along a certain direction, while point structural responses are used to highlight anomalies such as pits, holes, and inclusions. The response results obtained at different scales are then combined into response sets at different scales. Subsequently, response connectivity screening was performed on response sets at different scales, retaining response segments that met the minimum continuous length condition in the rolling direction, and suppressing isolated short segments and discrete noise responses without directional support. The reason for this treatment is that real surface defects often have a certain degree of spatial continuity or structural integrity, while random noise, slight residual texture and local brightness fluctuations usually manifest as scattered and short isolated segments.
[0045] In a practical implementation, smaller-scale responses can be used primarily to extract narrow scratches and tiny point defects, while larger-scale responses can be used primarily to extract wide strip-shaped repeated rolling marks or large-area patches. If a response appears only briefly at a single scale and does not meet the minimum continuous length condition, it will not be included in the candidate response map. If a response is preserved at adjacent scales, or has a continuous extension relationship along the rolling direction at the same scale, then it is enhanced and written into the candidate response map; The resulting candidate response map has completed the transformation from a reflective texture image with corrected reflections to an anomaly response map for defect extraction. Subsequently, connected regions can be extracted from this candidate response map to generate object attributes such as position, scale, orientation, and inter-frame persistence.
[0046] S4. Extract connected regions from the candidate response map to generate defect object entries, including location, scale, orientation, and inter-frame persistence fields. Map the strip coordinates according to the strip speed and frame number, and associate and merge them across frames according to the position threshold and morphological compatibility rules to form stable defect objects. The specific implementation steps include: First, connected component labeling is performed on the candidate response map to obtain a set of candidate connected regions. Specifically, pixels in the candidate response map whose response values satisfy the retention conditions of the previous step are regarded as foreground regions, and connectivity aggregation is performed on adjacent foreground pixels to form multiple candidate connected regions; Each candidate connected region corresponds to a local anomaly segment to be analyzed. At the same time, in order to avoid noise points directly entering the subsequent merging process, candidate connected regions with too small an area, width and height below the minimum imaging resolution, or response peak below the preset lower limit can be removed first, and only connected regions with actual geometric significance are retained. The purpose of this processing is to transform the discrete response in the residual domain into a measurable, comparable, and traceable defect candidate unit.
[0047] After generating candidate connected regions, this embodiment extracts object attributes for each candidate connected region and writes them into a defect object entry, specifically including: Defect object entries must include at least location, scale, orientation, residual peak value, continuous length along the rolling direction, and inter-frame persistence. Location can be represented by the coordinates of the center point of the candidate connected region, the coordinates of the top-left corner of the circumscribed rectangle, or the coordinates of the center point of the smallest circumscribed rectangle. The scale can be expressed as the area of the region, the length and width of the circumscribed rectangle, or the length of the principal axis and the length of the secondary axis; The direction can be represented by the direction angle of the principal axis of the candidate connected region; The residual peak value is used to reflect the maximum anomalous response intensity of the candidate region in the candidate response map; The continuous length along the rolling direction is used to reflect the extent of the candidate region in the direction of strip movement; the inter-frame persistence can be set to the current single-frame persistence value when it is initially generated, and is incremented and updated when the cross-frame matching is successful in subsequent frames.
[0048] With the above object-oriented recording method, subsequent repeated judgments will no longer be made directly around the pixel set. Instead, coordinate mapping, matching, and merging will be performed around the structured entries.
[0049] The following methods can be used to extract the location and scale: First, calculate the minimum and maximum row and column coordinates of the pixel set for the candidate connected region to obtain the bounding rectangle, and then find its center position as the region position. The principal direction of a region can be obtained by fitting the region's second moment or principal axis. The continuous length along the rolling direction is obtained by projecting the region onto the rolling direction axis according to the current rolling direction and statistically analyzing the projection span.
[0050] For example, if a candidate connected region is a long and narrow strip with its main axis direction close to the rolling direction and a long projected span, then the region is more likely to correspond to scratches, rolling marks or ductile surface anomalies. If a candidate connected region is approximately point-like or block-like, it is more likely to correspond to pitting, indentation, or local adhesion anomalies. The defect object entries formed in this way not only retain the geometric features of the candidate region, but also retain the response intensity information associated with the previous residual enhancement result.
[0051] After extracting the object entries, this embodiment maps the defect object entries to the strip coordinate system based on the strip speed and frame number to obtain the strip position range of each defect object. For line scan imaging scenarios, the frame number, timestamp and strip speed can be combined to first determine the strip running reference position corresponding to the current image frame, and then the longitudinal offset relative to the reference position is calculated based on the row position of the candidate connected region in the image. Finally, the position range of the defect object in the strip length direction is obtained, and its lateral position is calculated based on the image column coordinates and imaging calibration relationship. In one implementation, the imaging calibration relationship is pre-established during the production line commissioning phase, specifically as follows: Place the calibration piece or standard scribing strip with known lateral dimension markings within the camera's field of view, acquire calibration images, and extract the column coordinates of the marking edges in the images; Based on the actual lateral spacing between adjacent marks and the difference in corresponding column coordinates, the conversion factor from the image column coordinates to the actual lateral dimension of the strip is determined, thereby obtaining the lateral calibration relationship; For line scan imaging scenarios, the conversion relationship between image line coordinates and actual longitudinal length of the strip can be established by combining line scan line frequency, strip speed and timestamp; For area array imaging scenarios, a longitudinal conversion relationship is established based on the inter-frame time difference, bandwidth, and field of view coverage length. When the camera mounting position, lens focal length, field of view, or imaging resolution changes, the above calibration process should be repeated to ensure that the strip coordinate mapping results remain consistent.
[0052] For area array imaging scenarios, the inter-frame displacement can be calculated based on the acquisition time interval between adjacent frames and the strip speed. Then, the position of the candidate region within the frame is mapped to the position along the length of the strip. This transforms the candidate objects that originally existed only in the coordinate system of a single frame into a physical position range corresponding to the actual surface of the strip. This allows for comparison of whether candidate objects in different frames point to the same surface anomaly under continuous motion conditions.
[0053] In a directly implementable mapping method, the belt speed corresponding to the image timestamp of the current monitoring frame can be regarded as the motion speed of the frame, and the longitudinal displacement of the strip between the two frames can be calculated by combining the time difference between adjacent monitoring frames. Then, the vertical range of the current candidate connected region in the image is superimposed onto the displacement reference to obtain the strip position interval; To clarify the method for determining the strip position range, the longitudinal reference position of the strip in the current frame, the longitudinal start position of the defect, and the longitudinal end position of the defect can be determined by the following formulas: , ; When it is necessary to record the lateral position simultaneously, the lateral start position and lateral end position of the defect can also be determined by the following formula: ,in, This indicates the longitudinal reference position of the strip corresponding to the i-th monitoring frame; Indicates the first The longitudinal reference position of the strip corresponding to each monitoring frame; This represents the bandwidth corresponding to the i-th monitoring frame; Indicates the i-th monitoring frame and the i-th monitoring frame. The time difference between each monitoring frame; This indicates the longitudinal starting position of the defect object in the strip coordinate system within the i-th monitoring frame; This indicates the longitudinal termination position of the defect object in the strip coordinate system within the i-th monitoring frame; This represents the starting vertical coordinate of the defective object in the first monitoring frame; This represents the vertical termination coordinate of the defective object in the first monitoring frame. This represents the longitudinal calibration coefficient of the image, used to convert the longitudinal coordinates of the image into the actual longitudinal length of the strip; This indicates the lateral starting position of the defect object in the strip coordinate system within the i-th monitoring frame; Indicates the first The lateral termination position of the defect object in the strip coordinate system within the monitoring frame; This indicates the horizontal starting coordinates of the defective object in the first monitoring frame; This indicates the horizontal termination coordinate of the defective object in the first monitoring frame; This represents the image lateral calibration coefficient, used to convert the image's lateral coordinates into the actual lateral dimensions of the strip.
[0054] Based on the above relationship, the position range of the defective object in the strip coordinate system can be obtained and used for subsequent cross-frame matching and merging.
[0055] For example, if a candidate object appears near the top of the image in the current frame, and a similar candidate object appears again in the corresponding strip section after tape speed conversion in the next frame, then the two candidate objects can be considered to have a strong possibility of being from the same source. Conversely, if the strip position sections of the two objects are significantly different, even if they are close in image coordinates, they should not be directly merged into the same defect object. This method of first unifying the strip coordinates and then making matching judgments can avoid mismatches caused by simply relying on pixel coordinates.
[0056] In the cross-frame association stage, this embodiment performs cross-frame matching between adjacent monitoring frames based on the overlap relationship of the strip position intervals and the direction deviation threshold. Specifically, for each defect object entry in the current frame, candidate objects with overlapping or nearly overlapping strip position intervals are searched in the defect object entries of the previous frame or several previous frames. Based on meeting the position threshold, the difference in principal axis direction, the magnitude of scale change, and the trend of residual peak value change are compared between the two. Specifically, during cross-frame matching, a position threshold determination is first performed to determine whether the strip position intervals of the current defective object and the historical defective object overlap, are adjacent, or are within a preset proximity range. Once the position threshold is passed, the direction consistency check is performed to determine whether the difference between the two main axis directions is within the allowable range. After the directional consistency judgment is passed, the scale level judgment is then performed to determine whether the length level, width level and continuous length level along the rolling direction of the two are consistent or adjacent levels. After the scale level judgment is passed, the residual change judgment is further performed to determine whether the trend of residual peak change is continuous and whether there is a sudden jump. Only when the above conditions are met in sequence will the current defect object and the historical defect object be identified as the same source object and merged and updated. If the same current defect object corresponds to multiple historical defect objects that meet the conditions, the historical defect object with the highest overlap ratio of strip position interval, the smallest directional deviation and the closest scale level will be selected as the merge object. Other candidate objects will not participate in this merge.
[0057] When the overlap relationship of the strip location intervals meets the requirements, the directional deviation does not exceed the preset threshold, and the scale change does not exceed the allowable range, the cross-frame matching is determined to be successful. A merge update is then performed on the defect object entry. During the merge update, the observation results of the new frame can be written into the existing object entry, updating its latest location interval, cumulative number of consecutive frames, maximum residual peak value, directional statistics, and scale envelope range. This allows the same anomaly observed multiple times in consecutive frames to be integrated into a single persistent object, instead of counting it separately in each frame.
[0058] In the design of the merging rules, this embodiment further considers morphological compatibility. When multiple defect object entries meet the same strip location range and morphological compatibility, they are merged into the same stable defect object. Morphological compatibility refers to the fact that these objects maintain similar characteristics in terms of orientation, scale level, continuous length along the rolling direction, and profile compactness. For example, the same scratch may appear as a slight change in length, a partial break, or a fluctuation in peak response in consecutive frames due to imaging noise, but its main direction is usually stable and its position range in the strip coordinate is continuous. In this case, it should be regarded as the same stable defect object by using the morphological compatibility rule. For example, the same spot may have a slight positional shift in adjacent frames, but if its scale remains at the same level, its direction has no obvious principal axis deviation, and the strip position intervals highly overlap, it can be merged into the same stable object. Conversely, if two objects are close in strip position, but one is long and thin and the other is an isolated block, they should not be merged.
[0059] This embodiment provides a specific update method to achieve the output of a stable defect object set, specifically as follows: Whenever a cross-frame match is successful, the inter-frame persistence of the existing object entry is incremented by one, and the coverage of its strip position interval is expanded. If the same stable object is observed in multiple consecutive monitoring frames, it is marked as a valid stable defect object. If a candidate object appears only in a single frame and there are no matching objects in the subsequent frames, it can be retained as a short-term abnormal object according to actual needs, or it can be removed if the minimum number of continuous frames is not met.
[0060] In this way, the output set of stable defect objects includes not only geometric and response attributes, but also temporal continuity attributes, which facilitates the extraction of morphological and residual stability features, and the output of defect categories and severity.
[0061] After the above processing, the local anomalies in the candidate response map have been transformed from pixel-level responses into stable defect objects with strip physical location, continuity and morphological constraints. In the next step of class determination and severity output, the determination unit is a continuous object after strip coordinate unification and cross-frame merging, which can more realistically reflect the actual distribution of defects on the rolled strip.
[0062] S5. Extract morphological and residual stability features from stable defect objects, output defect category and severity, and write them into the traceability record. Adaptively update the reflective mask boundary, texture period range, and merging threshold based on the review conclusion. Specific implementation steps include: First, extract morphological features and residual stability features for each stable defect object. Morphological features may include at least the length of the bounding rectangle, the width of the bounding rectangle, the aspect ratio, the principal axis direction angle, the area of the region, the degree of boundary compactness, the continuous length along the rolling direction, and the lateral expansion width. Residual stability features may include at least residual peak value, residual mean value, fluctuation range of peak value in consecutive frames, number of consecutive frames held, candidate response overlap ratio, and the amount of drift of the object center in the strip coordinate. The reason for extracting both types of features at the same time is that residual stability can indicate whether the object continues to exist or is stably displayed in continuous monitoring. For example, objects that are slender and have a stable main axis direction, and whose residual peak value is always maintained in a similar range in consecutive frames are more likely to be continuous scratches or rolling marks. Objects that are small in area, approximately point-like, but appear repeatedly in multiple frames and have a fixed position are more likely to be pits, indentations, or point-like adhesion anomalies.
[0063] Regarding the output of defect categories, either rule-based discrimination or classification model discrimination can be used. When using rule-based discrimination, the objects are initially divided into extended objects, block objects, and point objects based on the deviation between the main axis direction angle and the rolling direction, the aspect ratio, and the continuous length along the rolling direction. Then, the objects are further subdivided by combining the residual peak value and the number of consecutive frames held. For example, objects with a large aspect ratio, a long continuous length along the rolling direction, and a small directional deviation can be identified as scratches or streaks; objects with a large area but a medium aspect ratio and irregular boundaries can be identified as patches or indentations; and objects with a small area, an indistinct main axis, and a prominent residual peak can be identified as point-like anomalies. When using a classification model for discrimination, the aforementioned morphological features and residual stability features can be used as inputs. The pre-trained classification model outputs a defect category label. In this case, the pre-trained classification model is constructed from historical defect samples, specifically as follows: Collect stable defect object samples that have been manually verified and label each sample with the corresponding defect category; Extract the following features from each sample: bounding rectangle length, bounding rectangle width, aspect ratio, principal axis direction angle, region area, boundary compactness, continuous length along the rolling direction, lateral expansion width, residual peak value, residual mean value, number of consecutive frame holdings, candidate response overlap ratio, and strip coordinate drift, to form sample feature entries. Input the sample feature entries into the classification model for training, so that the classification model learns the feature distribution relationship corresponding to different defect categories; After training, the classification model is deployed into the online recognition process to output defect category labels for currently stable defect objects; To ensure the traceability of classification results, when using the classification model to output category labels, the current model version identifier can also be written into the traceability entry so that it can be matched with the specific classification model version during subsequent review. Regardless of the method used, the classification unit takes stable defect objects as objects, rather than single-frame connected regions as objects, thereby avoiding the same defect being repeatedly classified in different frames or causing category jitter.
[0064] Regarding the severity output, this embodiment preferably adopts a graded judgment method rather than a single score method. Specifically, a severity judgment table can be established first, and the severity can be divided into at least two levels, preferably into three levels: mild, moderate and severe. Then, the continuous length along the rolling direction, the lateral expansion width, the residual peak range, the number of consecutive frame holding times, and the positional relationship of the key areas of the strip are compared sequentially for stable defect objects. An object is classified as severe when it simultaneously meets the criteria of a high-length interval, a high-peak interval, and a high-persistence interval. If an object meets only some of the conditions, it is classified as medium level. When the object's shape and size and residual stability are both in the low range, it is judged as a minor level. This classification can directly serve subsequent re-inspection, shearing, downgrading or release decisions without the need for secondary interpretation of continuous scores. For example, an object with multiple monitoring frames along the rolling direction, stable residual peaks and gradually increasing lateral width can be directly classified as a higher severity level. A point-like object that appears only within a short range, has a small area, and a low residual peak value can be classified as having a lower severity. After completing the category and severity determination, this embodiment generates a traceability entry for each stable defect object. The traceability entry includes at least the defect category, severity, strip coordinates, frame number range, confidence flag and review flag. In a more complete recording method, the object number, first occurrence frame, last occurrence frame, residual peak summary, direction summary, local image slice index and current processing parameter version identifier can also be written. Strip coordinates are used to correlate defects with actual material locations; frame number ranges are used to trace the continuous interval of the object in the image sequence; confidence markers are used to characterize the reliability of this automatic judgment; and verification markers are used to record the confirmation conclusions given by subsequent manual verification, offline re-inspection, or feedback from later processes. In one implementation, the confidence flag is determined jointly based on the number of consecutive frames held by the stable defect object, the stability of the main direction, the fluctuation of the residual peak value, the overlap ratio of candidate responses, and the degree of strip coordinate drift. Specifically: When the number of consecutive frames held increases, the main direction fluctuation decreases, the residual peak value changes tend to be stable, the overlap ratio of candidate responses in adjacent frames increases, and the strip coordinate drift decreases, the confidence mark level of the stable defect object is increased. The confidence mark can be recorded in a three-level marking method of high, medium and low, or in an ordered level method of no less than three levels, so as to distinguish the credibility of the automatic judgment result during subsequent review, release or interception.
[0065] Since industrial traceability tools are believed to help improve quality and analysis processes, using such object-level traceability entries enables the establishment of a stable correspondence between automatic identification results and subsequent quality handling.
[0066] In one implementation, the sources of the review markers include, but are not limited to, the following: Firstly, quality inspectors manually review the local image slices corresponding to the traceability items and then write the confirmation results. Secondly, after performing offline rescanning, microscopic inspection, or sampling re-inspection on the corresponding positions of the strip, the confirmation results are written. Third, the actual defect location discovered in subsequent processes is reverse-mapped to the strip coordinates and written into the confirmation result. The verification mark can distinguish at least five states: false alarm, missed alarm, duplicate count, fragmentation, and confirmed correct. Among them, false alarm means that the automatic identification incorrectly outputs a non-defect object as a defect; missed alarm means that the subsequent on-site re-inspection confirms the existence of a defect but the automatic identification does not output the corresponding stable object; duplicate count means that the same actual defect is automatically identified as multiple stable objects; fragmentation means that the same continuous defect is split into multiple short objects and output separately.
[0067] When a false alarm is detected by the verification marker, this embodiment adjusts the reflective mask boundary or increases the connectivity screening conditions of the candidate response map to suppress similar false alarms. Specifically, it can be implemented in the following ways: If false alarms are concentrated in the bright transition area or near the reflective edge, the envelope of the reflective mask boundary is expanded so that such edge transition areas enter the reflective influence domain earlier and are covered by the background brightness surface reconstruction in the preceding steps. If the false alarms are mainly short and isolated response fragments, the connectivity screening conditions in the candidate response map can be improved. For example, the minimum continuous length requirement for the retained fragments can be increased or the local response retention threshold can be increased so that scattered short fragments no longer enter the stable object generation stage. This can suppress reflective false defects and noise false defects separately, without having to raise all the judgment conditions as a whole.
[0068] When the verification flag indicates a missed detection, this embodiment adjusts the texture period range or reduces the minimum continuous length condition of the candidate response map to improve the detection capability of weak defects. Specifically, the following methods can be used: If the missed object is located in a region with strong texture and the residual response is canceled out by the periodic background, the tolerance range of the texture period range for local period deviation is widened so that the residual map after background subtraction retains more weak outlier components. If the missed object is a short, thin, or intermittent extended defect, the minimum continuous length condition of the candidate response map is appropriately reduced so that weak defect segments that were previously screened out due to insufficient length can be retained and enter the cross-frame merging process.
[0069] When the verification mark indicates repeated counting or fragmentation, this embodiment adjusts the strip position overlap threshold and direction deviation threshold in cross-frame matching to optimize the merging threshold. If the same extension defect is repeatedly output as multiple objects in consecutive frames, the allowable range of strip position overlap determination is increased, and the direction deviation threshold between adjacent objects is relaxed, so that multiple objects that are originally slightly misaligned but are actually the same defect can be merged in the cross-frame stage. If an object is fragmented due to a local response break, the continuous envelope range along the rolling direction is further expanded so that short segments can still establish a common origin association with the segments before and after in adjacent frames. Conversely, if the review finds that different defects are incorrectly merged, the above threshold can be tightened to avoid excessive merging of irrelevant objects. Through this error-type-oriented parameter correction, the merging threshold is not fixed, but gradually converges to a value that is more suitable for the current production line status as the review results are obtained.
[0070] After the parameters are updated, this embodiment writes the updated reflective mask boundary, texture period range and merging threshold into the parameter version entry and stores it in association with the traceability entry that triggered this update. The parameter version entry can at least include the parameter version number, effective time, update source type, parameter value before update, parameter value after update and associated defect object number. This can clarify which set of parameters was used for a certain identification result, which is convenient for subsequent tracking of the cause of identification changes. On the other hand, it can prevent parameters from being repeatedly overwritten and unable to be recovered.
[0071] For example, if a batch of strips frequently shows false alarms about reflective edges under the same lighting setting, and the reflective mask boundary is expanded and updated after verification, the new parameter version entry will be bound to the corresponding false alarm traceability entry. If the false alarm is significantly reduced subsequently, the update direction can be confirmed to be effective. If, on the contrary, a real defect is covered, it can be rolled back to the previous parameter version for re-evaluation.
[0072] After the above processing, the stable defect objects not only obtain category and severity labels, but also form a traceability record chain that can be traced back, verified, and iteratively corrected, so as to maintain adaptability under different batches, different surface conditions, and different working conditions.
[0073] It should be noted that the traceability record in the embodiment consists of one or more traceability entries, and the parameter version entry is stored as a parameter change record in the traceability record and associated with the corresponding traceability entry.
[0074] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0075] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0076] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0077] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0078] In conclusion, 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. A method for identifying surface defects in aluminum sheet rolling, characterized in that: The specific steps include: S1. Collect the surface image sequence of the rolling station and simultaneously collect the belt speed, supplementary lighting status and exposure configuration, and generate a monitoring frame sequence by aligning them according to a unified time reference. S2. Statistically determine the high-brightness tail section for each frame's brightness distribution, locate the specular highlight area and the oil film reflection enhancement area to generate a reflective mask, connect and extend along the rolling direction to obtain the reflective influence domain, reconstruct the background brightness surface within the influence domain with neighborhood consistency constraints and replace the reflective component to obtain the reflective correction map. S3. Extract the main direction gradient from the reflection correction map to determine the rolling direction, construct the strip texture response sequence and perform periodic consistency detection to generate a texture reference map, perform background subtraction to obtain the defect residual map, perform structural enhancement and directional continuity constraint on the residual map at different scales to output candidate response maps for extracting connected regions; S4. Extract connected regions from candidate response maps to generate defect object entries, including location, scale, orientation and inter-frame persistence fields. Map strip coordinates according to strip speed and frame number, and associate and merge across frames according to position threshold and morphological compatibility rules to form stable defect objects. S5. Extract morphological and residual stability features from stable defect objects, output defect category and severity, and write them into the traceability record. Adaptively update the reflective mask boundary, texture period range, and merging threshold based on the review conclusion.
2. The surface defect identification method for aluminum plate rolling processing according to claim 1, characterized in that: The monitoring frame sequence generated in S1 according to a unified time base includes: Determine the timestamp of the surface image frame as the alignment key; Within a preset time window, retrieve the belt speed, supplementary lighting status, and exposure configuration that match the timestamp, and write the belt speed field, supplementary lighting status field, and exposure configuration field into the same frame record to form a monitoring frame. The monitoring frame contains at least the frame number, timestamp, surface image frame, belt speed field, supplementary lighting status field, and exposure configuration field. When no matching data is obtained for any operating condition field within a preset time window, the corresponding monitoring frame is marked as an unavailable frame and is skipped in subsequent steps or recorded as a traceability entry separately.
3. The surface defect identification method for aluminum plate rolling processing according to claim 2, characterized in that: The statistical brightness distribution in S2 determines the high-brightness tail region, including: Generate brightness histograms or cumulative distribution curves for surface image frames; In the brightness distribution, determine the brightness range corresponding to the main peak of the background, and determine the starting brightness threshold of the tail based on the attenuation trend of the main peak towards the bright end. Define the brightness range that is not less than the brightness threshold as the bright tail range. High-brightness candidate regions are generated based on the high-brightness tail region to locate the specular highlight area and the oil film reflection enhancement area.
4. The surface defect identification method for aluminum plate rolling according to claim 3, characterized in that: In S2, the high-gloss area of the positioning mirror and the oil film reflection enhancement area generate a reflective mask, which is connected and extended along the rolling direction to obtain the reflective influence domain, including: Extract connected regions within the highlighted candidate regions and generate a set of connected components; Based on the brightness consistency of connected regions, the abrupt boundary gradient characteristics, and the strip continuity along the rolling direction, the reflectivity type of the connected region set is determined. Connected regions that satisfy the specular highlight characteristics are marked as specular highlight regions, and connected regions that satisfy the strip reflection enhancement characteristics are marked as oil film reflection enhancement regions. These are then merged to obtain a reflective mask. Hole repair and fracture connection are performed on the reflective mask, and directional expansion is performed along the rolling direction to cover the reflective overflow edge, thus obtaining the reflective influence domain.
5. The surface defect identification method for aluminum plate rolling according to claim 4, characterized in that: In S2, the background brightness surface is reconstructed within the reflective influence domain using neighborhood consistency constraints, and the reflective component is replaced to obtain the reflective correction map, including: Determine the boundary ring region of the reflective influence area and extract the brightness value of the boundary ring region as the boundary condition; An initial value of the background brightness surface is established within the reflective influence domain. The background brightness surface is iteratively updated while keeping the boundary conditions unchanged, so that the brightness value of each point in the domain satisfies the smooth and continuous constraint that is consistent with the brightness of its neighboring pixels, thus obtaining the reconstructed background brightness surface. The original luminance components within the reflection influence domain are replaced with the reconstructed background luminance surface, while keeping the pixels outside the reflection influence domain unchanged, and a reflection correction map is output.
6. The method for identifying surface defects in aluminum plate rolling as described in claim 1, characterized in that: In S3, extracting the principal direction gradient from the reflection correction map to determine the rolling direction includes: Calculate the gradient magnitude and gradient direction for the reflection correction map, and generate a direction statistics histogram; The dominant direction angle is determined as a candidate rolling direction from the direction statistics histogram; A consistency determination is performed on the candidate rolling directions of adjacent monitoring frames. When the consistency determination is satisfied, the current rolling direction is output. When the consistency determination is not satisfied, the dominant direction angle within the time window is used as the current rolling direction.
7. The surface defect identification method for aluminum plate rolling according to claim 6, characterized in that: In S3, constructing a striped texture response sequence and performing periodic consistency detection to generate a texture baseline map includes: Perform strip projection or row-column convergence operations on the reflective correction image along the rolling direction to obtain the strip texture response sequence; A candidate set of periods is calculated for the strip texture response sequence, and the repetition consistency of each candidate period in adjacent segments is evaluated. Periods whose consistency meets the threshold are selected as the texture period range. A texture reference map is generated based on the texture period range, so that the texture reference map represents the periodic background component of the rolling texture in the rolling direction.
8. The surface defect identification method for aluminum plate rolling according to claim 7, characterized in that: In S3, the residual map is subjected to structural enhancement and directional continuity constraints at different scales, resulting in candidate response maps, including: Linear and point structural responses are extracted from the defect residual map at various scales to form response sets at different scales. Response connectivity filtering is performed on response sets at different scales to retain response segments that meet the minimum continuous length condition in the rolling direction and suppress isolated short segments; The filtered response sets at different scales are mapped to candidate response maps for extracting connected regions.
9. The surface defect identification method for aluminum plate rolling according to claim 8, characterized in that: In S4, connected components are extracted from the candidate response map to generate defect object entries, which are then correlated and merged across frames to form stable defect objects, including: Perform connectivity labeling on the candidate response graph to obtain a set of candidate connected regions; For each candidate connected region, extract its position, scale, orientation, residual peak value, continuous length along the rolling direction, and inter-frame persistence, and write them into the defect object entry; Based on the belt speed and frame number, the defect object entries are mapped to the strip coordinate system to obtain the strip position range of the defect object; Between adjacent monitoring frames, cross-frame matching is performed based on the overlap relationship of the strip position intervals and the direction deviation threshold, and when a match is found, the defect object entries are merged and updated. When multiple defect object entries satisfy the same strip location range and have compatible shapes, they are merged into the same stable defect object and a set of stable defect objects is output.
10. The method for identifying surface defects in aluminum plate rolling according to claim 9, characterized in that: S5 writes traceability records and adaptively updates the reflective mask boundary, texture period range, and merging threshold based on the review conclusion, including: For each stable defect object, generate a traceability entry. The traceability entry should include at least the defect category, severity, strip coordinates, frame number range, confidence flag, and verification flag. When the verification flag indicates a false alarm, adjust the reflective mask boundary or increase the connectivity screening conditions of the candidate response map to suppress similar false alarms; When the verification flag indicates a missed report, adjust the texture period range or reduce the minimum continuous length condition of the candidate response map to improve the detection of weak defects; When the verification flag indicates duplicate counting or fragmentation, adjust the strip position overlap threshold and orientation deviation threshold for cross-frame matching to optimize the merging threshold; Write the updated reflective mask boundary, texture period range, and merging threshold into the parameter version entry and store them in association with the traceback entry.