CN107358598A - A kind of scratch detection method and apparatus - Google Patents

A kind of scratch detection method and apparatus Download PDF

Info

Publication number
CN107358598A
CN107358598A CN201710373831.7A CN201710373831A CN107358598A CN 107358598 A CN107358598 A CN 107358598A CN 201710373831 A CN201710373831 A CN 201710373831A CN 107358598 A CN107358598 A CN 107358598A
Authority
CN
China
Prior art keywords
image
detected
thing
noise
cut
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
CN201710373831.7A
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.)
Shanghai Maher Intelligent Technology Co Ltd
Original Assignee
Shanghai Maher 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 Shanghai Maher Intelligent Technology Co Ltd filed Critical Shanghai Maher Intelligent Technology Co Ltd
Priority to CN201710373831.7A priority Critical patent/CN107358598A/en
Publication of CN107358598A publication Critical patent/CN107358598A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The present invention relates to image processing field, discloses a kind of scratch detection method and apparatus.The scratch detection method includes:Obtain first image on thing surface to be detected;Denoising is carried out to the first image, obtains second image on the thing surface to be detected after denoising;Judge to whether there is standard scratch in the second image, and show judged result.Embodiment of the present invention additionally provides a kind of scratch detection device.Allow to effectively detect the cut on thing surface to be detected, meanwhile, substantial amounts of manpower can be saved.

Description

