Black film offset detection method, device and equipment and readable storage medium

By performing feature filtering and channel analysis on the image, the accuracy problem of black film shift detection was solved, and efficient and accurate detection of black film shift was achieved.

CN121010537APending Publication Date: 2025-11-25HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410646923.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

The accuracy of black film offset detection in existing technologies is low, especially when the black film coverage on Mylar film is incomplete.

Method used

By performing feature filtering on the image to be detected, the metal border region is determined. The R, G, and B channels of the image are extracted and thresholded, and combined with Blob analysis, the initial region of the black film and its boundary contrast information are determined to determine whether the black film is offset.

Benefits of technology

It improves the accuracy of black film offset detection, reduces the influence of subjective human factors, enhances image boundary contrast information, and ensures the accuracy of blue film leakage information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121010537A_ABST
    Figure CN121010537A_ABST
Patent Text Reader

Abstract

The invention discloses a black film offset detection method, device and equipment and a readable storage medium, and is applied to the technical field of data processing, and the method comprises the steps: carrying out the feature screening of a to-be-detected image, and obtaining a metal frame region; determining a black film initial area according to the metal frame area; performing channel extraction on the initial area of the black film, and determining R, G and B of the image; and performing threshold segmentation and Blob analysis processing on the channel of the initial area of the black film, determining a target image, determining blue film information according to boundary contrast information in the target image, and determining whether the black film deviates or not according to the blue film information. Compared with a current method for detecting whether the black film is deviated or not by adopting a manual visual inspection mode, the method has the advantages that channel extraction is carried out on the initial area of the black film, boundary contrast information of the image is enhanced according to channel information, blue film leakage information is determined more accurately, and therefore the accuracy of black film deviation determination is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and readable storage medium for detecting black film offset. Background Technology

[0002] In metal products, Mylar Film Sheet (PET film), a robust and durable film, possesses an unusual balance of properties. Mylar molds have many excellent properties, one of the most prominent being their good insulation characteristics. To prevent damage to the Mylar film during assembly and transportation, a black film is often applied to protect the mold. In practice, during the product manufacturing process, it's necessary to inspect whether the black film completely covers the Mylar film. Factories typically use manual visual inspection, but the accuracy and consistency of visual inspection are easily affected by subjective factors. Furthermore, threshold testing methods are susceptible to uneven imaging, especially for products where a small portion of the blue film (Mylar mold) is exposed, as its color is very similar to the black film, making current methods difficult to handle.

[0003] Therefore, current methods for detecting black film shifts suffer from low accuracy. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a black film offset detection method, apparatus, device and readable storage medium, which solves the technical problem of low accuracy of black film offset detection in the prior art.

[0005] To solve the above-mentioned technical problems, the present invention provides a black film offset detection method, comprising:

[0006] Feature filtering is performed on the image to be detected to obtain the metal border region;

[0007] The initial area of ​​the black film is determined based on the metal frame area;

[0008] Channel extraction is performed on the initial region of the black film to determine the R, G, and B of the image;

[0009] Threshold segmentation and Blob analysis are performed on the channels of the initial region of the black film to determine the target image. The blue film information is determined based on the boundary contrast information in the target image, and the black film is determined to be offset based on the blue film information.

[0010] Optionally, the step of performing feature filtering on the image to be detected to obtain the metal border region includes:

[0011] The image to be detected is preprocessed to obtain a preprocessed image; wherein, the preprocessing is a process of reducing noise in the image;

[0012] The preprocessed image is subjected to feature filtering to obtain the metal border region.

[0013] Optionally, the step of performing channel extraction on the initial region of the black film to determine the R, G, and B of the image includes:

[0014] The initial region of the black film is cropped using the preprocessed image to obtain the precise region of the black film;

[0015] Channel extraction is performed on the precise region of the black film to determine the R, G, and B of the image.

[0016] Optionally, determining the initial region of the black film based on the metal frame region includes:

[0017] Determine the minimum bounding rectangle of the metal frame region, and subtract the minimum bounding rectangle from the metal frame region to obtain the initial region of the black film.

[0018] Optionally, the step of performing threshold segmentation and Blob analysis on the channels of the initial region of the black film to determine the target image, and determining the blue film information based on the boundary contrast information in the target image, and determining whether the black film is offset based on the blue film information, includes:

[0019] Convert the R, G, and B values ​​of the image into an HSL channel image or an HSV channel image;

