CN114283124A - Smudginess detection method, device, equipment and storage medium - Google Patents

Smudginess detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN114283124A
CN114283124A CN202111506728.8A CN202111506728A CN114283124A CN 114283124 A CN114283124 A CN 114283124A CN 202111506728 A CN202111506728 A CN 202111506728A CN 114283124 A CN114283124 A CN 114283124A
Authority
CN
China
Prior art keywords
detection
area
original image
contamination
areas
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111506728.8A
Other languages
Chinese (zh)
Inventor
贾国靖
周钟海
姚毅
杨艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Luster LightTech Co Ltd
Suzhou Luster Vision Intelligent Device Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd
Original Assignee
Luster LightTech Co Ltd
Suzhou Luster Vision Intelligent Device Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Luster LightTech Co Ltd, Suzhou Luster Vision Intelligent Device Co Ltd, Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN202111506728.8A priority Critical patent/CN114283124A/en
Publication of CN114283124A publication Critical patent/CN114283124A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application discloses a dirt detection method, a dirt detection device, dirt detection equipment and a storage medium. Wherein, an original image of the surface of an object to be detected is taken; dividing the detection areas of the original image to obtain at least two detection areas; and carrying out contamination detection on at least two detection areas in parallel to obtain the contamination condition of the object to be detected. According to the technical scheme, the detection regions are divided from the original image, so that the problem that the original image is too large and the gray distribution is not uniform can be effectively solved, the gray of the pixel points in each detection region tends to be uniform, the inaccuracy of the detection result caused by the large gray difference of different regions in the original image is prevented, and the precision of dirt detection is improved. And, carry out parallel detection to each detection zone, can effectively promote detection speed.

Description