A kind of scratch detection method and apparatus
Technical field
The present invention relates to image processing field, more particularly to a kind of scratch detection method and apparatus.
Background technology
With the fast development of electronic product, the requirement of Quality of electronic products is also increasingly stricter, such as, the electronics such as CD Product appearance small cut that is trickle, being visually difficult to see clearly is all considered as bad.Thus, the inspection of the electronic product such as CD gradually into For the link that lifting product quality is essential.In the prior art, mainly by manually observing the surfaces of the electronic products such as CD Whether cut is had, so as to judge whether the electronic products such as CD are qualified.
During the present invention is realized, inventor has found that at least there are the following problems in the prior art:On the one hand, every Production line is equipped with whether the electronic product surface such as manpower, white night boat stream detection CD has cut, causes human cost too high, Meanwhile manpower long-term work produces fatigue, easily judges by accident, so as to influence the testing result of product.On the other hand, existing skill Art can only detect obvious cut by manually observing, for it is tiny, be visually difficult to the cut differentiated, substantial amounts of mistake be present Sentence, that is to say, that because scratch area is less and less, human eye has been difficult to differentiate, and this causes the electronics such as artificial detection CD to produce Whether product surface has cut more and more difficult.
The content of the invention
The purpose of embodiment of the present invention is to provide a kind of scratch detection method and apparatus so that can effectively detect Go out the cut on thing surface to be detected, meanwhile, substantial amounts of manpower can be saved.
In order to solve the above technical problems, embodiments of the present invention provide a kind of scratch detection method, including:Acquisition is treated First image on detectable substance surface;Denoising is carried out to the first image, obtains the of the thing surface to be detected after denoising Two images;Judge to whether there is standard scratch in the second image, and show judged result.
Embodiments of the present invention additionally provide a kind of scratch detection device, including:Acquisition module, it is to be detected for obtaining First image on thing surface;Denoising module, for carrying out denoising to the first image, obtain the thing to be detected after denoising Second image on surface;Judge module, for judging to whether there is standard scratch in the second image, and show judged result.
Embodiment of the present invention in terms of existing technologies, terminal after first image on thing surface to be detected is obtained, Denoising can be carried out to above-mentioned first image, obtain second image on the thing surface to be detected after denoising.Due to Noise in one image can interfere to the detection of cut, thus, denoising is carried out to the first image, noise can be avoided Interference to scratch detection, be advantageous to more effectively detect the cut on thing surface to be detected.This way it is possible to avoid artificial detection The cut on thing surface to be detected, at the same can avoid it is a large amount of artificial to be equipped with production line, therefore, it is possible to save a large amount of manpowers into This.
In one embodiment, denoising is carried out to the first image, obtains the thing surface to be detected after denoising The second image, including:Binary conversion treatment is carried out to the first image, obtains the of the thing surface to be detected after binary conversion treatment Three images;By corroding the 3rd image, the first noise targets in the 3rd image are deleted;Wherein, the first noise targets are the 3rd Size is less than the noise spot of the first pre-set dimension in image;In the 3rd image, border interference target is deleted, obtains thing to be detected Second image on surface.In embodiment of the present invention, binary conversion treatment is carried out to the first image of acquisition, can be made through binaryzation The cut in the 3rd image after processing is distinguished with background to be become apparent from, so as to be advantageous to the detection of cut.By corroding the 3rd figure Picture, delete size in the 3rd image and be less than the noise spot of the first pre-set dimension, and delete border interference target, obtain to be detected Second image on thing surface, this way it is possible to avoid the interference of noise spot and border interference target to scratch detection, so as to More effectively detect the cut on thing surface to be detected.
In one embodiment, after deleting the first noise targets in the 3rd image, the thing surface to be detected is obtained The second image before, including:Delete the second noise targets in the 3rd image;Wherein, the second noise targets are in the 3rd image Size is more than the noise spot of the second pre-set dimension, and the second pre-set dimension is more than the first pre-set dimension.Embodiment of the present invention can be with After the size in deleting the 3rd image is less than the first noise targets of the first pre-set dimension, still there is size to be more than second default In the presence of second noise targets of size, above-mentioned second noise targets are deleted, so, can be deleted in the 3rd image in background Various sizes noise spot, avoid background in the 3rd image because noise spot be present and the detection to cut produces interference, from And it can effectively detect the cut on thing surface to be detected.
In one embodiment, judge to whether there is standard scratch in the second image, specifically include:In the second image When detecting cut particle, the maximum Feret's diameter of the cut particle in the second image is obtained;If do not examined in the second image Measure cut particle or cut particle meets preparatory condition, then judge that thing to be detected is qualified;Preparatory condition be cut particle most Big Feret's diameter is less than or equal to predetermined threshold value;If the maximum Feret's diameter of cut particle is more than predetermined threshold value, judge Cut particle is standard scratch, judges that thing to be detected is unqualified.In embodiment of the present invention, terminal can be detected in the second image With the presence or absence of cut particle, and can be when detecting cut particle, by the maximum Feret's diameter for judging cut particle Whether it is more than predetermined threshold value, judges whether above-mentioned cut particle is standard scratch.The cut that terminal can also detect in judgement When particle is standard scratch, thing to be detected is judged for substandard product, so so that the cut for detecting thing surface to be detected has more Feasibility, so as to effectively detect the cut on thing surface to be detected.
Brief description of the drawings
Fig. 1 is the flow chart according to the scratch detection method of first embodiment of the invention;
Fig. 2 is the flow chart according to the scratch detection method of second embodiment of the invention;
Fig. 3 is the structure chart according to the scratch detection device of third embodiment of the invention;
Fig. 4 is the structure chart according to the scratch detection device of four embodiment of the invention.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, each reality below in conjunction with accompanying drawing to the present invention The mode of applying is explained in detail.However, it will be understood by those skilled in the art that in each embodiment of the present invention, In order that reader more fully understands the application and proposes many ins and outs.But even if without these ins and outs and base Many variations and modification in following embodiment, the application technical scheme claimed can also be realized.
The first embodiment of the present invention is related to a kind of scratch detection method, as shown in figure 1, including:
Step 101:Obtain first image on thing surface to be detected.
Specifically, terminal can call camera software interface, to be checked with default resolution ratio and the shooting of default gray-level Thing is surveyed, obtains first image on thing surface to be detected.Wherein, thing to be detected can be the production such as display screen of CD, tablet personal computer Product.
More specifically, terminal according to information such as the model of camera, screen sizes, can pre-set the resolution ratio of camera With gray-level so that captured when camera shoots the image on thing surface to be detected using default resolution ratio with gray-level Image it is most clear.After the resolution ratio of default camera and gray-level, terminal can transfer the self-contained software of camera and connect Mouthful, adjust the focusing of camera, the time for exposure reaches default resolution ratio and gray-level with backlight time so that camera.In camera When shooting first image on thing surface to be detected with default resolution ratio and gray-level, terminal can read above-mentioned first online Image, and the first image can be further processed.
Step 102:Binary conversion treatment is carried out to the first image, obtains the of the thing surface to be detected after binary conversion treatment Three images.
Specifically, terminal can pre-set a gray value, and according to default gray value, treat detectable substance surface First image carries out binary conversion treatment, i.e. the gray value that gray value in the first image is more than to the pixel of default gray value is used 255 are represented, gray value is represented less than the gray value of the pixel of default gray value with 0 in the first image, so as to obtain through two-value 3rd image on the thing surface to be detected after change processing, so, can make cut and background that the needs in the 3rd image detect Contrast become apparent from, be advantageous to effectively detect the cut on thing surface to be detected.
Step 103:By corroding the 3rd image, the first noise targets in the 3rd image are deleted.Wherein, the first noise mesh It is designated as the noise spot that size in the 3rd image is less than the first pre-set dimension.
Specifically, noise spot in the background in the 3rd image after binary conversion treatment also be present, the noise in background Point can interfere to detection cut.In actual applications, terminal can draw the profile of each noise spot in the 3rd image, and unite Count the size of each noise spot.Terminal can be by the border of each noise dot profile to contract so that what each noise dot profile closed on Pixel replaces noise spot, so as to delete the first noise targets that size in the 3rd image is less than the first pre-set dimension.
Step 104:Delete the second noise targets in the 3rd image.Wherein, the second noise targets are chi in the 3rd image The very little noise spot for being more than the second pre-set dimension, the second pre-set dimension are more than the first pre-set dimension.
Specifically, when also having the second noise targets after the first noise targets are deleted, in the 3rd image, terminal can incite somebody to action The gray value of above-mentioned second noise targets is replaced with the Mesophyticum of the gray value of all pixels point in the second noise targets neighborhood, So as to delete above-mentioned second noise targets.
Step 105:In the 3rd image, border interference target is deleted, obtains second image on thing surface to be detected.
Specifically, terminal can be by the gray value of the noise spot of boundary in the 3rd image institute in the noise vertex neighborhood The Mesophyticum for having the gray value of pixel replaces, meanwhile, virtualization processing is done to the border of the 3rd image, so as to delete the 3rd figure Border interference target as in, obtains second image on thing surface to be detected.
Step 106:Judge to whether there is standard scratch in the second image, and show judged result.
Specifically, after second image on thing surface to be detected is obtained, terminal can be each in the second image by detecting The gray value of pixel, detect in the second image and whether there is cut particle.Cut grain of the terminal in the second image is detected After son, the diameter of each cut particle can be calculated, meanwhile, when detecting that multiple cut particles form cut because being connected, eventually End can also calculate the overall diameter of connected multiple cut particles, and be drawn as what multiple cut particles were formed because being connected The diameter of trace.Further, terminal can will be isolated cut particle delete, meanwhile, can count it is above-mentioned be calculated it is multiple The diameter for the cut that cut particle is formed because being connected, and can be when the diameter of above-mentioned cut is more than preset diameters, will be upper State cut and be determined as standard scratch, be unqualified so as to be determined with the thing to be detected of standard scratch.
Embodiment of the present invention in terms of existing technologies, terminal after first image on thing surface to be detected is obtained, Denoising can be carried out to above-mentioned first image, obtain second image on the thing surface to be detected after denoising.Due to Noise in one image can interfere to the detection of cut, thus, denoising is carried out to the first image, noise can be avoided Interference to scratch detection, be advantageous to more effectively detect the cut on thing surface to be detected.This way it is possible to avoid artificial detection The cut on thing surface to be detected, at the same can avoid it is a large amount of artificial to be equipped with production line, therefore, it is possible to save a large amount of manpowers into This.
Second embodiment of the present invention is related to a kind of scratch detection method, embodiment of the present invention and first embodiment It is roughly the same, it is in place of the main distinction:In embodiment of the present invention, it is proposed that another kind judges to whether there is in the second image The method of standard scratch, embodiment of the present invention can be more than default threshold in the maximum Feret's diameter of the cut particle detected During value, it is standard scratch to judge above-mentioned cut particle, and thing to be detected is substandard product.As shown in Fig. 2 specifically include:
Step 201:Obtain first image on thing surface to be detected.
Specifically, terminal can call camera software interface, to be checked with default resolution ratio and the shooting of default gray-level Thing is surveyed, obtains first image on thing surface to be detected.Wherein, thing to be detected can be the production such as display screen of CD, tablet personal computer Product.
More specifically, terminal according to information such as the model of camera, screen sizes, can pre-set the resolution ratio of camera With gray-level so that captured when camera shoots the image on thing surface to be detected using default resolution ratio with gray-level Image it is most clear.After the resolution ratio of default camera and gray-level, terminal can transfer the self-contained software of camera and connect Mouthful, adjust the focusing of camera, the time for exposure reaches default resolution ratio and gray-level with backlight time so that camera.In camera When shooting first image on thing surface to be detected with default resolution ratio and gray-level, terminal can read above-mentioned first online Image, and the first image can be further processed.
Step 202:Denoising is carried out to the first image, obtains second figure on the thing surface to be detected after denoising Picture.
Specifically, terminal can pre-set a gray value, and according to default gray value, treat detectable substance surface First image carries out binary conversion treatment.After binary conversion treatment, noise spot in the background in the first image also be present, in background Noise spot can interfere to detection cut.In actual applications, terminal can draw it is above-mentioned after binary conversion treatment first The profile of each noise spot in image.Terminal can be by the border of each noise dot profile to contract so that each noise dot profile faces Near pixel replaces noise spot, so as to delete the first noise in image point.Terminal can also be by above-mentioned first image The gray value of the noise spot of boundary is replaced with the Mesophyticum of the gray value of all pixels point in the noise vertex neighborhood, meanwhile, to Virtualization processing is done on the border of one image, so as to delete the border interference target in the first image, obtains thing surface to be detected The second image.
Step 203:When cut particle is detected in the second image, the maximum of cut particle obtained in the second image takes Thunder spy's diameter.
Specifically, after second image on thing surface to be detected is obtained, terminal can be according to each pixel in the second image The gray value of point, detect in the second image and whether there is cut particle.If cut particle is detected in the second image, terminal Each cut particle detected can be numbered, and it is possible to obtain the maximum Feret's diameter of above-mentioned each cut particle.
Step 204:Judge whether the maximum Feret's diameter of cut particle is more than predetermined threshold value.
Specifically, cut particle is detected in the second image, and gets the maximum Fei Leite of above-mentioned cut particle During diameter, terminal can judge above-mentioned by the maximum Feret's diameter of the cut particle of acquisition compared with default threshold value Whether the maximum Feret's diameter of cut particle is more than predetermined threshold value, if the maximum Feret's diameter of cut particle is more than default threshold Value, then can perform step 205, if the maximum Feret's diameter of cut particle is less than or equal to predetermined threshold value, can perform Step 206.
Step 205:Judge that cut particle is standard scratch, judge that thing to be detected is unqualified, and show judged result.
Specifically, if the maximum Feret's diameter of cut particle is more than predetermined threshold value, terminal can be determined that maximum expense The cut particle that thunder spy diameter is more than predetermined threshold value is standard scratch, simultaneously, it is possible to determine that thing to be detected is unqualified, and terminal may be used also To show above-mentioned judged result by display screen.
For example, after terminal detects five cut particles in the second image of thing to be detected, above-mentioned five can be drawn Trace particle is numbered respectively from 1 to 5, meanwhile, the maximum Fei Leite that terminal can obtain above-mentioned five cut particles respectively is straight Footpath, and by the maximum Feret's diameter of above-mentioned acquisition respectively compared with predetermined threshold value, wherein, the default threshold value of terminal is 200 pixels.After the comparison, terminal can obtain No. 3 cut particles and No. 5 cut particles more than predetermined threshold value, wherein, No. 3 The maximum Feret's diameter of cut particle is 762.21 pixels, and No. 5 cut particles are 270.90 pixels, and other cut particles Then there was only a few to tens of pixel values.So as to which terminal can be determined that No. 3 cut particles and No. 5 cut particles are standard scratch, together When, it is possible to determine that this thing to be detected is substandard product.
Step 206:Judge that thing to be detected is qualified, and show judged result.
Specifically, if the maximum Feret's diameter of cut particle is less than or equal to predetermined threshold value, terminal, which can be determined that, to be treated Detectable substance is qualified, and shows judged result.
It should be noted that in embodiment of the present invention, if terminal is not detected by cut particle in the second image, equally It can be determined that thing to be detected is qualified.
In embodiment of the present invention, first image of the terminal on the thing surface to be detected to acquisition carries out denoising, obtains After second image on the thing surface to be detected after to denoising, terminal, which can detect, whether there is cut grain in the second image Son, and can be when detecting cut particle, by judging whether the maximum Feret's diameter of cut particle is more than default threshold Value, judges whether above-mentioned cut particle is standard scratch.Terminal can also be standard scratch in the cut particle for judging to detect When, thing to be detected is judged for substandard product, so so that the cut for detecting thing surface to be detected is more feasible, so as to Effectively to detect the cut on thing surface to be detected.
The step of various methods divide above, be intended merely to describe it is clear, can be merged into when realizing a step or Some steps are split, are decomposed into multiple steps, as long as including identical logical relation, all protection domain in this patent It is interior;To either adding inessential modification in algorithm in flow or introducing inessential design, but its algorithm is not changed Core design with flow is all in the protection domain of the patent.
Third embodiment of the invention is related to a kind of scratch detection device, and the scratch detection device includes:Acquisition module, go Module of making an uproar and judge module, as shown in Figure 3.
Scratch detection device 300 includes acquisition module 301, denoising module 302 and judge module 303.
Acquisition module 301 can be used for the first image for obtaining thing surface to be detected.
Specifically, acquisition module 301 can call camera software interface, be clapped with default resolution ratio with default gray-level Thing to be detected is taken the photograph, obtains first image on thing surface to be detected.Wherein, thing to be detected can be the display of CD, tablet personal computer The products such as screen.
Wherein, acquisition module 301 also includes calling submodule 3011 and image acquisition submodule 3012.
Submodule 3011 is called to can be used for calling camera software interface.
Specifically, submodule 3011 is called to pre-set camera according to information such as the model of camera, screen sizes Resolution ratio and gray-level so that camera shoots the image on thing surface to be detected using default resolution ratio and gray-level When, captured image is most clear.After the resolution ratio of default camera and gray-level, submodule 3011 is called to transfer phase The self-contained software interface of machine, adjust the focusing of camera, the time for exposure reaches default resolution with backlight time so that camera Rate and gray-level.
Image acquisition submodule 3012 can be used for shooting thing to be detected with default gray-level with default resolution ratio, be treated First image on detectable substance surface.
Specifically, when camera shoots first image on thing surface to be detected with default resolution ratio and gray-level, Image acquisition submodule 3012 can read above-mentioned first image online, and the first image further can be located Reason.
Denoising module 302 can be used for carrying out denoising to the first image, obtain the thing surface to be detected after denoising The second image.
Wherein, denoising module 302 can include the 3rd image acquisition submodule 3021, the first noise targets delete submodule 3022nd, the second noise targets delete the image acquisition submodule 3024 of submodule 3023 and second.
3rd image acquisition submodule 3021 can be used for carrying out binary conversion treatment to the first image, obtain through binary conversion treatment 3rd image on thing surface to be detected afterwards.
Specifically, the 3rd image acquisition submodule 3021 can pre-set a gray value, and according to default gray scale Value, the first image for treating detectable substance surface carry out binary conversion treatment, i.e. gray value in the first image is more than into default gray value The gray value of pixel represent that gray value is less than 0 table of the gray value of the pixel of default gray value in the first image with 255 Show, so as to obtain the 3rd image on the thing surface to be detected after binary conversion treatment, so, the needs in the 3rd image can be made The cut of detection and the contrast of background become apparent from, and are advantageous to effectively detect the cut on thing surface to be detected.
First noise targets delete submodule 3022 and can be used for, by corroding the 3rd image, deleting first in the 3rd image Noise targets.Wherein, the first noise targets are the noise spot that size is less than the first pre-set dimension in the 3rd image.
Specifically, noise spot in the background in the 3rd image after binary conversion treatment also be present, the noise in background Point can interfere to detection cut.In actual applications, the first noise targets, which delete submodule 3022, can draw the 3rd figure The profile of each noise spot as in, and count the size of each noise spot.First noise targets are deleted submodule 3022 and will can respectively made an uproar The border of sound dot profile is to contract so that the pixel that each noise dot profile closes on replaces noise spot, so as to delete Size is less than the first noise targets of the first pre-set dimension in three images.
Second noise targets delete submodule 3023 and can be used for deleting the second noise targets in the 3rd image.Wherein, Two noise targets are the noise spot that size is more than the second pre-set dimension in the 3rd image, and the second pre-set dimension is more than the first default chi It is very little.
Specifically, when also having the second noise targets after the first noise targets are deleted, in the 3rd image, the second noise mesh Mark deletes submodule 3023 can be by all pictures of the gray value of above-mentioned second noise targets in the second noise targets neighborhood The Mesophyticum of the gray value of vegetarian refreshments replaces, so as to delete above-mentioned second noise targets.
Second image acquisition submodule 3024 can be used in the 3rd image, deletes border interference target, obtains to be detected Second image on thing surface.
Specifically, the second image acquisition submodule 3024 can be by the gray value of the noise spot of boundary in the 3rd image Replaced with the Mesophyticum of the gray value of all pixels point in the noise vertex neighborhood, meanwhile, virtualization processing is done to the border of the 3rd image, So as to delete the border interference target in the 3rd image, second image on thing surface to be detected is obtained.
Judge module 303 can be used for judging to whether there is standard scratch in the second image, and show judged result.
Specifically, after second image on thing surface to be detected is obtained, judge module 303 can be by detecting the second figure The gray value of each pixel as in, detects in the second image and whether there is cut particle.Judge module 303 is detecting the second figure After cut particle as in, the diameter of each cut particle can be calculated, meanwhile, detecting multiple cut particles because being connected and shape During into cut, judge module 303 can also calculate the overall diameter of connected multiple cut particles, and as multiple cut grains The diameter for the cut that son is formed because being connected.Further, judge module 303 can delete isolated cut particle, meanwhile, can To count the diameter for the cut that the above-mentioned multiple cut particles being calculated are formed because being connected, and can be in above-mentioned cut When diameter is more than preset diameters, above-mentioned cut is determined as standard scratch, so as to be determined with the thing to be detected of standard scratch To be unqualified.
Embodiment of the present invention in terms of existing technologies, terminal after first image on thing surface to be detected is obtained, Denoising can be carried out to above-mentioned first image, obtain second image on the thing surface to be detected after denoising.Due to Noise in one image can interfere to the detection of cut, thus, denoising is carried out to the first image, noise can be avoided Interference to scratch detection, be advantageous to more effectively detect the cut on thing surface to be detected.This way it is possible to avoid artificial detection The cut on thing surface to be detected, at the same can avoid it is a large amount of artificial to be equipped with production line, therefore, it is possible to save a large amount of manpowers into This.
It is seen that present embodiment is the device embodiment corresponding with first embodiment, present embodiment can be with First embodiment is worked in coordination implementation.The relevant technical details mentioned in first embodiment still have in the present embodiment Effect, in order to reduce repetition, is repeated no more here.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In first embodiment.
Four embodiment of the invention is related to a kind of scratch detection device, base of the 4th embodiment in the 3rd embodiment It is further optimized on plinth, main optimization part is that in embodiment of the present invention, judge module can include cut particle Detection sub-module, maximum Feret's diameter acquisition submodule and standard scratch judging submodule, as shown in Figure 4.
Scratch detection device 300 includes acquisition module 301, denoising module 302 and judge module 303.
Acquisition module 301 can be used for the first image for obtaining thing surface to be detected.
Specifically, acquisition module 301 can call camera software interface, be clapped with default resolution ratio with default gray-level Thing to be detected is taken the photograph, obtains first image on thing surface to be detected.Wherein, thing to be detected can be the display of CD, tablet personal computer The products such as screen.
Denoising module 302 can be used for carrying out denoising to the first image, obtain the thing surface to be detected after denoising The second image.
Specifically, denoising module 302 can pre-set a gray value, and according to default gray value, to be detected First image on thing surface carries out binary conversion treatment.After binary conversion treatment, noise spot also be present in the background in the first image, Noise spot in background can interfere to detection cut.In actual applications, denoising module 302 can draw above-mentioned through two-value The profile of each noise spot in the first image after change processing.Denoising module 302 can inwardly receive on the border of each noise dot profile Contracting so that the pixel that each noise dot profile closes on replaces noise spot, so as to delete the first noise in image point.Denoising mould Block 302 can also be by the gray value of the noise spot of boundary in above-mentioned first image all pixels point in the noise vertex neighborhood The Mesophyticum of gray value replaces, meanwhile, virtualization processing is done to the border of the first image, so as to delete the border in the first image Jamming target, obtain second image on thing surface to be detected.
Judge module 303 can be used for judging to whether there is standard scratch in the second image, and show judged result.
Judge module 303 can also include cut detection of particles submodule 3031, maximum Feret's diameter acquisition submodule 3032 with standard scratch judging submodule 3033.
The cut particle that cut detection of particles submodule 3031 can be used in the second image of detection.
Specifically, after second image on thing surface to be detected is obtained, cut detection of particles submodule 3031 can root According to the gray value of each pixel in the second image, detect in the second image and whether there is cut particle.
Maximum Feret's diameter acquisition submodule 3032 can be used for when cut particle is detected in the second image, obtain the The maximum Feret's diameter of cut particle in two images.
Specifically, if cut particle is detected in the second image, maximum Feret's diameter acquisition submodule 3032 Each cut particle detected can be numbered, and it is possible to obtain the maximum Feret's diameter of above-mentioned each cut particle.
Standard scratch judging submodule 3033 can be used for when the maximum Feret's diameter of cut particle is more than predetermined threshold value, Judge that cut particle is standard scratch.
Specifically, cut particle is detected in the second image, and gets the maximum Fei Leite of above-mentioned cut particle During diameter, standard scratch judging submodule 3033 can be by the maximum Feret's diameter of the cut particle of acquisition and default threshold value It is compared, if the maximum Feret's diameter of cut particle is more than predetermined threshold value, standard scratch judging submodule 3033 can be with Judge that the cut particle that maximum Feret's diameter is more than predetermined threshold value is standard scratch, simultaneously, it is possible to determine that thing to be detected does not conform to Lattice, and above-mentioned judged result can be shown by display screen.
In embodiment of the present invention, first image of the terminal on the thing surface to be detected to acquisition carries out denoising, obtains After second image on the thing surface to be detected after to denoising, terminal, which can detect, whether there is cut grain in the second image Son, and can be when detecting cut particle, by judging whether the maximum Feret's diameter of cut particle is more than default threshold Value, judges whether above-mentioned cut particle is standard scratch.Terminal can also be standard scratch in the cut particle for judging to detect When, thing to be detected is judged for substandard product, so so that the cut for detecting thing surface to be detected is more feasible, so as to Effectively to detect the cut on thing surface to be detected.
It is seen that present embodiment is the device embodiment corresponding with second embodiment, present embodiment can be with Second embodiment is worked in coordination implementation.The relevant technical details mentioned in second embodiment still have in the present embodiment Effect, in order to reduce repetition, is repeated no more here.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In second embodiment.
Device embodiment described above is only schematical, wherein can be as the unit that separating component illustrates Or may not be physically separate, it can be as the part that unit is shown or may not be physical location, i.e., A place can be located at, or can also be distributed on multiple NEs.It can select according to the actual needs therein Some or all of module realizes the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying the labor of creativeness In the case of dynamic, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Make to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation Method described in some parts of example or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.