[0020] Blob analysis is performed on the B channel of the R, G, and B in the image to determine the black base film region and the first blue film region;

[0021] Blob analysis is performed on the S channel of the HSL channel image to determine the second blue film region; wherein the size of the second blue film region is less than or equal to the size of the second blue film region.

[0022] Perform a union operation on the areas of the first blue film region and the second blue film region to obtain the total blue film region;

[0023] Whether the black film completely covers the blue film is determined by whether the total area of ​​the blue film is empty.

[0024] Optionally, after determining the black film offset based on the blue film information, the method further includes:

[0025] Determine the black film boundary of the black film region, perform straight line fitting on the black film boundary, and obtain the straight line fitting information of the edge;

[0026] Determine the target distance from the pixel origin to the line fitting information, multiply the target distance by the corresponding pixel precision to convert it to the corresponding coordinates, and output the corresponding detection result; wherein, the detection result is the offset value of the black film.

[0027] This application also provides a black film offset detection device, including:

[0028] The metal border region filtering module is used to filter features in the image to be detected to obtain the metal border region.

[0029] The initial region determination module for black film is used to determine the initial region of black film based on the metal frame region.

[0030] The channel extraction module is used to extract channels from the initial region of the black film to determine the R, G, and B of the image.

[0031] The black film offset determination module is used to perform threshold segmentation and Blob analysis processing on the channels of the initial region of the black film to determine the target image, and to determine the blue film information based on the boundary contrast information in the target image, and to determine whether the black film is offset based on the blue film information.

[0032] Optionally, the metal border area filtering module includes:

[0033] A preprocessing unit is used to preprocess the image to be detected to obtain a preprocessed image; wherein the preprocessing is a process of reducing noise in the image;

[0034] The metal border region filtering unit is used to perform feature filtering on the preprocessed image to obtain the metal border region.

[0035] This application also provides a black film offset detection device, including:

[0036] Memory, used to store computer programs;

[0037] A processor is used to implement the black film offset detection method as described above when executing the computer program.

[0038] This application also provides a readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the black film offset detection method described above.

[0039] As can be seen, this invention obtains the metal border region by feature filtering of the image to be detected; determines the initial region of the black film based on the metal border region; extracts channels from the initial region of the black film to determine the R, G, and B of the image; performs threshold segmentation and Blob analysis on the channels of the initial region of the black film to determine the target image; and determines the blue film information based on the boundary contrast information in the target image, and determines whether the black film is shifted based on the blue film information. Compared with the current method of manually visually inspecting to determine whether the black film is shifted, this application enhances the boundary contrast information of the image by performing channel analysis on the initial region of the black film, thereby making the leakage information of the blue film more accurate, and thus improving the accuracy of the determination of the black film shift.

[0040] In addition, the present invention also provides a black film offset detection device, equipment and readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0042] Figure 1 A flowchart of a black film offset detection method provided in an embodiment of the present invention;

[0043] Figure 2 A flowchart illustrating a black film offset detection method provided in an embodiment of the present invention;

[0044] Figure 3 This is a schematic diagram of the structure of a black film offset detection device provided in an embodiment of the present invention;

[0045] Figure 4 This is a schematic diagram of the structure of a black film offset detection device provided in an embodiment of the present invention. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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.

[0047] Mylar film sheet (PET film) is a robust and durable film with an unusual balance of properties. Mylar film (blue film) possesses many excellent properties, one of the most prominent being its good insulation characteristics. To prevent damage to the Mylar film during assembly and transportation, a black backing film is often applied to protect the film. In practice, during the product manufacturing process, it's necessary to inspect whether the backing film completely covers the Mylar film. Factories typically use manual visual inspection, but the accuracy and consistency of visual inspection are easily affected by subjective human factors.

[0048] Please refer to Figure 1 , Figure 1 A flowchart illustrating a black film offset detection method provided in an embodiment of the present invention. The method may include:

[0049] S101, Feature filtering is performed on the image to be detected to obtain the metal border region.

[0050] This embodiment does not limit the specific process of feature selection for the image to be detected. For example, the image to be detected can be preprocessed to reduce noise interference, and then feature selection can be performed on the preprocessed image to locate the border and determine the metal border region. Alternatively, this embodiment can directly perform feature selection on the image to be detected to determine the metal border region. In this embodiment, feature selection refers to selecting border features in the image to be detected to locate the metal border.

