Image detection method and linear array detector

By acquiring images using a linear array detector and combining contour extraction and historical image analysis, obstructions can be accurately located and removed, solving the problem of surface occlusion on the linear array detector and improving detection efficiency and accuracy.

CN122435580APending Publication Date: 2026-07-21BEIJING HONEST TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING HONEST TECHNOLOGY CO LTD
Filing Date
2026-06-15
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Dust or foreign objects obstructing the surface of linear array detectors result in low image clarity, affecting the accuracy of image acquisition and recognition detection. Existing manual cleaning methods are inefficient and slow.

Method used

The current image is acquired by a linear array detector, the contour is extracted, the contours located at the edge of the image are stored in a temporary list, the target area is determined by combining historical images, and an alarm operation is performed, such as cleaning or software alarm to clear obstructions.

Benefits of technology

Accurately identify and promptly locate obstructions to improve detection efficiency and accuracy, reduce missed and false detections, and achieve automated and efficient cleaning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122435580A_ABST
    Figure CN122435580A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of image detection, and particularly relates to an image detection method and a linear array detector. The image detection method comprises: acquiring a current image by a linear array detector; performing contour extraction based on the current image; storing the contour located at the top or bottom edge in the current image to a temporary list based on the extracted contour; in response to the existence of the contour located at the edge of the current image, determining a target region based on the current image, a historical image and the temporary list; and performing an alarm operation based on the target region. According to the present disclosure, the linear array detector surface can be more accurately and timely identified and positioned to avoid missing reports, false reports and the like, so that the obstruction can be timely and accurately cleaned, the detection efficiency and accuracy of the subsequent detection can be improved, and the positioning and cleaning efficiency of the linear array detector obstruction can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image detection technology, specifically to an image detection method and a linear array detector. Background Technology

[0002] Linear array detectors acquire image information of the detected object by scanning line by line. During operation, the surface of the linear array detector may be obstructed by dust or foreign objects, causing abnormal image scanning. This results in low image clarity or occlusion of image acquisition, affecting image acquisition, increasing the complexity of subsequent image processing, and reducing the accuracy of recognition and detection. Such occlusion requires cleaning. Current manual cleaning methods are prone to missed detections, are inefficient, and are time-consuming, impacting the accuracy and efficiency of linear array detector detection and subsequent recognition. Summary of the Invention

[0003] To overcome the problems existing in related technologies, an exemplary embodiment of this disclosure provides an image detection method in a first aspect for detecting obstructions to a linear array detector. The image detection method includes: acquiring a current image through the linear array detector; extracting contours based on the current image; storing the extracted contours located at the top or bottom edge of the current image to a temporary list; in response to the presence of a contour located at the edge of the current image, determining a target region based on the current image, historical images, and the temporary list, wherein the temporary list stores one or more of the contours from the current image and the historical images, and the target region is the area where the obstruction is located in the image; and performing an alarm operation based on the target region.

[0004] In some embodiments, determining the target region based on the current image, historical images, and the temporary list includes: determining a cross-frame image based on the current image and historical images; and determining the target region based on the cross-frame image and multiple contours in the current image and historical images stored in the temporary list.

[0005] In some embodiments, determining a cross-frame image based on the current image and historical images includes: acquiring one or more historical images prior to the acquisition time of the current image, wherein the acquisition time of the historical images is consecutive to that of the current image; arranging the historical images sequentially according to their acquisition time based on the current image and the historical images; and combining the current image and the historical images to obtain a cross-frame image, wherein the height of the cross-frame image is determined based on the total number of frames of the current image and the historical images.

[0006] In some embodiments, determining a target region based on the cross-frame image and multiple contours in the current image and the historical image stored in the temporary list includes: merging adjacent contours in the temporary list based on the cross-frame image; and determining the target region based on the merged contours and the cross-frame image.

[0007] In some embodiments, determining the target region based on the merged contour and the cross-frame image includes: expanding the merged contour to determine an expanded region; determining the intersection of the expanded region and the cross-frame image; and updating the temporary list based on the intersection to determine the target region.

[0008] In some embodiments, determining the target region based on the merged contours and the cross-frame image further includes: determining the location of each contour based on the cross-frame image; determining the target region based on the cross-frame image in response to the contour intersecting with the top edge of the cross-frame image; and caching the current image as a historical image in response to the contour intersecting with the bottom edge of the cross-frame image, and returning to the step of acquiring the current image through the linear array detector.

[0009] In some embodiments, the step of performing an alarm operation based on the target area includes: determining the center point location of the target area; cleaning the corresponding location of the linear array detector or triggering a software alarm based on the center point location; starting a timer in response to the completion of cleaning or the software alarm, and returning to the step of acquiring the current image through the linear array detector; and clearing the alarm in response to the expiration of the timer and the fact that the target area has not been acquired again.

[0010] In some embodiments, the contour extraction based on the current image further includes: masking the left and right edges of the current image to determine a masked image; performing a morphological opening operation on the masked image to determine a denoised image; and performing contour extraction based on the denoised image.

[0011] In some embodiments, the image detection method further includes: compensating for the grayscale of a material image present in the target region in response to the presence of the target region.

[0012] Secondly, this disclosure also provides a linear array detector for performing the image detection method as described in the first aspect.