Claims (10)

  1. A kind of 1. scratch detection method, it is characterised in that including:
    Obtain first image on thing surface to be detected;
    Denoising is carried out to described first image, obtains second image on the thing surface to be detected after denoising;
    Judge to whether there is standard scratch in second image, and show judged result.
  2. 2. scratch detection method according to claim 1, it is characterised in that first figure for obtaining thing surface to be detected Picture, including:Camera software interface is called, thing to be detected is shot with default gray-level with default resolution ratio, obtained described to be checked Survey first image on thing surface.
  3. 3. scratch detection method according to claim 1, it is characterised in that described to be carried out to described first image at denoising Reason, obtains second image on the thing surface to be detected after denoising, including:
    Binary conversion treatment is carried out to described first image, obtains the 3rd figure on the thing surface to be detected after binary conversion treatment Picture;
    By corroding the 3rd image, the first noise targets in the 3rd image are deleted;Wherein, the first noise mesh It is designated as the noise spot that size in the 3rd image is less than the first pre-set dimension;
    In the 3rd image, border interference target is deleted, obtains second image on the thing surface to be detected.
  4. 4. scratch detection method according to claim 3, it is characterised in that first in deletion the 3rd image After noise targets, before obtaining second image on the thing surface to be detected, in addition to:
    Delete the second noise targets in the 3rd image;Wherein, second noise targets are chi in the 3rd image The very little noise spot for being more than the second pre-set dimension, second pre-set dimension are more than first pre-set dimension.
  5. 5. scratch detection method according to claim 1, it is characterised in that described to judge whether deposited in second image In standard scratch, specifically include:
    When detecting cut particle in second image, the maximum of cut particle obtained in second image takes Thunder spy's diameter;
    If being not detected by cut particle in second image or the cut particle meeting preparatory condition, judge to be detected Thing is qualified;The preparatory condition is less than or equal to predetermined threshold value for the maximum Feret's diameter of the cut particle;
    If the maximum Feret's diameter of the cut particle is more than predetermined threshold value, it is standard scratch to judge the cut particle, Judge that thing to be detected is unqualified.
  6. A kind of 6. scratch detection device, it is characterised in that including:
    Acquisition module, for obtaining first image on thing surface to be detected;
    Denoising module, for carrying out denoising to described first image, obtain the thing surface to be detected after denoising The second image;
    Judge module, for judging to whether there is standard scratch in second image, and show judged result.
  7. 7. scratch detection device according to claim 6, it is characterised in that including:The acquisition module, including:
    Submodule is called, for calling camera software interface;
    Image acquisition submodule, for shooting thing to be detected with default gray-level with default resolution ratio, obtain described to be detected First image on thing surface.
  8. 8. scratch detection device according to claim 6, it is characterised in that including:The denoising module includes:
    3rd image acquisition submodule, for carrying out binary conversion treatment to described first image, obtain after binary conversion treatment 3rd image on the thing surface to be detected;
    First noise targets delete submodule, for by corroding the 3rd image, deleting first in the 3rd image Noise targets;Wherein, first noise targets are the noise spot that size is less than the first pre-set dimension in the 3rd image;
    Second image acquisition submodule, in the 3rd image, deleting border interference target, obtaining the thing to be detected Second image on surface.
  9. 9. scratch detection device according to claim 8, it is characterised in that the denoising module also includes the second noise mesh Mark deletes submodule;
    Second noise targets delete submodule and are used to delete the second noise targets in the 3rd image;Wherein, it is described Second noise targets are the noise spot that size is more than the second pre-set dimension in the 3rd image, and second pre-set dimension is more than First pre-set dimension.
  10. 10. scratch detection device according to claim 6, it is characterised in that including:The judge module includes:
    Cut detection of particles submodule, for detecting the cut particle in second image;
    Maximum Feret's diameter acquisition submodule, during for detecting the cut particle in second image, obtain institute State the maximum Feret's diameter of the cut particle in the second image;
    Standard scratch judging submodule, for when the maximum Feret's diameter of the cut particle is more than predetermined threshold value, judging The cut particle is standard scratch.