[0051] It should be further explained that, in order to improve the accuracy of metal border region extraction, the above-mentioned feature filtering of the image to be detected to obtain the metal border region may include: preprocessing the image to be detected to obtain a preprocessed image; wherein, the preprocessing is a process to reduce noise in the image; and performing feature filtering on the preprocessed image to obtain the metal border region. This embodiment does not limit the specific preprocessing method. For example, the preprocessing method in this embodiment may be mean filtering; or the preprocessing method in this embodiment may also be Gaussian filtering. This embodiment reduces noise in the image by preprocessing the image to be detected, thereby reducing the impact on the detection of the metal border region and improving the accuracy of metal border region extraction.

[0052] S102, determine the initial area of ​​the black film based on the metal frame area.

[0053] This embodiment determines the initial area of ​​the black film based on the metal frame region by simply locating the black film according to the metal frame. It is understood that the color of the metal frame region is different from the color of the black film; therefore, after determining the metal frame region, the black portion surrounding the metal frame region can be located to determine the initial area of ​​the black film. This embodiment does not limit the specific process of determining the initial area of ​​the black film based on the metal frame region. For example, this embodiment can obtain the metal frame region, calculate the minimum bounding rectangle of the region, and subtract the minimum bounding rectangle region from the metal frame region to obtain the approximate area of ​​the black film, which is the area to be detected by the black film; or this embodiment can determine the initial area of ​​the black film based on the black area surrounding the metal frame region.

[0054] It should be further explained that, in order to improve the accuracy of channel extraction, the above-mentioned channel extraction of the initial region of the black film to determine the R, G, and B of the image may include: cropping the initial region of the black film using a preprocessed image to obtain a precise region of the black film; and performing channel extraction on the precise region of the black film to determine the R, G, and B of the image. The preprocessing in this embodiment is generally image filtering and noise reduction or gamma transformation to improve image brightness. This embodiment does not limit the specific cropping method. For example, in this embodiment, image cropping can be performed by combining the ReduceDomain (reduce the region of interest (ROI)) and CropDomain (crop the image size) operators of Halcon (machine vision algorithm package), or by using the crop_image (remove unwanted information from the image) operator of OpenCV (Open Source Computer Vision Library). It is understandable that preprocessing the image can remove noise from the image. The initial region of the black film is the approximate region of the black film. For example, the initial region of the black film can be cropped using the preprocessed image. Since this embodiment performs channel extraction on the precise region of the black film, the accuracy of channel extraction can be improved, resulting in more accurate R, G, and B values ​​of the image.

[0055] It should be further explained that, in order to improve the efficiency of extracting the initial region of the black film, the above-mentioned determination of the initial region of the black film based on the metal border region may include: determining the minimum bounding rectangle of the metal border region, and subtracting the minimum bounding rectangle from the metal border region to obtain the initial region of the black film. In this embodiment, after obtaining the metal border region, the minimum bounding rectangle of that region is calculated, and the difference between the minimum bounding rectangle and the metal border region is used to obtain the approximate region of the black film, which is the region to be detected by the black film, the initial region of the black film. Since this embodiment directly determines the initial region of the black film based on the minimum bounding rectangle, the accuracy of determining the initial region of the black film can be improved.

[0056] S103, perform channel extraction on the initial region of the black film to determine the R, G, and B of the image.

[0057] In this embodiment, R, G, and B refer to RGB images, also known as full-color images. They have three channels: R (red), G (green), and B (blue). It can be understood that channel extraction of the image can amplify the features of the initial region of the black film, improving its anti-interference capability.

[0058] S104, perform threshold segmentation and Blob analysis on the channels of the initial region of the black film to determine the target image, and determine the blue film information based on the boundary contrast information in the target image, and determine whether the black film is offset based on the blue film information.

[0059] This embodiment does not limit the specific channel. For example, the channel in this embodiment can be the R channel; or the channel in this embodiment can be the B channel; or the channel in this embodiment can be the G channel. It should be noted that the B channel has the greatest difference in grayscale values ​​between the blue and black layers, resulting in better performance. Blob analysis in this embodiment is a commonly used analysis tool in image processing, widely used in object detection, recognition, and tracking. The essence of Blob analysis is to group pixels with the same grayscale value range together based on different neighborhood types, treating them as the same detection object. This embodiment performs threshold segmentation and Blob analysis processing on the B channel of the initial region of the black layer to further amplify the feature information, thereby determining the target image, and determining the blue layer information based on the boundary contrast information in the target image, and determining whether the black layer is offset based on the blue layer information. In this embodiment, determining whether the black layer is offset based on the blue layer information means determining whether there is any leaked blue layer; if there is, it indicates that the black layer is offset; if there is no leaked blue layer, it is determined that there is no black layer offset.

[0060] It should be further explained that the above-mentioned thresholding and Blob analysis processing of the B channel in the initial region of the black film to determine the target image, and determining the blue film information based on the boundary contrast information in the target image, and determining whether the black film is offset based on the blue film information, may include:

[0061] S1041 converts the R, G, and B of the image into an HSL channel image or an HSV channel image;

[0062] S1042, Perform Blob analysis on the B channel of R, G, and B in the image to determine the black base film region and the first blue film region;

[0063] S1043, Perform Blob analysis on the S channel of the HSL channel image to determine the second blue film region; wherein the size of the second blue film region is less than or equal to the size of the second blue film region.

[0064] S1044, Perform a union operation on the areas of the first blue film region and the second blue film region to obtain the total blue film region;

[0065] S1045, determine whether the black film completely covers the blue film based on whether the total area of ​​the blue film is empty.

[0066] This embodiment performs Blob analysis operations such as thresholding, opening / closing operations, and region feature filtering on the B channel of the image. This step can identify black base film areas and large areas of blue film leakage defects, obtaining the first blue film area. Thresholding and opening / closing related Blob operations are then performed on the S channel of the image to identify areas with smaller blue film leakage on the base film, obtaining the second blue film area. When the base film and blue film are close together, the difference is very small due to reflection factors, making it difficult to distinguish them using the B channel. Therefore, the S channel is added here for further judgment of the above areas. The S channel is not used directly for analysis here, mainly because in actual situations where there are missing black film layers, and there is no overall black film contrast (i.e., large areas of blue film exist), the contrast in the B channel is more obvious than in the S channel. The areas of the first blue film area obtained from the B channel and the second blue film area obtained from the S channel are combined to obtain the total blue film area. It is then determined whether the total blue film area is empty. If it is not empty, it indicates a blue film leakage; if the area is empty, it indicates that the black film completely covers the blue film. This embodiment primarily addresses two different scenarios. Channel B mainly deals with large areas of blue film, especially when the black film is forgotten. Channel S is more robust when the black and blue films are close together. Using both channels simultaneously can improve the accuracy of blue film determination.

[0067] It should be further explained that, to improve the accuracy of black film offset determination, after determining the black film offset based on the blue film information, the process can also include: determining the black film boundary of the black film region; performing straight line fitting on the black film boundary to obtain the straight line fitting information of the edge; determining the target distance from the pixel origin to the straight line fitting information; multiplying the target distance by the corresponding pixel precision to convert it to the corresponding coordinates and outputting the corresponding detection result; where the detection result is the offset value of the black film. It can be understood that the edge of the black film is generally metallic or other bright-colored features, with a clear boundary contrast. After extracting the boundary using the Canny operator (edge ​​detection algorithm), the black film boundary can be obtained by performing straight line fitting on the boundary.

[0068] This embodiment improves the accuracy of black film offset determination by utilizing linear fitting information to determine the specific offset of the black film.

[0069] This invention provides a method for detecting black film offset, which may include: S101, performing feature filtering on the image to be detected to obtain a metal border region; S102, determining the initial region of the black film based on the metal border region; S103, extracting channels from the initial region of the black film to determine the R, G, and B values ​​of the image; S104, performing threshold segmentation and Blob analysis on the B channel of the initial region of the black film to determine the target image, and determining the blue film information based on the boundary contrast information in the target image, and determining whether the black film is offset based on the blue film information. Compared with the current method of determining whether the black film is offset by manual visual inspection, which results in low accuracy in determining black film offset, this application improves the accuracy of black film offset determination by extracting channels from the initial region of the black film and enhancing the boundary contrast information of the image based on the channel information. Furthermore, this embodiment reduces noise in the image by preprocessing the image to be detected, thereby minimizing the impact on the detection of the metal border region and improving the accuracy of metal border region extraction. Also, since this embodiment performs channel extraction on the precise region of the black film, it can obtain more accurate R, G, and B values ​​for the image by improving the accuracy of channel extraction. Moreover, because this embodiment directly determines the initial region of the black film based on the minimum bounding rectangle, it can improve the accuracy of the initial region determination. This embodiment mainly addresses two different scenarios: the B channel primarily deals with large areas of blue film, especially when the black film is forgotten; the S channel has better robustness when the black and blue films are close together, and using both channels simultaneously can improve the accuracy of blue film determination. Finally, this embodiment improves the accuracy of black film offset determination by utilizing linear fitting information to determine the specific offset of the black film.

