Black film and black covered edge distinguishing method and device, equipment and storage medium

By employing image processing methods for the black film and black border, including channel extraction, filtering, and edge detection, the problem of inaccurate differentiation between the black film and black border was solved, achieving precise boundary information acquisition and position correction.

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

Patent Information

Application Number
CN202410642220.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

Current technology cannot accurately distinguish between the black film and the black edging, making it impossible to determine whether the black film is applied crookedly.

Method used

By processing the image to be detected, including channel extraction, filtering, threshold segmentation, blob analysis, and binarization, the boundary information of the black film and the black border can be accurately distinguished.

Benefits of technology

It achieves precise differentiation between the black film and the black border, improves detection accuracy and image quality, and can promptly correct positional shifts in the black border.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121010535A_ABST
    Figure CN121010535A_ABST
Patent Text Reader

Abstract

The invention discloses a black film and black covered edge distinguishing method and device, equipment and a storage medium, and is applied to the technical field of intelligent processing, and the method comprises the steps: processing a to-be-detected image, obtaining an overall detection image comprising a black film and a black covered edge, carrying out the channel extraction of the image, carrying out the Fourier positive transformation of an S channel of the obtained channel image, and obtaining a channel image; carrying out filtering processing on a low-frequency channel, and then carrying out inverse Fourier transform to obtain a target detection area; carrying out threshold segmentation on the target detection area, and carrying out Blob analysis operation to obtain a black frosted bottom film area; and performing filling processing on the black frosted bottom film area by using the pixel values to obtain a target filling area, and performing edge detection processing by using the target filling area to obtain target boundary information of the black film and the black covered edge. According to the method, image operations such as Fourier transform are performed on the to-be-detected image, and features of the black film and the black covered edge are amplified, so that boundary information of the bottom film and the covered edge film is accurately distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent processing technology, and in particular to a method, apparatus, device, and storage medium for distinguishing between a black film and a black edge. Background Technology

[0002] In metal products, a black frosted base film (black film) is surrounded by a black edge-sealing base film (black edge). To accurately obtain measurement information on the distance between the black film and the edge, it is essential to distinguish between the black frosted base film and the black edge-sealing base film to prevent interference. However, current methods lack a precise detection technique for distinguishing between the black edge and the black film. Therefore, accurately distinguishing between the black film and the black edge-sealing base film is crucial for accurately determining the degree of misalignment of the black film.

[0003] Therefore, current technology cannot accurately distinguish between the black film and the black edging, making it impossible to accurately determine whether the black film is applied crookedly. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, apparatus, device and storage medium for distinguishing between black film and black edge, which solves the technical problem in the prior art that black base film and edge insulating film cannot be accurately distinguished.

[0005] To solve the above-mentioned technical problems, the present invention provides a method for distinguishing between black film and black edging, comprising:

[0006] The image to be detected is processed to obtain an overall detection image including a black film and a black border, and channel extraction is performed on the overall detection image to obtain a channel image;

[0007] The target detection region is obtained by filtering the channel image;

[0008] Threshold segmentation is performed on the target detection area to obtain the high-brightness reflective area on the frosted base film, and Blob analysis is performed on the high-brightness reflective area on the frosted base film to obtain the black frosted base film area.

[0009] After binarizing the black frosted base film area, pixel values ​​are used for filling to obtain the target filling area. Then, edge detection is performed on the target filling area to obtain the target boundary information of the black film and the black border.

[0010] Optionally, the processing of the image to be detected to obtain an overall detection image including a black film and a black border includes:

[0011] The threshold segmentation and Blob analysis operations are performed on the image to be detected to obtain the metal border region of the black film;

[0012] Determine the first minimum bounding rectangle of the metal frame region, and subtract the first minimum bounding rectangle from the metal frame region to obtain the overall detection image including the black film and the black border.

[0013] Optionally, performing a blob analysis on the high-gloss reflective area on the frosted base film to obtain a black frosted base film area includes:

[0014] After performing the Blob analysis operation on the high-brightness reflective area on the frosted base film, the area obtained by the Blob calculation is obtained;