CN201710373831.7A 2017-05-24 2017-05-24 A kind of scratch detection method and apparatus Pending CN107358598A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710373831.7A CN107358598A (en) 2017-05-24 2017-05-24 A kind of scratch detection method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710373831.7A CN107358598A (en) 2017-05-24 2017-05-24 A kind of scratch detection method and apparatus

Publications (1)

Publication Number Publication Date
CN107358598A true CN107358598A (en) 2017-11-17

Family

ID=60272036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710373831.7A Pending CN107358598A (en) 2017-05-24 2017-05-24 A kind of scratch detection method and apparatus

Country Status (1)

Country Link
CN (1) CN107358598A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107991309A (en) * 2017-11-27 2018-05-04 歌尔股份有限公司 Product quality detection method, device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162073B1 (en) * 2001-11-30 2007-01-09 Cognex Technology And Investment Corporation Methods and apparatuses for detecting classifying and measuring spot defects in an image of an object
CN105388162A (en) * 2015-10-28 2016-03-09 镇江苏仪德科技有限公司 Raw material silicon wafer surface scratch detection method based on machine vision
CN105447854A (en) * 2015-11-12 2016-03-30 程涛 Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system
CN106157303A (en) * 2016-06-24 2016-11-23 浙江工商大学 A kind of method based on machine vision to Surface testing
CN106501265A (en) * 2016-10-13 2017-03-15 中国科学院自动化研究所 The binarization method of optical elements of large caliber surface scratch darkfield image and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162073B1 (en) * 2001-11-30 2007-01-09 Cognex Technology And Investment Corporation Methods and apparatuses for detecting classifying and measuring spot defects in an image of an object
CN105388162A (en) * 2015-10-28 2016-03-09 镇江苏仪德科技有限公司 Raw material silicon wafer surface scratch detection method based on machine vision
CN105447854A (en) * 2015-11-12 2016-03-30 程涛 Small-size glass panel surface defect detection method and small-size glass panel surface defect detection system
CN106157303A (en) * 2016-06-24 2016-11-23 浙江工商大学 A kind of method based on machine vision to Surface testing
CN106501265A (en) * 2016-10-13 2017-03-15 中国科学院自动化研究所 The binarization method of optical elements of large caliber surface scratch darkfield image and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
近藤直 等: "《农业机器人 1 基础与理论》", 31 May 2009 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107991309A (en) * 2017-11-27 2018-05-04 歌尔股份有限公司 Product quality detection method, device and electronic equipment