[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.

[0014] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: The image detection method provided by this disclosure can more accurately and timely identify and locate obstructions on the surface of a linear array detector, avoiding missed or false alarms, thereby enabling timely and accurate cleaning of obstructions and improving subsequent detection efficiency and accuracy. This disclosure effectively improves the efficiency of locating and cleaning obstructions on linear array detectors. Attached Figure Description

[0015] This disclosure can be better understood by describing exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, in which: Figure 1 This is a flowchart illustrating an image detection method according to exemplary embodiments of the present disclosure; Figure 2 This is a flowchart illustrating an image detection method according to exemplary embodiments of the present disclosure; Figure 3 This is a schematic diagram of the current image shown according to exemplary embodiments of the present disclosure; Figure 4 This is a schematic diagram of the current image shown according to exemplary embodiments of the present disclosure; Figure 5 This is a schematic diagram of a cross-frame image according to exemplary embodiments of the present disclosure; Figure 6 This is a schematic diagram of a cross-frame image according to exemplary embodiments of the present disclosure; Figure 7 This is a schematic diagram of a cross-frame image according to exemplary embodiments of the present disclosure; Figure 8 This is a software alarm view shown according to exemplary embodiments of the present disclosure; Figure 9 These are images directly acquired by a linear array detector, as illustrated in exemplary embodiments of this disclosure. Figure 10 The image is obtained by binarizing the image acquired by the linear array detector as shown in the exemplary embodiments of this disclosure. Figure 11 The image is obtained by processing an image acquired by a linear array detector based on the method provided in this disclosure, as illustrated in an exemplary embodiment of this disclosure. Detailed Implementation

[0016] The following describes specific embodiments of this disclosure. It should be noted that, in order to maintain brevity, this specification cannot provide a detailed description of all features of the actual embodiments. It should be understood that, in the actual implementation of any embodiment, just as in any engineering or design project, various specific decisions are often made to achieve the developer's specific goals and to meet system-related or business-related constraints, and this can change from one embodiment to another. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content of this disclosure, changes in design, manufacturing, or production based on the technical content disclosed herein are merely conventional technical means and should not be construed as insufficient content of this disclosure.

[0017] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. The terms “a” or “one,” etc., do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising,” “including,” etc., mean that the element or object preceding “comprising” or “including” encompasses the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The terms “connected,” “linked,” etc., are not limited to physical or mechanical connections, nor are they limited to direct or indirect connections.

[0018] To address the aforementioned technical problems, this disclosure provides an image detection method for detecting obstructions in a linear array detector, such as... Figure 1 As shown, the image detection method includes the following steps.

[0019] Step S110: Acquire the current image using a linear array detector. First, an image of the material or other target object can be acquired using a linear array detector. Linear array detectors can be used in sorting machines, industrial diagnostics, security inspections, and other fields. Materials can be conveyed via a material conveying device such as a conveyor belt, allowing the linear array detector to scan the material on the surface of the conveying device. If a foreign object obstructs the linear array detector, the obstruction can be recorded in the current image acquired by the linear array detector. Therefore, the current image can be processed to further determine whether an obstruction exists and its location.

[0020] Step S120: Contour extraction is performed based on the current image. The current image acquired by the linear array detector may contain images of multiple materials and occlusions. Therefore, contour extraction can be performed on the current image to extract the contours of all materials and occlusions in the current image. Specifically, bounding boxes can be extracted for each contour in the current image to facilitate subsequent determination of the location of each material or occlusion in the current image based on the bounding boxes. Simultaneously, contours can be filtered using the bounding boxes. Specifically, the bounding boxes corresponding to the acquired contours can be obtained based on the contour extraction. Contours with a width and height both less than 3 pixels can be ignored to eliminate noise effects, effectively reduce data processing volume, and improve efficiency.

[0021] Step S130: Based on the extracted contours, store the contours located at the top or bottom edges of the current image to a temporary list. Further filter the contours based on their location. For example... Figure 3 As shown, images located in the center of the current image and fully displayed can be considered general materials and can be ignored. However, contours located at the top or bottom edges of the image are only partially displayed in the current image. Therefore, they need to be combined with historical images or the next frame to further confirm whether the contour is material or an occlusion. Thus, contours located at the top or bottom edges of the current image can be stored in a temporary list for later extraction for further identification and detection. The temporary list stores information such as contour information and bounding box information.

[0022] In response to the presence of a contour located at the edge of the current image, step S140 is executed to determine the target region based on the current image, historical images, and a temporary list. The temporary list stores one or more contours from the current and historical images, and the target region is the area in the image where the occluding object is located. In the previous step, a contour was detected at the corresponding position of the top or bottom edge of the current image. Therefore, the target region can be determined based on the contour data stored in the current image, historical images, and the temporary list. The target region is the corresponding area location of the occluding object in the current and historical images acquired by the linear array detector. Since the occluding object is continuously present on the surface of the linear array detector, contours may continuously appear at the same position in multiple frames of the current and historical images. Furthermore, since the linear array detector can continuously scan the image of the material on the surface of the conveying device, stitching the images output by the linear array detector can obtain a continuous image that can be used to represent material conveying. If multiple consecutive contours exist in this continuous image, the contour can be considered an occlusion shadow contour caused by the occluding object obstructing the linear array detector, and thus, the contour can be determined as the target contour.

[0023] Step S150: Based on the target area, execute an alarm operation. Since the target area is the continuous long obstruction area in both the historical and current images caused by an obstruction to the linear array detector, its presence indicates the presence of an obstruction affecting image acquisition. Therefore, an alarm operation can be executed based on the target features in the image to alert personnel or cleaning equipment to the location of the obstruction. This facilitates accurate and rapid cleaning of the obstruction on the linear array detector surface, preventing continuous obstruction and ensuring the detector returns to normal image acquisition.

[0024] According to this embodiment, by acquiring the current image through a linear array detector and extracting contours based on the current image, the contours of materials in the image and abnormal contours that may be formed by obstructions can be effectively obtained. Noise contours are filtered out, thereby effectively reducing noise interference and data processing volume, and improving image processing efficiency and detection accuracy. By storing the contours located at the top or bottom edge of the current image to a temporary list and combining them with historical and current images, contours in multiple consecutive frames can be identified. This can distinguish between general material contours and persistent obstruction shadow contours, thereby effectively avoiding misidentification of material contours during the conveying process as obstructions and improving the accuracy and stability of obstruction identification. Furthermore, by determining the target area based on the current image, historical images, and the temporary list, the obstruction position and size information corresponding to the obstruction on the surface of the linear array detector can be located more accurately. This allows for timely alarm operation when an obstruction is detected, enabling workers or cleaning equipment to quickly and accurately clean the obstructed area without manual inspection. This effectively reduces problems such as missed detection of obstructions and delayed cleaning, and has a high level of automation, making the maintenance of the linear array detector more efficient. This will further improve the continuous and stable operation capability of the linear array detector, ensure the quality of image acquisition, and further improve the efficiency and accuracy of subsequent image recognition and detection.

[0025] In some embodiments, such as Figure 2 As shown, step S140 determines the target area based on the current image, historical images, and a temporary list, including the following steps.

[0026] Step S141: Determine the cross-frame image based on the current image and historical images. First, the current image and one or more historical images consecutively acquired at the time of the current image acquisition can be determined, i.e., continuous multi-frame images. These continuous multi-frame images can be arranged and combined sequentially to determine the cross-frame image. The cross-frame image can display multiple material information continuously acquired by the linear array detector within a time period. For materials, after passing through the linear array detector, their information can be displayed as an image in the current or historical images, and it can be recorded in the cross-frame image. For obstructions on the linear array detector, if they continuously obstruct the same position of the detector, they can appear as strip-shaped shadows extending perpendicular to the linear array scanning direction in the current or historical images, and in the cross-frame image, they can cover multiple frames, forming long strip-shaped shadows. Therefore, based on the cross-frame image, it is convenient to determine whether each contour is an obstruction shadow contour formed by the presence of an obstruction in subsequent steps.

[0027] Step S142: Based on the cross-frame image and multiple contours in the current and historical images stored in the temporary list, the target region is determined. Since the contours stored in the temporary list are all located at the top or bottom edges of a single image, these contours are not fully displayed in their respective images. The cross-frame image, however, stitches together the current and historical images sequentially, allowing contours that were originally at the top or bottom edges of the current or historical images to be fully displayed in the cross-frame image. Therefore, based on the cross-frame image and the data stored in the temporary list, the contours of the same material collected from different frames can be merged, resulting in a more complete material contour displayed in the cross-frame image. Furthermore, based on these merged complete material contours, the contours corresponding to the material and the occlusion shadow contours caused by occlusion objects blocking the linear array detector can be distinguished, ultimately determining the target region corresponding to the occlusion object.

[0028] According to this embodiment, constructing a cross-frame image based on the current image and historical images enables the temporal stitching of image information acquired by the linear array detector within a continuous time period, allowing contour information originally scattered across different frames to be displayed continuously in the cross-frame image. By combining contours located at the top or bottom edges of the image stored in a temporary list, adjacent or overlapping contours in the cross-frame image are merged, effectively restoring complete contours truncated by single-frame images, reducing misjudgments or omissions caused by image edge truncation, and improving the completeness and accuracy of contour recognition. Furthermore, since obstructions persist on the surface of the linear array detector, their corresponding shadow contours can form continuously extending elongated regions in cross-frame images. Therefore, by analyzing and merging continuous contours in cross-frame images, it is possible to effectively distinguish between the contours formed by normally transported materials and the shadow contours caused by obstructions. This allows for more accurate determination of the target area corresponding to the obstruction, improving the reliability and stability of obstruction identification and positioning. It also provides accurate data support for subsequent alarms and automatic cleaning, effectively reducing issues such as missed detection of obstructions and delayed cleaning processes. It has a high level of automation, thereby improving the continuity of image acquisition by the linear array detector and the efficiency and accuracy of subsequent image recognition and detection.

[0029] In some embodiments, step S141, determining cross-frame images based on the current image and historical images, may include the following steps.

[0030] Step a1: Acquire one or more historical images acquired before the current image acquisition time, wherein the acquisition time of the historical images is continuous with that of the current image. First, a long bounding box can be constructed, with a width equal to the width of the current image and a height that is an integer multiple of the current image's height. The required number of historical images can be predetermined based on needs, thereby further determining the height of the long bounding box. Specifically, the number of historical images can be determined based on information such as the material conveying speed, image frame height, and preset detection length.

[0031] Step a2: Based on the current image and historical images, arrange them sequentially according to the acquisition time. For example... Figure 4 , Figure 5 As shown, the current image and historical images can be arranged sequentially according to the acquisition time. Using the top edge of the current image as a reference, i.e. the absolute index of the current frame, one or more historical images adjacent to the acquisition time of the current image are arranged sequentially above the current image.

[0032] Step a3: Combine the current image and historical images to obtain a cross-frame image. The height of the cross-frame image is determined by the total number of frames in the current and historical images. Based on the current and historical images arranged chronologically, both the current and historical images are contained within a long bounding box. Combining the current and historical images yields the cross-frame image. The height of the cross-frame image is the height of the long bounding box, which is an integer multiple of the height of the current image. Its specific value is determined by the total number of current and historical images, i.e., the total number of frames. Since the current and historical images are images acquired by the linear array detector within multiple consecutive moments, the cross-frame image, after image combination, can display the status of the material on the material conveying device within multiple consecutive moments. However, for obstructions on the linear array detector, because they are attached to the surface of the linear array detector and obstruct the same position for a long time, such as… Figure 5 As shown, the occluder can be displayed as a long strip outline on a multi-frame image, spanning multiple frames. Furthermore, the outline of the occluder on the multi-frame image can overlap with the upper and lower edges of the multi-frame image. Therefore, based on the multi-frame image, further image recognition and analysis can be performed to distinguish the outline of the material from the occlusion shadow outline caused by the occluder.

[0033] According to this embodiment, by acquiring one or more historical images consecutive to the current image acquisition time, and arranging and integrating them into a cross-frame image according to the acquisition time sequence, continuous images of the material conveying process can be obtained, improving the continuity and completeness of subsequent image analysis. Since obstructions attached to the surface of the linear array detector continuously block the same location, their corresponding occlusion shadow contours can form continuous elongated regions spanning multiple frames in the cross-frame image, continuously overlapping with the top or bottom edges of the cross-frame image. This makes them more clearly distinguishable from the material contours moving with the material conveying device. Based on this cross-frame image, the continuously existing occlusion shadow contours can be more accurately identified during subsequent image recognition and analysis, reducing misjudgments caused by material movement, improving the accuracy and stability of obstruction detection and positioning, and thus facilitating timely alarm and clearing of obstructions on the surface of the linear array detector, improving the image acquisition quality of the linear array detector and the efficiency and accuracy of subsequent recognition and detection.

[0034] In some embodiments, step S142, determining the target region based on cross-frame images and multiple contours in the current and historical images stored in a temporary list, includes the following steps.

[0035] Step b1, based on the cross-frame image, merge adjacent contours in the temporary list. For example... Figure 5As shown, contours or their bounding boxes stored in a temporary list can be displayed across frames. Adjacent or overlapping contours or bounding boxes in the temporary list can be grouped together, thus enabling the display of such contours or bounding boxes across frames. Figure 5 The contours acquired across multiple frames are merged to obtain a complete contour. Similarly, the locations corresponding to obstructions acquired by the linear array detector can also be merged to form elongated contour regions.

[0036] Step b2: Determine the target region based on the merged contours and the cross-frame images. Since the merged contours can be fully displayed in the cross-frame images, they can be further classified and identified based on their shape features, length features, and distribution positions in the cross-frame images. Specifically, for material contours moving with the material conveying device, their positions in the cross-frame images typically change over time, and their shapes are relatively discrete, not continuously covering the same position in the cross-frame images. However, for occlusion shadow contours formed by obstructions, since the obstructions are continuously attached to the surface of the linear detector, their corresponding contours can extend continuously in the cross-frame images along the scanning direction, forming continuous elongated regions. Therefore, the material contours and obstruction contours can be distinguished based on their continuous coverage length and positional discreteness in the cross-frame images, thereby determining the target region corresponding to the obstruction.

[0037] According to this embodiment, by merging adjacent contours in the temporary list across frames, complete contour information scattered across different frame images can be combined, reducing the difficulty in identification and differentiation due to contour loss caused by image truncation in different frames, and improving the integrity of the contours and the accuracy and stability of identification. Simultaneously, by analyzing the merged contours in conjunction with cross-frame images, it is possible to distinguish between material contours moving with the material conveying device and elongated shadow contours formed by continuous obstruction of the linear array detector by obstructions, reducing false detections and missed detections of obstructions. Furthermore, by determining the target area from continuous contour regions that meet the conditions, the obstruction position of the obstruction on the surface of the linear array detector can be located more accurately, providing support for subsequent alarm prompts and cleaning, thereby improving the timeliness and accuracy of obstruction detection and processing, ensuring the stability of image acquisition by the linear array detector, and improving the efficiency and accuracy of subsequent image recognition and detection.

[0038] In some embodiments, step b2, determining the target region based on the merged contour and cross-frame images, may include the following steps.

[0039] Step b21: Expand the merged contours and determine the expanded area. Based on the merged contours, the bounding boxes of all contours in the temporary list can be further merged to form a large bounding rectangle, i.e. Figure 6The gray outline shown is used to facilitate the subsequent differentiation of the target area corresponding to the occluded object from other contour areas. Based on this bounding rectangle, its boundary can be further expanded to determine the extended area. Therefore, the four sides of the aforementioned bounding rectangle can be extended outwards by a certain number of pixels to ensure that the expanded area includes all contours in the temporary list. Specifically, the number of pixels extended outwards can be greater than or equal to 5 and less than or equal to 15. Figure 6 As shown, the boundary of the above-mentioned outer rectangle can be extended outward by 10 pixels to obtain the extended area.

[0040] Step b22, determine the intersection of the extended region and the cross-frame image. For example... Figure 7 As shown, the gray box outside the circumscribed rectangle represents the expansion boundary of the extended region. The intersection of the extended region and the cross-frame image can be used to obtain the following... Figure 7 The intersection region shown can be used as the region of interest in image processing, thus eliminating the need to identify data from other parts of the image across frames. This effectively reduces the amount of data processing, improves the efficiency of image recognition and analysis, reduces energy consumption and time in image recognition and analysis, and effectively improves efficiency while ensuring accuracy, saving operating costs.

[0041] Step b23: Update the temporary list based on the intersection and determine the target region. Based on the intersection of the extended region and the cross-frame image, a temporary binary image of the same size is first created, with each pixel value assigned 0. Then, all contours from the original temporary list are drawn onto the temporary binary image using a white fill mode. Finally, contour extraction is performed again based on the temporary binary image, covering the original temporary list, and the temporary list is updated based on the contour extraction results. This step allows multiple contours that were originally discontinuous, overlapping, or had discontinuous edges to be reintegrated into continuous and complete contours, facilitating the subsequent differentiation between material contours and occluder contours. Furthermore, the updated temporary list can be used to filter and differentiate the contours within it, ultimately determining the target region and improving the accuracy of occlusion detection and localization.

[0042] According to this embodiment, by constructing a bounding rectangle for the merged contours and expanding it, it is possible to effectively cover areas where contour edges may be missing, avoiding inaccurate target region identification due to incomplete local contours, and improving the completeness and robustness of target region detection. Simultaneously, by extracting the intersection of the expanded region and the cross-frame image as the region of interest, the amount of data processing for irrelevant regions can be reduced, lowering computational resource consumption during image recognition and analysis, and improving image processing efficiency. Furthermore, by constructing a temporary binary image and re-extracting the contours, the original contours can be fused and optimized, avoiding incomplete or unclear contours, improving the accuracy and stability of contour recognition, thereby more accurately determining the target region corresponding to the occluded object, improving the accuracy and timeliness of occlusion location and alarm, and ultimately ensuring the stability of the linear array detector image acquisition and the efficiency and accuracy of subsequent recognition and detection.

[0043] In some embodiments, step b2, which determines the target region based on the merged contour and cross-frame images, further includes the following steps.

[0044] Step b24: Determine the location of each contour based on the cross-frame image. First, the location of contours in the image can be determined based on the cross-frame image. Specifically, the location of contours can be determined only within the region of interest to reduce the amount of data processing and analysis. For contours whose complete cross-frame image contours are located within the region of interest, it can be determined that they must be the contours corresponding to the material, and no further processing is required; they can be ignored without additional operations.

[0045] Step b25, in response to the contour intersecting with the top edge of the cross-frame image, determines the target region based on the cross-frame image. For example... Figure 7 As shown, when a contour is located at the top of a multi-frame image and intersects with the top edge of the multi-frame image, it can be assumed that the contour persists across multiple frames and maintains a consistent position. Therefore, it can be considered that the contour may be caused by an occlusion. In this case, based on the multi-frame image, the corresponding region of interest can be determined and directly identified as the target region, or the region of interest can be further identified to more accurately determine the target region.

[0046] Step b26, in response to the contour intersecting with the bottom edge of the cross-frame image, cache the current image as a historical image and return to execute the acquisition of the current image through the linear array detector. For example... Figure 7As shown, for contours located at the bottom of a cross-frame image and intersecting with the bottom edge of the cross-frame image, it can be assumed that a complete image of the material corresponding to the contour has not been captured in the current cross-frame image. Therefore, the current image can be cached as a historical image, and the contour can be cached synchronously for processing in the next round of image acquisition and recognition. For contours that intersect with both the top and bottom edges of the cross-frame image, it can be preferentially determined that the contour is generated due to the presence of occlusions, and it can be identified as the target region.

[0047] According to this embodiment, the location of each contour is determined based on cross-frame images, and classification is performed by combining the intersection relationship between the contour and the top or bottom edge of the cross-frame image. This effectively improves the targeting and accuracy of the occlusion recognition process. For contours that are completely located within the region of interest and do not intersect with the edge of the cross-frame image, they can be directly identified as normal material contours and ignored, thereby avoiding repeated analysis of normal materials, reducing the amount of invalid data processing, and improving the efficiency of image recognition and analysis. For contours that intersect with the top edge of the cross-frame image, since their positions remain relatively stable in multiple consecutive frames, they can be more accurately identified as persistent abnormal occlusion shadow contours. Thus, the target region can be quickly determined, improving the timeliness and reliability of occlusion detection. For contours that intersect with the bottom edge of the cross-frame image, by caching the current image and the corresponding contour as historical images and continuing analysis in subsequent image processing, misjudgments or omissions caused by incomplete contour display in the current cross-frame image can be avoided, improving the accuracy and stability of contour recognition. This allows for a more accurate distinction between the contours formed by materials and obstructions in the image, effectively avoiding misjudgments and missed detections, and significantly improving the accuracy of obstruction detection and localization. Furthermore, it effectively ensures the stability of image acquisition by the linear array detector and the accuracy and efficiency of subsequent image recognition and detection.

[0048] In some embodiments, step S150, which involves performing an alarm operation based on a target area, may include the following steps.

[0049] Based on the target region, the center point of the target region is determined. First, features of the target region can be acquired, specifically, the center point of the target region can be determined. Additionally, other target features can be extracted based on the target region. These target features can be characteristics representing the position or size of the target region in the image, such as the area, perimeter, and centroid position of the target region. Specifically, the outline position and size of the linear array detector obstructed by occlusion objects in historical and / or current images can be used as target features. By determining the center point of the target region, the location of any obstructions on the surface of the linear array detector corresponding to the target region can be quickly and accurately pinpointed.

[0050] Based on the center point location, the corresponding area of ​​the linear array detector is cleaned or a software alarm is triggered. According to the center point location, the area on the surface of the linear array detector corresponding to that center point can be determined. A cleaning device automatically cleans the surface of the linear array detector corresponding to that center point location to remove dust, impurities, and other obstructions, preventing them from continuously affecting the image acquisition quality and subsequent detection and recognition accuracy. Furthermore, a software alarm can also be triggered when a target area is detected, such as... Figure 8 As shown, the user-end software of the linear array detector can display an alarm prompt. When the software alarms, it can simultaneously provide information about the corresponding location in the linear array detector, so that the user can promptly locate the location of the obstruction and carry out subsequent maintenance and cleaning.

[0051] In response to the completion of cleaning or an alarm triggered by the software, a timer is started, and the process returns to acquire the current image through the linear array detector. When the cleaning equipment finishes cleaning or an alarm is triggered by the software, a timer can be started. Within the timer's duration, the process normally returns to step S110 to continue acquiring images through the linear array detector for identification. When the timer expires, it can be determined whether a target area is still detected to further determine if the linear array detector is still obstructed. Specifically, a five-minute timer can be set. Within the time recorded by the timer, if the operations described in steps S110 to S150 are executed repeatedly, but a target area is still detected, it can be assumed that the obstruction has not been cleared, and an alarm can continue to be triggered. Simultaneously, in this situation, the user can be further prompted to perform maintenance to avoid incomplete image acquisition due to a faulty linear array detector affecting subsequent image acquisition and identification processes.

[0052] If the timer expires and the target area is not detected again, the alarm is cleared. After the timer is started, steps S110 to S150 can be executed repeatedly. If the target area is not detected again after the timer expires, it can be determined that the obstruction corresponding to the target area has been cleared, and therefore the alarm can be cleared.

[0053] According to this embodiment, by determining the center point and other target features of the target area, the specific location of obstructions on the surface of the linear array detector can be more accurately located, thereby improving the accuracy and efficiency of obstruction location. Specifically, by extracting feature information such as the center point, area, perimeter, and centroid of the target area, the distribution of obstructions in the linear array detector image can be more comprehensively characterized, providing accurate data support for subsequent cleaning control and alarm processing. Furthermore, performing automatic cleaning operations on the corresponding area of ​​the linear array detector based on the center point location enables the cleaning equipment to precisely target obstructed areas, reducing invalid cleaning areas, improving obstruction removal efficiency, and mitigating image quality degradation caused by the continued presence of obstructions. Simultaneously, providing alarm prompts and corresponding location information to the user terminal via software alarms helps users quickly locate obstructed areas, enabling timely manual inspection and maintenance, and improving equipment reliability and maintenance efficiency. After cleaning is completed or a software alarm is triggered, a timer is started, and image acquisition and target area detection are continuously performed within the timer's duration. This allows for continuous tracking and verification of the status after obstruction removal, preventing premature alarm termination due to incomplete obstruction removal and improving the completeness and reliability of the obstruction detection and handling process. When a target area is continuously detected within the timer period, an alarm is triggered again to further prompt the user for maintenance, effectively preventing image acquisition abnormalities caused by linear array detector malfunctions or persistent obstructions from affecting subsequent detection and recognition processes. Furthermore, if no target area is detected again after the timer expires, the alarm is automatically cleared, preventing long-term false alarms from interfering with system operation and user experience, and improving the intelligence and accuracy of the alarm mechanism. Through these methods, automatic detection, precise location, timely cleaning, and continuous status monitoring of linear array detector obstruction problems can be achieved, improving the stability and continuity of linear array detector image acquisition and further enhancing the accuracy and efficiency of subsequent image recognition and detection.

[0054] In some embodiments, step S120, which involves contour extraction based on the current image, may further include the following steps.

[0055] To determine the masked image, first shield the left and right edges of the current image. Since linear array detectors capture materials transported on the surface of conveyor belts or other material handling devices, there may be obstructions or other structures on both sides of the conveyor belt in the width direction. These structures, when captured by the linear array detector, may produce elongated shadows similar to those caused by impurities. Therefore, to reduce the impact on the linear array detector, the left and right edges of the current image can be shielded first, thus determining the masked image.

[0056] Morphological opening operations are performed on the masked image to determine the denoised image. Morphological opening operations can be used to eliminate noise in the masked image by first eroding the image and then performing dilation. Based on the masked image, the minimum size parameter of the masked image is first determined, and then the rectangular structuring element for the morphological opening operation is further determined based on the minimum size parameter. Specifically, when the minimum size parameter is greater than 5 and less than or equal to 10, a 3×3 rectangular structuring element can be used for morphological opening noise reduction. When the minimum size parameter is greater than 10, a 5×5 rectangular structuring element can be used for morphological opening noise reduction. Specifically, as... Figure 9 The image shown is the result of direct acquisition based on a linear array detector. Figure 10 This refers to the image effect obtained after binarization, and such as Figure 11 The image obtained after processing according to this embodiment shows that the method provided in this embodiment can effectively improve the clarity of the image.

[0057] Contour extraction is performed on the denoised image. Based on the denoised image obtained after morphological opening operations, contour extraction algorithms are used to extract contours, which can extract more accurate and clear contour information.

[0058] According to this embodiment, by masking the left and right edges of the current image, the interference of elongated shadows formed by the side barriers, frame structures, or fixed components of the conveying device during the linear array detector acquisition process can be effectively reduced, thereby avoiding misidentification of edge structures as occlusions and improving the accuracy and stability of occlusion detection. Furthermore, by performing morphological opening operations on the masked image, using a combination of erosion and dilation to remove discrete noise and small interference areas, the smoothness and clarity of the image can be effectively improved. Specifically, by adaptively selecting rectangular structural elements of different sizes for noise reduction based on the minimum size parameter of the masked image, the noise removal effect can be improved while preserving detail information, thereby enhancing the adaptability and robustness of image processing in different scenarios. Through the above processing, false contours, fragmented regions, and random noise in the image can be effectively reduced, improving the completeness and accuracy of subsequent contour extraction results. Furthermore, performing contour extraction based on denoised images can obtain clearer, more continuous, and more accurate contour information, improve the ability to distinguish material contours and occlusion shadow contours, reduce false detections and missed detections, thereby improving the accuracy and efficiency of occlusion identification, positioning, and subsequent alarm clearing, and further ensuring the image acquisition quality of the linear array detector and the stability and accuracy of subsequent image recognition and detection.

[0059] In some embodiments, the image detection method may further include: compensating for the grayscale of the material image present in the target area in response to the presence of a target area. When the existence of a target area is determined, the grayscale of the image corresponding to the material falling into the target area may change, which may lead to errors in the identification and sorting of the material. Therefore, grayscale compensation can be performed on the image corresponding to the material present in the target area to correct the grayscale of the material image and ensure the accuracy of material identification. In addition, when the linear array detector is used in equipment such as sorting machines, it can simultaneously perform material identification and detection as well as the detection and removal of obstructions, which can reduce the frequency of downtime maintenance, ensure work efficiency, and effectively ensure the accuracy of material identification and sorting based on the images acquired by the linear array detector. Furthermore, based on the intersection of the target area and the material contour, for material images that partially fall into the target area, only the portion of the material image that does not fall into the target area can be detected, ensuring the accuracy of material identification.

[0060] According to this embodiment, when a target area is detected, grayscale compensation is performed on the material image within the target area. This effectively corrects image grayscale anomalies caused by obstructions blocking the linear array detector, preventing the material image from being affected by local darkening, grayscale distortion, or shadow coverage, thus improving the accuracy of material identification and classification. Furthermore, by performing grayscale restoration processing on the material image within the target area, interference from obstruction shadows on material edge features, texture features, and grayscale feature extraction processes can be reduced, thereby ensuring the stability and reliability of detection and analysis based on images acquired by the linear array detector. Simultaneously, during the operation of equipment such as sorting machines, obstruction detection, alarm clearing, and image grayscale compensation can be completed online, eliminating the need for frequent downtime maintenance. This reduces the frequency of equipment downtime for repairs, improves the continuous operation capability of the equipment, and enhances overall work efficiency. Furthermore, by focusing on the intersection between the target area and the material outline, only the portion of the material image that does not fall within the target area is identified and analyzed. This allows for the preservation of valid material features even in cases of partial occlusion, preventing overall material recognition failure due to local shadow areas and improving the fault tolerance and accuracy of material detection and recognition in partially occluded scenarios. Through this approach, the stability of material image acquisition and recognition by the linear array detector can be ensured while simultaneously detecting and processing occluded objects, thereby improving the accuracy and efficiency of subsequent material detection, recognition, and sorting processes.

[0061] Based on the same inventive concept, this disclosure also provides a linear array detector for performing the image detection method as described in any of the foregoing embodiments. The linear array detector may include an image acquisition module, an image processing module, a contour extraction module, a target region recognition module, and an alarm control module. Specifically, the image acquisition module is used to acquire material images on a conveyor belt or other material conveying device in real time; the image processing module is used to perform noise reduction, edge masking, and cross-frame image construction on the acquired current image; the contour extraction module is used to extract material contours and abnormal contours based on the processed image; the target region recognition module is used to identify and locate the target region corresponding to the occluded object by combining historical images, cross-frame images, and a temporary list; and the alarm control module is used to perform alarm, automatic cleaning control, and status monitoring operations after detecting the target region. Furthermore, the linear array detector may also include a storage module for caching historical images, contour data, and target region-related feature information to support continuous image analysis and target region tracking and recognition.

[0062] The linear array detector provided in this embodiment integrates the processing steps of the above-mentioned image detection method, enabling real-time detection of dust, foreign objects, or other obstructions on its surface during operation. It accurately identifies and locates obstructed areas, improving the timeliness and accuracy of obstruction detection. Furthermore, by performing cross-frame analysis and contour merging on continuous images, it effectively distinguishes between normal material contours and persistent shadow contours formed by obstructions, reducing false alarms and missed alarms and improving the stability and reliability of target area identification. Simultaneously, through automatic alarm, automatic cleaning, and grayscale compensation functions, obstruction issues can be addressed promptly while ensuring continuous operation of the linear array detector, reducing the frequency of manual inspections and downtime maintenance, and improving the continuous operation capability and work efficiency of the equipment. In addition, by compensating and optimizing the image within the target area, the accuracy of material identification, detection, and sorting processes can be guaranteed, reducing the impact of obstruction on subsequent image analysis and recognition results, thereby improving the overall image acquisition quality of the linear array detector and the accuracy and stability of the subsequent identification and detection system.

[0063] This disclosure uses specific terms to describe embodiments of the present disclosure. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the present disclosure. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, certain features, structures, or characteristics in one or more embodiments of the present disclosure can be appropriately combined.

[0064] In the context of this disclosure, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of expressly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0065] Similarly, it should be noted that, in order to simplify the description of this disclosure and thus aid in the understanding of one or more embodiments, the foregoing description of embodiments of this disclosure may sometimes combine multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of this disclosure requires more features than the features claimed. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.

[0066] The basic concepts have been described above. It is obvious that the above disclosure is merely illustrative and does not constitute a limitation of this disclosure. Although not explicitly stated herein, various modifications, improvements, and corrections may be made to this disclosure by those skilled in the art. Such modifications, improvements, and corrections are suggested in this disclosure and therefore remain within the spirit and scope of the embodiments of this disclosure.

Claims

1. An image detection method for detecting obstructions in a linear array detector, characterized in that, The image detection method includes: The current image is acquired through the linear array detector; Based on the current image, contour extraction is performed; Based on the extracted contours, the contours located at the top or bottom edges of the current image are stored in a temporary list; In response to the presence of the contour located at the edge of the current image, a target region is determined based on the current image, historical images, and the temporary list, wherein the temporary list stores one or more of the contours from the current image and the historical images, and the target region is the area in the image where the occluder is located; Based on the target area, execute an alarm operation.

2. The image detection method according to claim 1, characterized in that, The process of determining the target region based on the current image, historical images, and the temporary list includes: Based on the current image and historical images, determine the cross-frame image; The target region is determined based on the cross-frame image and the multiple contours in the current image and the historical image stored in the temporary list.

3. The image detection method according to claim 2, characterized in that, The process of determining cross-frame images based on the current image and historical images includes: Acquire one or more historical images prior to the current image acquisition time, wherein the historical images are acquired consecutively with the current image. Based on the current image and the historical images, they are arranged sequentially according to the acquisition time; The current image and the historical image are combined to obtain a cross-frame image, wherein the height of the cross-frame image is determined according to the total number of frames of the current image and the historical image.

4. The image detection method according to claim 2, characterized in that, The step of determining the target region based on the cross-frame image and multiple contours in the current image and the historical images stored in the temporary list includes: Based on the cross-frame image, adjacent contours in the temporary list are merged; The target region is determined based on the merged contour and the cross-frame image.

5. The image detection method according to claim 4, characterized in that, The determination of the target region based on the merged contour and the cross-frame image includes: Expand the merged contour to determine the expanded region; Determine the intersection of the extended region and the cross-frame image; Based on the intersection, the temporary list is updated to determine the target region.

6. The image detection method according to claim 4, characterized in that, The step of determining the target region based on the merged contour and the cross-frame image further includes: Based on the cross-frame image, determine the location of each contour; In response to the intersection of the contour with the top edge of the cross-frame image, the target region is determined based on the cross-frame image; In response to the intersection of the contour with the bottom edge of the cross-frame image, the current image is cached as a historical image, and the process of acquiring the current image through the linear array detector is returned.

7. The image detection method according to claim 1, characterized in that, The step of performing an alarm operation based on the target area includes: Based on the target area, determine the location of the center point of the target area; Based on the location of the center point, the corresponding position of the linear array detector is cleaned or a software alarm is triggered. In response to the end of cleaning or an alarm being triggered by the software, a timer is started, and the process returns to the step of acquiring the current image through the linear array detector. If the timer expires and the target area is not detected again, the alarm is cleared.

8. The image detection method according to claim 1, characterized in that, The contour extraction based on the current image further includes: Hides the left and right edges of the current image to determine the masked image; The masked image is subjected to morphological opening operation to determine the denoised image; Contour extraction is performed based on the denoised image.

9. The image detection method according to claim 1, characterized in that, The image detection method further includes: In response to the existence of the target region, the grayscale of the material image within the target region is compensated.

10. A linear array detector, characterized in that, Used to perform the image detection method as described in any one of claims 1-9.