[0015] Determine the second minimum bounding rectangle corresponding to the region obtained by the Blob operation, and define the second minimum bounding rectangle as the black frosted base film region.

[0016] Optionally, the step of extracting channels from the overall detection image to obtain a channel image includes:

[0017] The overall detection image is processed by channel extraction to obtain the RGB region;

[0018] The RGB region is channel-converted to obtain an HSL channel image or an HSV channel image.

[0019] Optionally, after binarizing the black frosted base film area, performing fill processing using pixel values ​​to obtain the target fill area, and then performing edge detection processing using the target fill area to obtain the target boundary information of the black film and the black border, the method further includes:

[0020] The target boundary information of the black film and black border is converted to physical world coordinates for display.

[0021] Optionally, the step of threshold segmentation of the target detection area to obtain the high-brightness reflective area on the frosted substrate includes:

[0022] After performing texture filtering on the target detection area, the threshold segmentation is performed to obtain the high-brightness reflective area on the frosted base film.

[0023] Optionally, the step of filtering the channel image to obtain the target detection region includes:

[0024] Perform a forward Fourier transform on the S channel of the channel image to obtain a forward Fourier transform image;

[0025] After filtering the low-frequency channel in the Fourier transform image, an inverse Fourier transform is performed to obtain the target detection region.

[0026] This application also provides a device for distinguishing between a black film and a black edge, comprising:

[0027] The channel extraction module is used to process the image to be detected, obtain an overall detection image including a black film and a black border, and perform channel extraction on the overall detection image to obtain a channel image;

[0028] The Fourier transform module is used to perform a forward Fourier transform on the S channel of the channel image to obtain a forward Fourier transform image. After filtering the low-frequency channel in the forward Fourier transform image, an inverse Fourier transform is performed to obtain the target detection region.

[0029] The black frosted film region extraction module is used to perform threshold segmentation on the target detection region to obtain the high-brightness reflective region on the frosted film, and to perform Blob analysis on the high-brightness reflective region on the frosted film to obtain the black frosted film region.

[0030] The black film and black edge boundary information determination module is used to perform binarization processing on the black frosted base film area, then use pixel values ​​for filling processing to obtain the target filling area, and then use the target filling area for edge detection processing to obtain the target boundary information of the black film and black edge.

[0031] This application also provides a device for distinguishing between black film and black edging, comprising:

[0032] Memory, used to store computer programs;

[0033] A processor is configured to implement the steps of the method for distinguishing between the black film and the black border as described above when executing the computer program.

[0034] This application also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for distinguishing between the black film and the black border as described above.

[0035] As can be seen, this invention processes the image to be detected to obtain an overall detection image including the black film and the black edging, and extracts channels from the overall detection image to obtain a channel image; performs a forward Fourier transform on the S channel of the channel image to obtain a forward Fourier transform image; filters the low-frequency channels in the forward Fourier transform image and then performs an inverse Fourier transform to obtain the target detection region; performs threshold segmentation on the target detection region to obtain the bright reflective area on the frosted base film, and performs Blob analysis on the bright reflective area on the frosted base film to obtain the black frosted base film region; performs binarization processing on the black frosted base film region and fills it using pixel values ​​to obtain the target filled region, and performs edge detection processing using the target filled region to obtain the target boundary information of the black film and the black edging. Compared with the current method of distinguishing the black film and the black edging by manual visual inspection, this application amplifies the features of the frosted base film and the black insulating edging by performing image operations such as Fourier transform on the image to be detected, thereby accurately distinguishing the boundary information of the base film and the edging film.

[0036] In addition, the present invention also provides a device, apparatus and storage medium for distinguishing between black film and black edging, which also have the above-mentioned beneficial effects. Attached Figure Description

[0037] 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.

[0038] Figure 1 A flowchart illustrating a method for distinguishing between a black film and a black edge, provided in an embodiment of the present invention;

[0039] Figure 2 A flowchart illustrating a method for distinguishing between a black film and a black edge, provided in an embodiment of the present invention;