Similar Documents

Publication Publication Date Title
JP4160258B2 (en) A new perceptual threshold determination for gradient-based local contour detection
US7215829B2 (en) Method and system for object recognition using fractal map
US7257267B2 (en) Method and system for image segmentation
WO2010076882A1 (en) Image classification standard update method, program, and image classification device
Malarvel et al. An improved version of Otsu's method for segmentation of weld defects on X-radiography images
Miljkovic Image pre-processing tool
CN109060842B (en) Citrus surface defect detection method based on surface fitting correction
Govindarajan et al. Progressive edge detection on multi-bit images using polynomial-based binarization
CN108399382A (en) Vehicle insurance image processing method and device
CN107358598A (en) A kind of scratch detection method and apparatus
Nevriyanto et al. Image enhancement using the image sharpening, contrast enhancement, and Standard Median Filter (Noise Removal) with pixel-based and human visual system-based measurements
CN108827181B (en) Vision-based plate surface detection method
JP4247993B2 (en) Image inspection apparatus, image inspection method, control program, and readable storage medium
CN107358597A (en) A kind of glue point method of inspection and device
CN109658360B (en) Image processing method and device, electronic equipment and computer storage medium
JP2006133055A (en) Unevenness defect detection method and device, spatial filter, unevenness defect inspection system, and program for unevenness defect detection method
CN110717865A (en) Picture detection method and device
JP6819445B2 (en) Information processing equipment, control methods, and programs
WO2018176261A1 (en) Method for determining detection parameter, and detection device
Saini et al. Object Detection in Underwater Image by Detecting Edges using Adaptive Thresholding
CN103632374B (en) Unmarked augmented reality system and target tracking method thereof
Sankaran et al. Automated inspection of solder joints-a neural network approach
CN109543567B (en) Quantity determination method and device
Buczkowski et al. Comparison of effective coverage calculation methods for image quality assessment databases
CN110298797B (en) Millimeter wave image processing method based on convolutional neural network

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