[0070] For a clearer understanding of this invention, please refer to the following details. Figure 2 , Figure 2 This is a flowchart illustrating a black film offset detection method provided in an embodiment of the present invention, which may specifically include:

[0071] S201, preprocess the input image to obtain a preprocessed image; wherein, the preprocessing is the process of reducing noise in the image.

[0072] S202, after thresholding the preprocessed image, Blob analysis is used to extract the black film metal border region.

[0073] S203, determine the minimum bounding rectangle of the metal border region, and obtain the black film region image by subtracting the minimum bounding rectangle region from the metal border region.

[0074] S204. The black film region image is cropped using the preprocessed image to obtain the target image.

[0075] S205: Perform channel extraction on the target image, extracting the R, G, and B channels of the image, and then perform channel conversion to convert the RGB channels into an HSL channel image.

[0076] S206, Perform Blob analysis on the B channel in the HSL channel image to determine the black base film region and the first blue film region.

[0077] S207, Perform Blob analysis on the S channel in the HSL channel image to determine the second blue film region; the second blue film region is less than or equal to the second blue film region.

[0078] S208: Perform a union operation on the areas obtained from the first blue film region and the second blue film region, and determine whether the region is empty.

[0079] If S209 is not empty, it indicates a blue leakage film.

[0080] S210, if the area is empty, it means that the black film completely covers the blue film.

[0081] S211, Determine the black film boundary of the black base film area, perform straight line fitting on the black film boundary, and obtain the straight line fitting information of the edge.

[0082] S212, calculate the distance from the pixel origin to the edge of the straight line fitting information, then multiply the corresponding distance by the corresponding pixel precision to convert to the corresponding world coordinates and output the corresponding detection result; where the detection result is the offset value of the black film.

[0083] This embodiment enhances the boundary contrast information of the image through channel changes, making the boundary information more accurate. By fitting a straight line to the edge of the black film, the offset example is determined, thereby improving the accuracy of edge distance calculation.

[0084] The following describes a black film offset detection device provided by an embodiment of the present invention. The black film offset detection device described below and the black film offset detection method described above can be referred to in correspondence.

[0085] Please refer to the details. Figure 3 , Figure 3 A schematic diagram of a black film offset detection device provided in an embodiment of the present invention may include:

[0086] The metal border region filtering module 100 is used to perform feature filtering on the image to be detected to obtain the metal border region.

[0087] The initial region determination module 200 for black film is used to determine the initial region of black film based on the metal frame region.

[0088] The channel extraction module 300 is used to extract channels from the initial region of the black film to determine the R, G, and B of the image.

[0089] The black film offset determination module 400 is used to perform threshold segmentation and Blob analysis processing on the channels of the initial region of the black film to determine the target image, and to determine the blue film information based on the boundary contrast information in the target image, and to determine whether the black film is offset based on the blue film information.

[0090] Furthermore, based on the above embodiments, the metal border area filtering module 100 may include:

[0091] A preprocessing unit is used to preprocess the image to be detected to obtain a preprocessed image; wherein the preprocessing is a process of reducing noise in the image;

[0092] The metal border region filtering unit is used to perform feature filtering on the preprocessed image to obtain the metal border region.

[0093] It should be further noted that the aforementioned channel extraction module 300 may include:

[0094] The black film precise region determination unit is used to crop the initial region of the black film using the preprocessed image to obtain the precise region of the black film;

[0095] The channel extraction unit is used to extract channels from the precise region of the black film to determine the R, G, and B of the image.

[0096] Furthermore, based on any of the above embodiments, the black film initial region determination module 200 may include:

[0097] The initial region determination unit for black film is used to determine the minimum bounding rectangle of the metal frame region, and to obtain the initial region of black film by subtracting the minimum bounding rectangle from the metal frame region.

[0098] Furthermore, based on any of the above embodiments, the black film offset determination module 400 may include:

[0099] The channel image conversion unit is used to convert the R, G, and B of the image into an HSL channel image or an HSV channel image;

[0100] The first blue film region determination unit is used to perform Blob analysis processing on the B channel of R, G, B in the image to determine the black base film region and the first blue film region.

[0101] The second blue film region determination unit is used to perform Blob analysis processing on the S channel in the HSL channel image to determine the second blue film region; wherein the size of the second blue film region is less than or equal to the size of the second blue film region.

[0102] The total blue film region determination unit is used to perform a union operation on the areas of the first blue film region and the second blue film region to obtain the total blue film region.

[0103] The black film offset determination unit is used to determine whether the black film completely covers the blue film based on whether the total area of ​​the blue film is empty.

[0104] Furthermore, based on any of the above embodiments, the above black film offset detection method may further include:

[0105] A straight-line fitting unit is used to determine the black film boundary of the black film region, perform straight-line fitting on the black film boundary, and obtain the straight-line fitting information of the edge.

[0106] The offset value determination unit is used to determine the target distance from the pixel origin to the straight line fitting information, multiply the target distance by the corresponding pixel precision to convert it to the corresponding coordinates and output the corresponding detection result; wherein, the detection result is the offset value of the black film.

[0107] It should be noted that the order of the modules and units in the aforementioned black film offset detection device can be changed without affecting the logic.

[0108] This invention provides a black film offset detection device, which may include: a metal border region screening module 100, used to perform feature screening on the image to be detected to obtain a metal border region; a black film initial region determination module 200, used to determine the initial black film region based on the metal border region; a channel extraction module 300, used to extract channels from the initial black film region to determine the R, G, and B of the image; and a black film offset determination module 400, used to perform threshold segmentation and Blob analysis processing on the channels of the initial black film region to determine the target image, and determine the blue film information based on the boundary contrast information in the target image, and determine whether the black film is offset based on the blue film information. Compared with the current method of determining whether the black film is offset by manual visual inspection, which results in low accuracy in determining the black film offset, this application improves the accuracy of black film offset determination by extracting channels from the initial black film region and enhancing the boundary contrast information of the image based on the channel information. Furthermore, this embodiment reduces noise in the image by preprocessing the image to be detected, thereby minimizing the impact on the detection of the metal border region and improving the accuracy of metal border region extraction. Also, since this embodiment performs channel extraction on the precise region of the black film, it can obtain more accurate R, G, and B values ​​for the image by improving the accuracy of channel extraction. Moreover, because this embodiment directly determines the initial region of the black film based on the minimum bounding rectangle, it can improve the accuracy of the initial region determination. This embodiment mainly addresses two different scenarios: the B channel primarily deals with large areas of blue film, especially when the black film is forgotten; the S channel has better robustness when the black and blue films are close together, and using both channels simultaneously can improve the accuracy of blue film determination. Finally, this embodiment improves the accuracy of black film offset determination by utilizing linear fitting information to determine the specific offset of the black film.

[0109] The following is a description of a black film offset detection device provided by an embodiment of the present invention. The black film offset detection device described below and the black film offset detection method described above can be referred to in correspondence.

[0110] Please refer to Figure 4 , Figure 4 A schematic diagram of a black film offset detection device provided in an embodiment of the present invention may include:

[0111] Memory 10 is used to store computer programs;

[0112] The processor 20 is used to execute a computer program to implement the aforementioned black film offset detection method.

[0113] The memory 10, processor 20, and communication interface 30 all communicate with each other through the communication bus 40.

[0114] In this embodiment of the invention, the memory 10 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment of the invention, the memory 10 may store programs for implementing the following functions:

[0115] Feature filtering is performed on the image to be detected to obtain the metal border region;

[0116] The initial area of ​​the black film is determined based on the metal frame area;

[0117] Channel extraction is performed on the initial region of the black film to determine the R, G, and B of the image;

[0118] Threshold segmentation and Blob analysis are performed on the channels of the initial region of the black film to determine the target image. The blue film information is determined based on the boundary contrast information in the target image, and the black film is determined to be offset based on the blue film information.

[0119] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0120] Furthermore, memory 10 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores operating systems and operating instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and handling hardware-based tasks.

[0121] Processor 20 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic device. Processor 20 can be a microprocessor or any conventional processor. Processor 20 can call programs stored in memory 10.

[0122] The communication interface 30 can be an interface for the communication module, used to connect with other devices or systems.

[0123] Of course, it should be noted that, Figure 4 The structure shown does not constitute a limitation on the black film offset detection device in the embodiments of the present invention. In practical applications, a black film offset detection device may include more than Figure 4 More or fewer components as shown, or combinations of certain components.

[0124] The readable storage medium provided in the embodiments of the present invention is described below. The readable storage medium described below can be referred to in correspondence with the black film offset detection method described above.

[0125] The present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the black film offset detection method described above.

[0126] The readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0127] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0128] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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 implementations should not be considered beyond the scope of this invention.

[0129] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0130] The foregoing has provided a detailed description of a black film offset detection method, apparatus, device, and readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting black film offset, characterized in that, include: Feature filtering is performed on the image to be detected to obtain the metal border region; The initial area of ​​the black film is determined based on the metal frame area; Channel extraction is performed on the initial region of the black film to determine the R, G, and B of the image; Threshold segmentation and Blob analysis are performed on the channels of the initial region of the black film to determine the target image. The blue film information is determined based on the boundary contrast information in the target image, and the black film is determined to be offset based on the blue film information.

2. The black film offset detection method according to claim 1, characterized in that, The process of feature filtering of the image to be detected to obtain the metal border region includes: The image to be detected is preprocessed to obtain a preprocessed image; wherein, the preprocessing is a process of reducing noise in the image; The preprocessed image is subjected to feature filtering to obtain the metal border region.

3. The black film offset detection method according to claim 2, characterized in that, The step of extracting channels from the initial region of the black film to determine the R, G, and B of the image includes: The initial region of the black film is cropped using the preprocessed image to obtain the precise region of the black film; Channel extraction is performed on the precise region of the black film to determine the R, G, and B of the image.

4. The black film offset detection method according to claim 1, characterized in that, The step of determining the initial region of the black film based on the metal frame region includes: Determine the minimum bounding rectangle of the metal frame region, and subtract the minimum bounding rectangle from the metal frame region to obtain the initial region of the black film.

5. The black film offset detection method according to any one of claims 1 to 4, characterized in that, The process of thresholding and performing Blob analysis on the channels of the initial region of the black film to determine the target image, determining the blue film information based on the boundary contrast information in the target image, and determining whether the black film is offset based on the blue film information includes: Convert the R, G, and B values ​​of the image into an HSL channel image or an HSV channel image; Blob analysis is performed on the B channel of the R, G, and B in the image to determine the black base film region and the first blue film region; Blob analysis is performed on the S channel of the HSL channel image to determine the second blue film region; wherein the size of the second blue film region is less than or equal to the size of the second blue film region. Perform a union operation on the areas of the first blue film region and the second blue film region to obtain the total blue film region; Whether the black film completely covers the blue film is determined by whether the total area of ​​the blue film is empty.

6. The black film offset detection method according to claim 1, characterized in that, After determining the black film offset based on the blue film information, the process also includes: Determine the black film boundary of the black film region, perform straight line fitting on the black film boundary, and obtain the straight line fitting information of the edge; Determine the target distance from the pixel origin to the line fitting information, multiply the target distance by the corresponding pixel precision to convert it to the corresponding coordinates, and output the corresponding detection result; wherein, the detection result is the offset value of the black film.

7. A black film offset detection device, characterized in that, include: The metal border region filtering module is used to filter features in the image to be detected to obtain the metal border region. The initial region determination module for black film is used to determine the initial region of black film based on the metal frame region. The channel extraction module is used to extract channels from the initial region of the black film to determine the R, G, and B of the image. The black film offset determination module is used to perform threshold segmentation and Blob analysis processing on the channels of the initial region of the black film to determine the target image, and to determine the blue film information based on the boundary contrast information in the target image, and to determine whether the black film is offset based on the blue film information.

8. The black film offset detection device according to claim 7, characterized in that, The metal border area filtering module includes: A preprocessing unit is used to preprocess the image to be detected to obtain a preprocessed image; wherein the preprocessing is a process of reducing noise in the image; The metal border region filtering unit is used to perform feature filtering on the preprocessed image to obtain the metal border region.

9. A black film offset detection device, characterized in that, include: Memory, used to store computer programs; A processor is configured to implement the black film offset detection method as described in any one of claims 1 to 6 when executing the computer program.

10. A readable storage medium, characterized in that, The readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the black film offset detection method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Thin film printing defect detection system and method

    CN109507209A

  • Wine box defect detection method based on image processing

    CN115147415A

  • Color mixing defect identification method, system and device of OLED panel and storage medium

    CN117911343A

  • Battery blue film coating system and battery blue film coating detection method

    CN117929280A

  • Color-identifying method

    JP2007164737A