[0040] Figure 3 A schematic diagram of a device for distinguishing between a black film and a black edge, provided in an embodiment of the present invention;

[0041] Figure 4 This is a schematic diagram of a device for distinguishing between black film and black edging, provided in an embodiment of the present invention. Detailed Implementation

[0042] 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.

[0043] There is a black frosted base film next to a black edge-sealing base film. To accurately obtain measurement information on the distance between the black film and the edge, it is essential to distinguish between the two. However, current methods lack a precise detection method for differentiating between the black edge-sealing and the black base film. Furthermore, to accurately determine the quantitative analysis of how much the black film is misaligned, precise differentiation between the black frosted base film and the black edge-sealing film is crucial. Therefore, this method addresses the difficulty in distinguishing between the black frosted base film and the black edge-sealing insulating film by proposing a method for accurately distinguishing their boundaries. This method involves magnifying the features to precisely differentiate the boundary information between the base film and the edge-sealing film.

[0044] Please refer to Figure 1 , Figure 1 A flowchart illustrating a method for distinguishing between a black film and a black edge, provided in an embodiment of the present invention. The method may include:

[0045] S101, process the image to be detected to obtain an overall detection image including the black film and black border, and extract channels from the overall detection image to obtain a channel image.

[0046] In this embodiment, the image to be detected is a color image. Processing the image to be detected in this embodiment refers to border extraction to obtain a complete detection image including the black film and black border. This embodiment is not limited to the method of processing the image to obtain the complete detection image. For example, this embodiment can perform mean filtering on the image to be detected, followed by threshold segmentation to obtain the complete detection image; or this embodiment can perform Gaussian filtering on the image to be detected, followed by threshold segmentation and Blob analysis (Blob analysis 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) to obtain the complete detection image; or this embodiment can perform threshold segmentation on the image to be detected, followed by opening and closing operations, region filtering, and other Blob operations, mainly to extract the metal border region of the black film. After obtaining the metal border region, the minimum bounding rectangle of this region is calculated. The difference between the minimum bounding rectangle and the metal border region is used to obtain the overall detection image of the black film and the black edge-sealing film. Alternatively, this embodiment can preprocess the image to be detected to obtain a preprocessed image. After threshold segmentation, opening and closing operations, region filtering, and other Blob operations are performed on the preprocessed image. The main purpose is to extract the metal border region of the black film. After obtaining the metal border region, the minimum bounding rectangle of this region is calculated. The difference between the minimum bounding rectangle and the metal border region is used to obtain the approximate area of ​​the black film and the black edge-sealing film. The overall detection image is cropped using the obtained preprocessed image to obtain the cropped overall detection image containing the approximate area of ​​the black film and the black edge-sealing film. This embodiment does not limit the specific channel image. For example, the channel image in this embodiment can be an HSL (a representation of points in the RGB color model in cylindrical coordinates) channel image; or the channel image in this embodiment can also be an HSV (a representation of points in the RGB color space in an inverted cone) channel image; or it can also be other channel images including an S channel.

[0047] It should be further explained that, in order to improve the accuracy of the overall detection image determination, the above-mentioned processing of the image to be detected to obtain an overall detection image including the black film and the black border can include: performing threshold segmentation and Blob analysis on the image to be detected to obtain the metal border region of the black film; determining the first minimum bounding rectangle of the metal border region; and subtracting the first minimum bounding rectangle from the metal border region to obtain the overall detection image including the black film and the black border. This embodiment extracts the feature information of the image to be detected by performing threshold segmentation and Blob analysis, thereby coarsely locating the black film and the black border using the bounding rectangle method. It can be understood that by determining the minimum bounding rectangle of the metal border region, the minimum bounding rectangle can be directly determined, thereby improving the accuracy of the overall detection image determination.

[0048] It should be further explained that, in order to improve the applicability of this method, the above-mentioned channel extraction of the overall detection image to obtain a channel image may include: extracting the RGB region from the overall detection image; and performing channel conversion on the RGB region to obtain an HSL channel image or an HSV channel image. The channel image in this embodiment can be either an HSL channel image or an HSV channel image. The choice between using an HSL (Hyperchroma has three components: hue, saturation, and lightness) channel image or an HSV (Hyperchroma represents a color image and consists of three parts: Hue, Saturation, and Value) channel image can be determined based on the actual situation, thus improving the applicability of this method.

[0049] S102, filter the channel image to obtain the target detection area.

[0050] The process of filtering the channel image to obtain the target detection area in this embodiment can be as follows: first, perform a forward Fourier transform on the S channel, filter the low-frequency channel to initially screen out the edge regions, and then perform an inverse Fourier transform to convert the frequency image to the time domain.

[0051] S103, threshold segmentation is performed on the target detection area to obtain the high-brightness reflective area on the frosted base film, and Blob analysis is performed on the high-brightness reflective area on the frosted base film to obtain the black frosted base film area.

[0052] This embodiment can perform threshold segmentation on the target detection area to extract the bright reflective area on the frosted base film. While performing texture filtering, it can also shield the image unevenness caused by the unevenness of the black edge base film. After threshold segmentation, various Blob analysis operations such as opening and closing estimation are performed to obtain the area of ​​the black frosted base film. Since the black film in this solution is rectangular, the minimum bounding rectangle of the area obtained by the Blob analysis operation is obtained, and this area is the black frosted base film area.

[0053] It should be further explained that, in order to improve the accuracy of determining the black matte base film area, the above-mentioned Blob analysis operation on the high-brightness reflective area on the matte base film to obtain the black matte base film area may include: performing Blob analysis on the high-brightness reflective area on the matte base film to obtain the area obtained by Blob calculation; determining the second minimum bounding rectangle corresponding to the area obtained by Blob calculation, and determining the second minimum bounding rectangle as the black matte base film area. In this embodiment, various Blob analysis operations are performed on the high-brightness reflective area on the matte base film to obtain the black matte base film area. Since the black film in this solution is rectangular, the minimum bounding rectangle of the area obtained by Blob calculation is taken, and this area is the black matte base film area.

[0054] It should be further explained that, in order to mask uneven areas in the image, the aforementioned threshold segmentation of the target detection area to obtain the bright reflective areas on the frosted substrate can include: performing texture filtering on the target detection area followed by threshold segmentation to obtain the bright reflective areas on the frosted substrate. It can be understood that texture filtering also masks image unevenness caused by the unevenness of the black-edged substrate. Therefore, by first performing texture filtering on the image detection area and then threshold segmentation, uneven areas in the image can be masked, improving image quality.

[0055] S104: After binarizing the black frosted base film area, the pixel values ​​are used for filling to obtain the target filling area. The target filling area is then used for edge detection to obtain the target boundary information of the black film and the black border.

[0056] After obtaining the black frosted base film area in this embodiment, the area is binarized. The pixel values ​​of the area can be filled with 0 (or filled with 1). Then, the Canny (edge ​​detection algorithm) is used to calculate the edge of the image to obtain the accurate boundary information of the black edge-sealed base film and the black frosted base film.

[0057] It should be further explained that, in order to correct errors in a timely manner, after binarizing the black frosted base film area as described above, pixel values ​​are used for filling to obtain the target filling area. Then, edge detection is performed using the target filling area to obtain the target boundary information of the black film and the black border. The process can further include: converting the target boundary information of the black film and the black border to physical world coordinates for display. This embodiment, by converting the target boundary information of the black film and the black border to physical world coordinates for display, can determine the specific offset of the black border, facilitating timely correction of its position.

[0058] The method for distinguishing between the black film and the black edge provided in this embodiment of the invention may include: S101, processing the image to be detected to obtain an overall detection image including the black film and the black edge, and extracting channels from the overall detection image to obtain a channel image; S102, performing a forward Fourier transform on the S channel of the channel image to obtain a forward Fourier transform image, filtering the low-frequency channel in the forward Fourier transform image, and then performing an inverse Fourier transform to obtain the target detection region; S103, performing threshold segmentation on the target detection region to obtain a bright reflective region on the frosted base film, and performing Blob analysis on the bright reflective region on the frosted base film to obtain a black frosted base film region; S104, performing binarization processing on the black frosted base film region, filling processing using pixel values ​​to obtain a target filling region, and performing edge detection processing using the target filling region to obtain target boundary information of the black film and the black edge. Compared to the current method of manually distinguishing between the black film and the black edge, this application uses image operations such as Fourier transform on the image to be detected to amplify the features of the frosted base film and the black insulating edge, thereby accurately distinguishing the boundary information of the base film and the edge film. Furthermore, by determining the minimum bounding rectangle of the metal frame region, the minimum bounding rectangle can be directly determined, thus improving the accuracy of the overall detection image. Additionally, by performing texture filtering followed by threshold segmentation on the image detection area, uneven areas in the image can be masked, improving image quality. Moreover, by converting the target boundary information of the black film and the black edge to physical world coordinates for display, this embodiment can determine the specific offset of the black edge, facilitating timely correction of its position.

[0059] For a clearer understanding of this invention, please refer to the following details. Figure 2 , Figure 2 A flowchart illustrating a method for distinguishing between a black film and a black edge, provided in an embodiment of the present invention, may specifically include:

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

[0061] In this embodiment, the color image is the image to be detected. This embodiment can also use Gaussian filtering to preprocess the output color image.

[0062] S202, after threshold segmentation of the preprocessed image, Blob analysis is performed to obtain the metal border region of the black film.

[0063] This embodiment performs threshold segmentation on the preprocessed color image, and then performs Blob operations such as opening and closing operations and region filtering. The main purpose is to extract the metal border region of the black film.

[0064] S203, determine the first minimum bounding rectangle of the metal border region, and subtract the first minimum bounding rectangle region from the metal border region to obtain the overall region image including the black film and the black border.

[0065] After obtaining the metal frame area in this embodiment, a first minimum bounding rectangle corresponding to the metal frame area is determined. The difference between the first minimum bounding rectangle area and the metal frame area is used to obtain the approximate area of ​​the black film and the black edge-sealing base film (including the overall area image of the black film and the black edge).

[0066] S204, use the preprocessed image to crop the overall region image to obtain the cropped region image.

[0067] This embodiment utilizes the preprocessed image to crop the overall region image obtained in S203, acquiring the cropped approximate region containing the black film and the black edge-sealing film (cropped region image). The cropped region image in this embodiment is the image cropped after removing some of the preceding interfering features.

[0068] S205: Extract channels from the cropped area image, extracting the R, G, and B channels, and then perform channel conversion to convert the RGB channels into an HSL channel image.

[0069] This embodiment performs channel extraction on the cropped area image, extracting the R, G, and B channels of the image, and then performs channel conversion to convert the RGB channels into an HSL channel image.

[0070] S206 performs a forward Fourier transform on the S channel of the HSL channel image to convert the time-domain image into a frequency image and obtain the low-frequency channel.

[0071] S207 filters the low-frequency channel in the frequency image to obtain a frequency space image, and then converts the frequency space image to a time space image through inverse Fourier transform.

[0072] This embodiment performs a Fourier transform on the S-channel of the HSL channel image, filters the low-frequency channels to initially remove edge regions, and then performs an inverse Fourier transform to convert the frequency image to the time domain. It can be understood that the image obtained normally is a time-domain image; the forward Fourier transform converts the time-domain image into a frequency image, performs frequency filtering, and then uses an inverse Fourier transform to convert the frequency-space image back to the time-domain image.

[0073] S208 performs texture filtering on the temporal spatial image and threshold segmentation to extract the bright reflective areas on the black film.

[0074] This embodiment performs texture filtering on the temporal spatial image, then performs threshold segmentation to extract the high-brightness reflective area on the frosted base film. At the same time, texture filtering also masks the uneven areas of the image caused by the unevenness of the black edge base film.

[0075] S209, perform Blob analysis on the high-brightness reflective area on the black film, find the minimum bounding rectangle of the area obtained by the Blob operation, and obtain the black frosted base film area.

[0076] This embodiment performs various Blob analysis operations, such as opening and closing budgeting, on the high-brightness reflective area on the black film to obtain the Blob operation area. The minimum bounding rectangle of the area obtained by the Blob operation is then calculated, and this area is the black frosted base film area.

[0077] S210, perform binarization processing on the black frosted base film area, fill the pixel values ​​of the black frosted base film area with 0, and obtain the binarized image.

[0078] This embodiment performs binarization processing on the black frosted base film area. Binarization processing refers to dividing the entire image into a binary image that is either black or white.

[0079] S211, perform Canny edge calculation on the binarized image to obtain the boundary information of the black edge-sealed base film and the black frosted base film.

[0080] In this embodiment, after obtaining the black frosted base film area, the area is binarized, and the pixel values ​​of the area are filled with 0. Then, the image is processed by Canny (edge ​​detection algorithm) to obtain the accurate boundary information of the black edge-covered base film and the black frosted base film. After outputting the boundary pixel information of the affected area, it is converted to the physical world coordinates for display.

[0081] The embodiments of the present invention use image operations such as Fourier transform to magnify the features of the frosted base film and the black insulating edge of the image, thereby accurately distinguishing the boundary information of the base film and the edge film.

[0082] The following describes a device for distinguishing between black film and black edging provided by an embodiment of the present invention. The device for distinguishing between black film and black edging described below can be referred to in correspondence with the method for distinguishing between black film and black edging described above.

[0083] Please refer to the details. Figure 3 , Figure 3 A schematic diagram of the structure of the device for distinguishing between black film and black edging provided in an embodiment of the present invention may include:

[0084] The channel extraction module 100 is used to process the image to be detected to obtain an overall detection image including a black film and a black border, and to extract channels from the overall detection image to obtain a channel image.

[0085] The target detection region determination module 200 is used to filter the channel image to obtain the target detection region;

[0086] The black frosted film region extraction module 300 is used to perform threshold segmentation on the target detection region to obtain the high-brightness reflective region on the frosted film, and to perform Blob analysis on the high-brightness reflective region on the frosted film to obtain the black frosted film region.

[0087] The black film and black edge boundary information determination module 400 is used to perform binarization processing on the black frosted base film area, then use pixel values ​​for filling processing to obtain the target filling area, and use the target filling area for edge detection processing to obtain the target boundary information of the black film and black edge.

[0088] Furthermore, based on any of the above embodiments, the target detection region determination module 200 may include:

[0089] The Fourier forward transform unit is used to perform a Fourier forward transform on the S channel of the channel image to obtain a Fourier forward transform image.

[0090] The inverse Fourier transform unit is used to filter the low-frequency channel in the forward Fourier transform image and then perform an inverse Fourier transform to obtain the target detection region.

[0091] Furthermore, based on the above embodiments, the channel extraction module 100 may include:

[0092] The black film metal border region extraction unit is used to perform the threshold segmentation and Blob analysis operations on the image to be detected to obtain the metal border region of the black film.

[0093] The overall detection image determination unit is used to determine the first minimum bounding rectangle of the metal frame area, and to subtract the first minimum bounding rectangle from the metal frame area to obtain the overall detection image including the black film and the black border.

[0094] Furthermore, based on any of the above embodiments, the black frosted base film area extraction module 300 may include:

[0095] The Blob analysis unit is used to perform the Blob analysis operation on the high-brightness reflective area on the frosted base film to obtain the area obtained by the Blob calculation.

[0096] The black frosted base film area determination unit is used to determine the second minimum bounding rectangle corresponding to the area obtained by the Blob operation, and to determine the second minimum bounding rectangle as the black frosted base film area.

[0097] It should be further noted that, based on any of the above embodiments, the channel extraction module 100 may include:

[0098] An RGB region extraction unit is used to extract RGB regions from the overall detection image by channel extraction.

[0099] The HSL or HSV channel image extraction unit is used to perform channel conversion on the RGB region to obtain an HSL channel image or an HSV channel image.

[0100] Furthermore, based on any of the above embodiments, the method for distinguishing between the black film and the black edging may further include:

[0101] The boundary coordinate display module is used to convert the target boundary information of the black film and black edging into physical world coordinates for display.

[0102] Furthermore, the black frosted base film area extraction module 300 based on any of the above embodiments may include:

[0103] The black frosted film area extraction unit is used to perform texture filtering on the target detection area and then perform threshold segmentation to obtain the high-brightness reflective area on the frosted film.

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

[0105] This invention provides a device for distinguishing between a black film and a black border, which may include: a channel extraction module 100, used to process an image to be detected to obtain an overall detection image including the black film and the black border, and to extract channels from the overall detection image to obtain a channel image; a target detection region determination module 200, used to filter the channel image to obtain a target detection region; a black frosted base film region extraction module 300, used to perform threshold segmentation on the target detection region to obtain a bright reflective region on the frosted base film, and to perform Blob analysis on the bright reflective region on the frosted base film to obtain a black frosted base film region; and a boundary information determination module 400, used to binarize the black frosted base film region, fill it with pixel values ​​to obtain a target filled region, and perform edge detection processing on the target filled region to obtain target boundary information of the black film and the black border. Compared to the current method of manually distinguishing between the black film and the black edge, this application uses image operations such as Fourier transform on the image to be detected to amplify the features of the frosted base film and the black insulating edge, thereby accurately distinguishing the boundary information of the base film and the edge film. Furthermore, by determining the minimum bounding rectangle of the metal frame region, the minimum bounding rectangle can be directly determined, thus improving the accuracy of the overall detection image. Additionally, by performing texture filtering followed by threshold segmentation on the image detection area, uneven areas in the image can be masked, improving image quality. Moreover, by converting the target boundary information of the black film and the black edge to physical world coordinates for display, this embodiment can determine the specific offset of the black edge, facilitating timely correction of its position.

[0106] The following describes a device for distinguishing between black film and black edging provided by an embodiment of the present invention. The device for distinguishing between black film and black edging described below can be referred to in correspondence with the method for distinguishing between black film and black edging described above.

[0107] Please refer to Figure 4 , Figure 4 A schematic diagram of a device for distinguishing between black film and black edging provided in an embodiment of the present invention may include:

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

[0109] The processor 20 is used to execute computer programs to implement the above-mentioned method for distinguishing between the black film and the black border.

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

[0111] 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:

[0112] The image to be detected is processed to obtain an overall detection image including the black film and black border, and channel extraction is performed on the overall detection image to obtain a channel image;

[0113] The target detection region is obtained by filtering the channel image;

[0114] Threshold segmentation is performed on the target detection area to obtain the bright reflective area on the frosted base film, and Blob analysis is performed on the bright reflective area on the frosted base film to obtain the black frosted base film area.

[0115] After binarizing the black frosted base film area, the pixel values ​​are used for filling to obtain the target filling area. Then, edge detection is performed on the target filling area to obtain the target boundary information of the black film and the black border.

[0116] 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.

[0117] 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.

[0118] 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.

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

[0120] Of course, it should be noted that, Figure 4The structure shown does not constitute a limitation on the device for distinguishing between the black film and the black edge in the embodiments of the present invention. In practical applications, the device for distinguishing between the black film and the black edge may include... Figure 4 More or fewer components as shown, or combinations of certain components.

[0121] The storage medium provided in the embodiments of the present invention will be described below. The storage medium described below can be referred to in correspondence with the method of distinguishing the black film and black edge described above.

[0122] The present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for distinguishing between the black film and the black border.

[0123] The storage medium can include various media that can store program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0124] 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.

[0125] 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.

[0126] 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.

[0127] The foregoing has provided a detailed description of a method, apparatus, device, and storage medium for distinguishing between a black film and a black edge. 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 distinguishing between a black film and a black edge, characterized in that, include: The image to be detected is processed to obtain an overall detection image including a black film and a black border, and channel extraction is performed on the overall detection image to obtain a channel image; The target detection region is obtained by filtering the channel image; Threshold segmentation is performed on the target detection area to obtain the high-brightness reflective area on the frosted base film, and Blob analysis is performed on the high-brightness reflective area on the frosted base film to obtain the black frosted base film area. After binarizing the black frosted base film area, pixel values ​​are used for filling to obtain the target filling area. Then, edge detection is performed on the target filling area to obtain the target boundary information of the black film and the black border.