Smudginess detection method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of image processing, in particular to a contamination detection method, a contamination detection device, contamination detection equipment and a storage medium.
Background
At present, before being packaged, solid commodities are easy to cause surface dirt, such as water stain or dust, in the production process, and the surface dirt of the commodities caused by the surface dirt can influence the sale of the commodities. Therefore, the detection of the contamination on the surface of the commodity is very important for ensuring the delivery quality of the commodity and improving the quality inspection efficiency.
In the prior art, a threshold segmentation method is used for identifying stains on the surfaces of commodities. And screening pixel points in the image on the surface of the commodity through a preset gray threshold value to obtain a smudge identification result. However, this processing method using only the gradation threshold division has low detection accuracy. Meanwhile, the method is not suitable for detecting the very large dirt on the surface of the commodity, and the detection speed of the image with a large picture is slow.
Disclosure of Invention
The embodiment of the application provides a dirt detection method, a dirt detection device, dirt detection equipment and a storage medium, so that the detection speed and the detection precision of dirt identification are improved.
In a first aspect, an embodiment of the present application provides a contamination detection method, including:
acquiring an original image of the surface of an object to be detected;
dividing the detection areas of the original image to obtain at least two detection areas;
and carrying out contamination detection on at least two detection areas in parallel to obtain the contamination condition of the object to be detected.
In a second aspect, an embodiment of the present application further provides a contamination detection apparatus, including:
the image acquisition module is used for acquiring an original image of the surface of the object to be detected;
the detection area division module is used for dividing the detection areas of the original image to obtain at least two detection areas;
and the contamination detection module is used for carrying out contamination detection on at least two detection areas in parallel to obtain the contamination condition of the object to be detected.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement any one of the contamination detection methods according to the embodiments of the first aspect of the present application.
In a fourth aspect, this application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the contamination detection methods described in this application with respect to the embodiments of the first aspect.
According to the technical scheme, the detection regions are divided from the original image, so that the problem that the original image is too large and the gray distribution is not uniform can be effectively solved, the gray of the pixel points in each detection region tends to be uniform, the inaccuracy of the detection result caused by the large gray difference of different regions in the original image is prevented, and the precision of dirt detection is improved. And, carry out parallel detection to each detection zone, can effectively promote detection speed.
Drawings
Fig. 1 is a flowchart of a contamination detection method according to an embodiment of the present application;
fig. 2 is a flowchart of a contamination detection method according to a second embodiment of the present application;
fig. 3A is a flowchart of a contamination detection method according to a third embodiment of the present application;
fig. 3B is a flowchart of an image enhancement method provided in the third embodiment of the present application;
fig. 4 is a structural diagram of a contamination detection apparatus according to a fourth embodiment of the present application;
fig. 5 is a structural diagram of an electronic device according to a fifth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a contamination detection method according to an embodiment of the present disclosure. The method can be executed by a contamination detection device, which can be implemented by software and/or hardware and is specifically configured in the electronic device.
Referring to fig. 1, a contamination detection method specifically includes the following steps:
and S110, acquiring an original image of the surface of the object to be detected.
The surface of the object to be detected can be the surface of an object needing dirt detection, such as a display screen, paintings, artworks and the like. The original image may be an acquired image of the surface of the object to be detected, and the acquisition method may be shooting with a camera. Preferably, a high-resolution line camera can be used for image acquisition.
For example, the object to be detected may be a display screen, and before the display screen is packaged, in order to ensure that the surface of the screen is clean and free of dirt, the surface of the display screen is subjected to dirt detection. The method comprises the steps of enabling a liquid crystal area of a display screen to be placed face up, arranging a linear array camera with high pixels and high resolution right above the liquid crystal area, vertically and downwards photographing the liquid crystal area of the display screen, wherein the photographed composition at least comprises all the liquid crystal areas, and obtaining images of the liquid crystal areas for subsequent smudging detection.
And S120, carrying out detection area division on the original image to obtain at least two detection areas.
The detection area may be an image area divided to detect a part of the image. The dividing mode may be divided by the size of the frame or by the number of pixels, which is not limited in the embodiment of the present application. And finally, dividing an original image into at least two detection areas in a preset dividing mode.
Illustratively, when the liquid crystal area of the display screen is subjected to contamination detection, the liquid crystal area is photographed, and the acquired image is divided after photographing, for example, one photograph can be divided into tens or even hundreds of detection areas, so that each detection area can be conveniently and respectively detected in the following process.
In an alternative embodiment, the detecting area dividing the original image to obtain at least two detecting areas may include: dividing pixels of the original image according to the number of the pixels of the original image; and determining at least two detection areas according to the pixel division result.
Wherein, the pixels of the original image can be divided, so that at least two divided pixel areas become at least two detection areas. The pixel division may be performed according to the number of pixels, for example, the number of pixels in each detection area and the pixel arrangement mode are preset, although the number of pixels in different detection areas may be the same or different, and the pixel arrangement modes may be the same or different. Certainly, the pixels in the original image can be divided according to the gray distribution of the pixels, and adjacent pixels with similar gray values can be divided into the same detection area.
It can be understood that, in actual conditions, the ambient light source for obtaining the original image is not controllable, which causes uneven gray distribution of pixel points in the original image with a large picture width, and the gray in each detection area can be effectively controlled to be close to uniform by dividing the detection areas, thereby being beneficial to image processing of each detection area.
According to the technical scheme of the embodiment, the original image is divided according to the number of the pixels of the original image, so that the method is convenient and quick to do, and the calculation amount for dividing the detection area can be reduced. Meanwhile, the detection area is divided into detection areas with proper sizes, so that the processor can perform parallel detection by utilizing multiple threads, and the overall detection speed is improved.
In an alternative embodiment, the pixel dividing the original image according to the number of pixels of the original image may include: and according to the number of pixels of the original image, uniformly dividing the area of the original image.
The area uniform division may be to divide pixel points in the original image into a plurality of detection areas with equal pixel quantity and same pixel arrangement.
Illustratively, through worker testing, 500 × 500 pixel regions were determined to be suitable for detecting soiling. Assuming that the number of pixels of the current original image is 4200 ten thousand, it needs to be divided into 168 pixel regions of 500 × 500 as detection regions.
According to the technical scheme of the embodiment, the number of the pixel points of each detection area is the same, the detection areas can be divided quickly, and therefore the speed of dirty detection is improved.
S130, performing contamination detection on the at least two detection areas in parallel to obtain the contamination condition of the object to be detected.
Wherein, dirty detection can be the detection of carrying out the dirty condition to the detection zone, and the dirty condition can include that there is dirty and the detection zone does not exist dirty, and wherein, the dirty condition of existence includes but not limited to dirty position (the position of the pixel that corresponds to dirty for the detection zone promptly), dirty area (the pixel quantity that corresponds to dirty promptly) and dirty shape (the shape of the pixel that corresponds to dirty promptly). The parallel detection may be a multi-thread processing capability of the processor, and the contamination detection in each detection area is performed in a multi-task manner. Wherein, the dirt detection of the detection area can adopt at least one image processing algorithm in the prior art to detect.
For example, when the display screen is subjected to contamination detection, the original image is divided into 168 detection areas, and if the currently adopted processor has 64 threads, 64 detection areas are selected from the 168 detection areas according to a preset selection rule and allocated to 64 threads to perform contamination detection at the same time. It can be understood that, because the complexity of the pixel point information in each detection area is different, the detection speed will be different under the processing of different threads with the same performance. Therefore, after the single thread finishes detecting the current detection area, the next detection area is selected and detected from the rest unprocessed detection areas according to the preset selection rule, and the like. The preset selection rule may be a sequential selection, for example, processing is performed from top left to bottom right of the whole frame of the original image.
According to the technical scheme, the detection regions are divided from the original image, so that the problem that the original image is too large and the gray distribution is not uniform can be effectively solved, the gray of the pixel points in each detection region tends to be uniform, the inaccuracy of the detection result caused by the large gray difference of different regions in the original image is prevented, and the precision of dirt detection is improved. And, carry out parallel detection to each detection zone, can effectively promote detection speed.
Example two
Fig. 2 is a flowchart of a contamination detection method according to a second embodiment of the present application. According to the embodiment of the application, on the basis of the technical scheme of the embodiment, the dirt detection operation of the detection area is refined, so that the dirt detection speed and the dirt detection precision are improved.
Referring to fig. 2, a contamination detection method specifically includes the following steps:
s210, acquiring an original image of the surface of the object to be detected.
S220, carrying out detection area division on the original image to obtain at least two detection areas.
S230, when the at least two detection areas are subjected to pollution detection in parallel, pixel expansion is carried out on the detection areas aiming at the detection areas to obtain corresponding expanded detection areas, and the pollution condition of the corresponding expanded detection areas of the detection areas is determined.
The pixel expansion may be to expand the pixel amount during detection according to the number of pixels in the current detection area, so as to increase the detection range. The pixel range after the detection pixel amount is expanded can be used as an expanded detection area.
It should be noted that, the number of the pixels in each of the original divided detection regions is not changed, and the extended detection region corresponding to the current detection region is only detected during detection. For example, the pixel count of the current detection region is 500 × 500, and the pixel count of the extended detection region corresponding to the current detection region is 600 × 600 by extending 10% in each of the four directions, i.e., the four directions of the top, bottom, left, and right (i.e., 50 pixels) around the current detection region. The extended detection zone of 600 x 600 was subjected to a soil detection. Of course, the specific expansion amount of the pixel amount may be a more appropriate value obtained through a large number of experiments, or may be set according to a specific situation, which is not limited in this application.
It can be understood that, because the dirty detection with the detection zone changes to the extension detection zone and carries out dirty detection, then adjacent detection zone is when detecting, and the pixel scope that the corresponding extension detection zone has overlapping detection, consequently can deal with the condition that partial dirty region is detected to distinguish and cuts apart.
In an alternative embodiment, the determining that the detection area corresponds to a smudging condition of the extended detection area may include: setting the gray value of each pixel point in a target area of an original image as a preset invalid value to obtain a target image; the target area is a complementary area of the extended detection area corresponding to the detection area in the original image; and performing dirt detection on the target image to obtain a local dirt area of the detection area corresponding to the expanded detection area.
Wherein, the preset invalid value may be that the gray value of the pixel is 0. The target image may be an image of the same frame as the original image but only having the expansion detection area with not all the gray values of 0. The complementary region may be a region of all pixel points in the original image except the current extended detection region. The local dirty region may be a pixel range of each pixel point corresponding to the identified dirty in the extended detection region or in the detection region.
Illustratively, when the extended detection area is subjected to contamination detection, the gray values of all pixel points in the original image except the extended detection area are set to zero, that is, the determination of the extended detection area is completed, so that the interference of the target area on the detection can be eliminated when the original image is subjected to image processing. Even so, the pixel information within the target area of the target image still participates in the computation. In order to reduce the amount of calculation, only the pixel information of the extended detection area is calculated at the time of image processing for stain detection, and thereby the stain condition in the extended detection area is obtained. While the position information of the extended detection area with respect to the original image can be recorded.
In the technical scheme of the embodiment, the preset invalid value is set for the gray information of the pixel point of the target area so as to determine the target image, and compared with a mode of directly cutting down the image to obtain the extended detection area, the method saves more memory, thereby improving the operation speed. And only the pixel point information of the expanded detection area is subjected to the operation of dirt detection, so that the calculation influence of the pixel information of the target area is reduced, and the calculation amount is greatly reduced.
In an alternative embodiment, the determining that the detection area corresponds to a localized soiled area of the extended detection area may include: carrying out threshold segmentation on the extended detection area corresponding to the detection area; and carrying out image enhancement on the threshold segmentation result, and carrying out feature extraction on the image enhancement result to obtain a local dirty area of the detection area corresponding to the expanded detection area.
The threshold segmentation may be global threshold segmentation or dynamic threshold segmentation, and the extended detection area may be processed according to a preset grayscale threshold.
The image enhancement may be an image processing method for enhancing texture features in an image, and may be a gray scale linear transformation. For example, the image obtained by the threshold segmentation may be subjected to a gray average calculation, the gray average may be used as a lower gray value limit, a preset gray range may be set by using an upper preset gray value limit, and the image may be subjected to a gray linear transformation to improve the image quality and facilitate feature screening. It will be appreciated that, since the gray-scale values of different extended detection areas deviate greatly, a gray-scale mean should be calculated in each extended detection area separately to improve the adaptability of image enhancement to different extended detection areas.
The feature extraction may be to perform feature screening on the image enhancement result to obtain a local dirty region. The feature extraction can adopt any feature extraction algorithm in the prior art. For example, feature extraction may be performed on the image enhancement result according to feature information such as a preset dirty area and a preset dirty gray level.
According to the technical scheme of the embodiment, highlight interference in the image is eliminated through threshold segmentation, and the influence of fluff, silk threads and the like possibly existing on the surface of an actual product on dirt detection is eliminated. Through image enhancement, the image quality of the image is improved, the image details are clearer, and the detection of dirt is facilitated. By means of feature extraction, the soiling situation in the extended detection area is determined. The three methods are used for comprehensively processing the image of the expanded detection area, so that the dirt detection precision can be effectively improved.
S240, determining the dirt condition of the object to be detected according to the dirt condition of the corresponding extended detection area of each detection area.
For example, the distribution of the dirt in each extended detection area may be counted and restored to the whole original image, so as to show the dirt of the whole image to the staff.
In an alternative embodiment, the determining the contamination condition of the object to be detected according to the contamination condition of the extended detection area corresponding to each detection area may include: and determining a global dirty area of the object to be detected in the original image according to the position information of the local dirty area corresponding to each detection area.
The position information of the local dirty region may be a position of a pixel point corresponding to the dirty in each detection region relative to each detection region. And (4) restoring the positions of the pixel points corresponding to the dirt in the detection areas to the original image to obtain all the dirt positions of the original image as a global dirt area. The pixel points corresponding to the dirt in each detection area can be marked in the original image through a preset image processing algorithm, so that the visual display effect is provided for workers.
According to the technical scheme of the embodiment, the dirt condition in each detection area is restored to the original image, so that all dirt information can be visually acquired from the original image, and a worker can timely process the dirt.
The technical scheme of this application embodiment, through expanding the detection zone, carry out dirty detection in the extension detection zone, the effectual dirty region of having solved is by the condition that the detection zone was cut apart, has guaranteed that dirty region is arrived by complete discernment to greatly reduced the probability of missing examining, improved the precision that dirty detected.
EXAMPLE III
Fig. 3A is a flowchart of a contamination detection method according to a third embodiment of the present application. Preferably, in addition to the foregoing embodiments, the present application provides a preferred embodiment by taking the detection of the contamination of the liquid crystal panel of the display as an example.
As shown in fig. 3A, the contamination detection method may include: the method comprises the steps of image acquisition, detection area division, detection area expansion identification, bright spot interference elimination, image enhancement, dirt screening, dirt image reduction and the like.
In image acquisition, for example, in order to realize high-precision dirt detection, a high-resolution line camera is used for acquiring images. The acquired gray image should occupy no less than 200M of memory, and the liquid crystal area in which the contamination needs to be detected should occupy more than 3/4 of the whole image size.
In the detection area division, an image corresponding to the liquid crystal area may be divided into a plurality of rectangular detection areas for subsequent parallel detection using a multi-thread manner. The area size of the rectangular detection area can be obtained by a skilled person through a large number of experiments. For example, the image corresponding to the liquid crystal region may be divided into a number of detection regions of 500 × 500.
It will be appreciated that during the above detection zone division, it may occur that a complete piece of dirt is divided into different detection zones, resulting in some of the dirt in these different detection zones being missed. The detection zone can be expanded to prevent missed detection. Continuing the previous example, the multithreading capability of the processor is utilized to process different detection areas of 500 × 500 pixels in parallel, and 10% of pixel points, namely 50 pixels, are respectively extended outwards in four directions of the rectangular detection area, so that an extended detection area of 600 × 600 is obtained. Note that, obtaining the extended detection area does not cut out the original image, but sets the gradation value of the area other than the extended detection area to zero.
After the different detection areas are expanded, the respective expanded detection areas are subjected to contamination detection through an image processing algorithm. The principle of the image processing algorithm is to process each pixel in the image, but the gray-level value of the region outside the extended detection area obtained in the above step is 0, which has no influence on the image processing result, but it is actually involved in the calculation. Therefore, in order to reduce the operation of this part, only the pixel points of the extended detection area should be identified when the contamination detection is performed by the image processing algorithm.
In practical situations, due to the influence of environmental factors, some dust or fluff adheres to the surface of the liquid crystal screen of the display at the same time, and is represented as gray highlight in an image, and if the bright spots are just located at dirty positions, the identification of the dirt is influenced. Therefore, in the step of eliminating the bright point interference, the bright point having a high gray value is eliminated by the global threshold segmentation method.
Due to the fact that the smudges have the characteristic of low contrast in the image, the smudges are difficult to directly identify through threshold segmentation. Therefore, it becomes important to enhance the image quality of an image by an image processing algorithm. Fig. 3B is a flowchart of an image enhancement method according to an embodiment of the present application. As shown in fig. 3B, in the image enhancement process, the gray scale linear transformation is performed on the extended detection area, so as to improve the contrast of the smudgy. And performing parallel processing of gray level average calculation on different extension detection areas respectively through the multithreading capability of the processor, and taking each obtained gray level average as a lower limit value of gray level conversion of each extension detection area. And adding an offset to the average value to obtain a result as an upper limit value of gray scale transformation, wherein the offset can be set according to manual experience, and the pixels of the extended detection area are subjected to gray scale linear stretching. For example, stretching the gray scale range within the extended detection area to 0-255 may help identify soiling.
In the process of screening the dirt, feature extraction is carried out on the expanded detection areas through preset feature quantity (at least one item such as dirt area and/or gray scale), and dirt positions in the expanded detection areas are obtained.
The corresponding position of the original image is marked with the dirty positions of all the detected extended detection areas so as to achieve the purpose of reducing the dirt.
Example four
Fig. 4 is a structural diagram of a contamination detection apparatus according to a fourth embodiment of the present application, where the embodiment of the present application is applicable to detecting a contamination on a surface of an object, and the apparatus may be implemented by software and/or hardware and may be configured in an electronic device. As shown in fig. 4, the contamination detection apparatus 400 may include: an image acquisition module 410, a detection zone division module 420, and a contamination detection module 430, wherein,
an image obtaining module 410, configured to obtain an original image of a surface of an object to be detected;
a detection area dividing module 420, configured to divide a detection area of the original image to obtain at least two detection areas;
and the contamination detection module 430 is configured to perform contamination detection on at least two detection areas in parallel to obtain a contamination condition of the object to be detected.
According to the technical scheme, the detection regions are divided from the original image, so that the problem that the original image is too large and the gray distribution is not uniform can be effectively solved, the gray of the pixel points in each detection region tends to be uniform, the inaccuracy of the detection result caused by the large gray difference of different regions in the original image is prevented, and the precision of dirt detection is improved. And, carry out parallel detection to each detection zone, can effectively promote detection speed.
In an alternative embodiment, the contamination detection module 430 may include:
the detection area expansion unit is used for performing pixel expansion on the detection areas aiming at each detection area when the at least two detection areas are subjected to pollution detection in parallel to obtain corresponding expanded detection areas and determining the pollution condition of the detection areas corresponding to the expanded detection areas;
and the contamination detection unit is used for determining the contamination condition of the object to be detected according to the contamination condition of the corresponding extended detection area of each detection area.
In an alternative embodiment, the detection area expanding unit may include:
the gray level invalidation subunit is used for setting the gray level value of each pixel point in the target area of the original image as a preset invalid value to obtain a target image; the target area is a complementary area of the extended detection area corresponding to the detection area in the original image;
and the local contamination detection subunit is used for carrying out contamination detection on the target image to obtain a local contamination area of the detection area corresponding to the extended detection area.
In an optional embodiment, the contamination detection unit may include:
and the global dirty area determining subunit is used for determining the global dirty area of the object to be detected in the original image according to the position information of the local dirty area corresponding to each detection area.
In an alternative embodiment, the local contamination detection subunit may include:
a threshold division slave unit for performing threshold division on the extended detection area corresponding to the detection area;
and the local dirty area determining slave unit is used for carrying out image enhancement on the threshold segmentation result and carrying out feature extraction on the image enhancement result to obtain a local dirty area of the detection area corresponding to the expanded detection area.
In an alternative embodiment, the detection area dividing module 420 may include:
the pixel dividing unit is used for carrying out pixel division on the original image according to the pixel number of the original image;
and the detection area determining unit is used for determining at least two detection areas according to the pixel division result.
In an optional implementation manner, the pixel dividing unit may further include:
and the pixel averaging sub-unit is used for carrying out region uniform division on the original image according to the pixel number of the original image.
The stain detection device provided by the embodiment of the application can execute the stain detection method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing various stain detection methods.
EXAMPLE five
Fig. 5 is a structural diagram of an electronic device according to a fifth embodiment of the present application. FIG. 5 illustrates a block diagram of an exemplary electronic device 512 suitable for use in implementing embodiments of the present application. The electronic device 512 illustrated in fig. 5 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present application.
As shown in fig. 5, electronic device 512 is in the form of a general purpose computing device. Components of the electronic device 512 may include, but are not limited to: one or more processors or processing units 516, a system memory 528, and a bus 518 that couples the various system components including the system memory 528 and the processing unit 516.
Bus 518 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 512 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 512 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 528 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)530 and/or cache memory 532. The electronic device 512 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 534 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 518 through one or more data media interfaces. Memory 528 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 540 having a set (at least one) of program modules 542, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in, for example, the memory 528, each of which examples or some combination may include an implementation of a network environment. The program modules 542 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 512 may also communicate with one or more external devices 514 (e.g., keyboard, pointing device, display 524, etc.), with one or more devices that enable a user to interact with the electronic device 512, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 512 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 522. Also, the electronic device 512 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 520. As shown, the network adapter 520 communicates with the other modules of the electronic device 512 via the bus 518. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 512, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 516 executes various functional applications and data processing by executing at least one of other programs stored in the system memory 528, for example, to implement a contamination detection method provided by the embodiment of the present application.
EXAMPLE six
A sixth embodiment of the present application further provides a computer-readable storage medium, on which a computer program (or referred to as computer-executable instructions) is stored, where the program, when executed by a processor, is configured to perform a contamination detection method provided in the embodiment of the present application: acquiring an original image of the surface of an object to be detected; dividing the detection areas of the original image to obtain at least two detection areas; and carrying out contamination detection on at least two detection areas in parallel to obtain the contamination condition of the object to be detected.
The computer storage media of the embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A contamination detection method, comprising:
acquiring an original image of the surface of an object to be detected;
dividing the detection areas of the original image to obtain at least two detection areas;
and carrying out contamination detection on at least two detection areas in parallel to obtain the contamination condition of the object to be detected.
2. The method according to claim 1, wherein the performing the detection process on at least two detection areas in parallel to obtain the contamination condition of the substance to be detected comprises:
when the at least two detection areas are subjected to the contamination detection in parallel, performing pixel expansion on the detection areas aiming at the detection areas to obtain corresponding expanded detection areas, and determining the contamination condition of the corresponding expanded detection areas of the detection areas;
and determining the dirt condition of the object to be detected according to the dirt condition of the corresponding expanded detection area of each detection area.
3. The method of claim 2, wherein determining that the detection zone corresponds to a smudging condition of the extended detection zone comprises:
setting the gray value of each pixel point in the target area of the original image as a preset invalid value to obtain a target image; the target area is a complementary area of the extended detection area corresponding to the detection area in the original image;
and performing dirt detection on the target image to obtain a local dirt area of the detection area corresponding to the extended detection area.
4. The method of claim 3, wherein determining the presence of a contaminant in the analyte based on the presence of a contaminant in the extended detection zone corresponding to each of the detection zones comprises:
and determining a global dirty area of the object to be detected in the original image according to the position information of the local dirty area corresponding to each detection area.
5. The method of claim 2, wherein determining that the detection zone corresponds to a localized smudging area of the extended detection zone comprises:
carrying out threshold segmentation on the extended detection area corresponding to the detection area;
and carrying out image enhancement on the threshold segmentation result, and carrying out feature extraction on the image enhancement result to obtain a local dirty area of the detection area corresponding to the expanded detection area.
6. The method according to any one of claims 1 to 5, wherein the detecting area dividing the original image to obtain at least two detecting areas comprises:
performing pixel division on the original image according to the number of pixels of the original image;
and determining at least two detection areas according to the pixel division result.
7. The method of claim 6, wherein the pixel-dividing the original image according to the number of pixels of the original image comprises:
and according to the number of pixels of the original image, uniformly dividing the area of the original image.
8. A contamination detection apparatus, comprising:
the image acquisition module is used for acquiring an original image of the surface of the object to be detected;
the detection area division module is used for dividing the detection areas of the original image to obtain at least two detection areas;
and the contamination detection module is used for carrying out contamination detection on at least two detection areas in parallel to obtain the contamination condition of the object to be detected.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a soil detection method as claimed in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a contamination detection method according to any one of claims 1 to 7.
CN202111506728.8A 2021-12-10 2021-12-10 Smudginess detection method, device, equipment and storage medium Pending CN114283124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111506728.8A CN114283124A (en) 2021-12-10 2021-12-10 Smudginess detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111506728.8A CN114283124A (en) 2021-12-10 2021-12-10 Smudginess detection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114283124A true CN114283124A (en) 2022-04-05