2. The method for distinguishing between the black film and the black edging according to claim 1, characterized in that, The process of processing the image to be detected to obtain an overall detection image including a black film and a black border includes: The threshold segmentation and Blob analysis operations are performed on the image to be detected to obtain the metal border region of the black film; Determine the first minimum bounding rectangle of the metal frame region, and subtract the first minimum bounding rectangle from the metal frame region to obtain the overall detection image including the black film and the black border.

3. The method for distinguishing between the black film and the black edging according to claim 1, characterized in that, The step of performing a Blob analysis on the high-gloss reflective area on the frosted base film to obtain a black frosted base film area includes: After performing the Blob analysis operation on the high-brightness reflective area on the frosted base film, the area obtained by the Blob calculation is obtained; Determine the second minimum bounding rectangle corresponding to the region obtained by the Blob operation, and define the second minimum bounding rectangle as the black frosted base film region.

4. The method for distinguishing between the black film and the black edging according to any one of claims 1 to 3, characterized in that, The step of extracting channels from the overall detection image to obtain channel images includes: The overall detection image is processed by channel extraction to obtain the RGB region; The RGB region is channel-converted to obtain an HSL channel image or an HSV channel image.

5. The method for distinguishing between the black film and the black edging according to claim 1, characterized in that, After binarizing the black frosted base film area, pixel values ​​are used for filling to obtain the target filling area. Then, edge detection is performed on the target filling area to obtain the target boundary information of the black film and the black border. The process further includes: The target boundary information of the black film and black border is converted to physical world coordinates for display.

6. The method for distinguishing between the black film and the black edging according to claim 1, characterized in that, The threshold segmentation of the target detection area to obtain the high-brightness reflective area on the frosted substrate includes: After performing texture filtering on the target detection area, the threshold segmentation is performed to obtain the high-brightness reflective area on the frosted base film.

7. The method for distinguishing between the black film and the black edging according to claim 1, characterized in that, The step of filtering the channel image to obtain the target detection region includes: Perform a forward Fourier transform on the S channel of the channel image to obtain a forward Fourier transform image; After filtering the low-frequency channel in the Fourier transform image, an inverse Fourier transform is performed to obtain the target detection region.

8. A device for distinguishing between a black film and a black edge, characterized in that, include: The channel extraction module is used to process the image to be detected, obtain an overall detection image including a black film and a black border, and perform channel extraction on the overall detection image to obtain a channel image; The Fourier transform module is used to perform a forward Fourier transform on the S channel of the channel image to obtain a forward Fourier transform image. After filtering the low-frequency channel in the forward Fourier transform image, an inverse Fourier transform is performed to obtain the target detection region. The black frosted film region extraction module is used to perform threshold segmentation on the target detection region to obtain the high-brightness reflective region on the frosted film, and to perform Blob analysis on the high-brightness reflective region on the frosted film to obtain the black frosted film region. The black film and black edge boundary information determination module is used to perform binarization processing on the black frosted base film area, then use pixel values ​​for filling processing to obtain the target filling area, and then use the target filling area for edge detection processing to obtain the target boundary information of the black film and black edge.

9. A device for distinguishing between black film and black edging, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the method for distinguishing between the black film and the black edging as described in any one of claims 1 to 6 when executing the computer program.

10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for distinguishing between the black film and the black edging as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Binarization and normalization-based inpainting for removing text

    CN112840373A

  • Black glue module appearance detection method and system based on machine vision

    CN116503324A

  • Method and device for collating seal impression

    JP1997128537A

  • Method For Estimating Edge Displacement Againt Brightness

    KR101765223B1

  • Binarization and normalization-based inpainting for removing text

    WO2020038207A1