Family

ID=80871602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111506728.8A Pending CN114283124A (en) 2021-12-10 2021-12-10 Smudginess detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114283124A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082473A (en) * 2022-08-22 2022-09-20 小米汽车科技有限公司 Dirt detection method and device and electronic equipment
CN115876785A (en) * 2023-02-02 2023-03-31 苏州誉阵自动化科技有限公司 Visual identification system for product defect detection

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082473A (en) * 2022-08-22 2022-09-20 小米汽车科技有限公司 Dirt detection method and device and electronic equipment
CN115082473B (en) * 2022-08-22 2023-06-20 小米汽车科技有限公司 Dirt detection method and device and electronic equipment
CN115876785A (en) * 2023-02-02 2023-03-31 苏州誉阵自动化科技有限公司 Visual identification system for product defect detection

Similar Documents

Publication Publication Date Title
US11587219B2 (en) Method and apparatus for detecting pixel defect of optical module, and device
CN114283124A (en) Smudginess detection method, device, equipment and storage medium
CN111986159B (en) Electrode defect detection method and device for solar cell and storage medium
CN110781839A (en) Sliding window-based small and medium target identification method in large-size image
CA2880345C (en) Hit testing method and apparatus
WO2022110219A1 (en) Inspection method, device, and system for display panel
CN111325717B (en) Mobile phone defect position identification method and equipment
CN114519714B (en) Method and system for judging smudgy defect of display screen
WO2017120796A1 (en) Pavement distress detection method and apparatus, and electronic device
CN115937101A (en) Quality detection method, device, equipment and storage medium
US20200388017A1 (en) System, apparatus and method for facilitating inspection of a target object
CN108804978B (en) Layout analysis method and device
CN112651315A (en) Information extraction method and device of line graph, computer equipment and storage medium
US20210012509A1 (en) Image processing method and computer-readable recording medium having recorded thereon image processing program
CN115908988A (en) Defect detection model generation method, device, equipment and storage medium
CN115690089A (en) Image enhancement preprocessing method and system for weak defect detection
US11408831B2 (en) Information processing apparatus, information processing method, and recording medium
JP7449739B2 (en) Inspection system, learning device, learning program, learning method, inspection device, inspection program, inspection method
CN114359166A (en) Screen color detection method, device, equipment and storage medium
CN114359160A (en) Screen detection method and device, electronic equipment and storage medium
WO2021192627A1 (en) Inspection system, learning device, learning program, learning method, inspection device, inspection program, and inspection method
CN117173185B (en) Method and device for detecting area of rolled plate, storage medium and computer equipment
CN114298984B (en) Method and device for detecting screen penetration line, electronic equipment and storage medium
CN117351011B (en) Screen defect detection method, apparatus, and readable storage medium
JPH09245166A (en) Pattern matching device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination