A kind of multiple light courcess detection image acquisition methods and Machine Vision Inspecting System
Technical field
The present invention relates to industrial automation mechanical vision inspection technology fields, more particularly to a kind of multiple light courcess detection image
Acquisition methods and Machine Vision Inspecting System.
Background technique
The surface defect of industrial products brings different degrees of shadow to the aesthetics, comfort level and service performance etc. of product
It rings.In industrial products manufacture, detected with surface defect of the machine vision to product to find and to be controlled in time
System, can effectively improve product quality, reduce cost, and user satisfaction can be improved.Therefore, in the machine vision in modern industry
Surface defects detection technology obtain more and more extensive research and application.
Machine vision is the Science and Technology that biological Macrovision function is simulated with computer, with machine replace human eye come
It measures and judges.The test object being ingested is converted into image data by machine vision product by machine vision, at image
Reason system, according to the information such as pixel distribution and brightness, color, is converted into digital signal according to image recognition technology;Image procossing system
System carries out various image characteristics extractions to these digital signals, and then differentiates test object product according to the characteristics of image of extraction
Defect and defect classification.
In Machine Vision System Design, in occupation of critical role, visual illumination needs to consider machine-vision lighting system
Several factors, such as light source colour type, the intensity of illumination of light source, the shape of light source and layout, the controlling party of light source of light source
Formula, the selection of optical auxiliary device etc..Machine-vision lighting system determines the stability and machine vision of detection, measurement
It is able to solve the degree accuracy of problem.It is more to concentrate on beating for light source in actual machine vision light source use process
These aspects of light mode and the type selecting of light source are studied.Currently, existing NI Vision Builder for Automated Inspection uses a light source pair
Answer an image acquiring device, such as camera, single-station design.The light of defect recognition is especially carried out to product in production line
In the use in source, status is substantially a camera with a unification light source working, therefore only when NI Vision Builder for Automated Inspection identifies defect
It can be analyzed based on a kind of target image at visual angle, the accuracy and recall rate of defects detection be not high.
Therefore, existing mechanical vision inspection technology has yet to be improved and developed.
Summary of the invention
For the technical problem present on, light supply apparatus high speed stroboscopic can be made and obtain with image the present invention by providing one kind
Device high-speed synchronous is so that the wheel of single image acquisition device one obtains the synthesis detection image under multiple light sources, sufficiently exposure defect
To improve the accuracy of defects detection and the multiple light courcess detection image acquisition methods and Machine Vision Inspecting System of recall rate.
In a first aspect, the technical solution that embodiment of the present invention provides is: providing a kind of multiple light courcess detection image acquisition side
Method, is used to form the detection image of test object, including N number of light supply apparatus, and the image acquisition step of single source device includes:
Reference clock information is sent to image acquiring device, which carries out this according to the reference clock information
Ground clock compensation;
Reference clock information is sent to light supply apparatus, which carries out local clock benefit according to the reference clock information
It repays;
Shooting instruction, figure while lighting the light supply apparatus are sent to the image acquiring device and light supply apparatus simultaneously
As acquisition device shoots a line detection data for obtaining present image and forming the detection image.
The multiple light courcess detection image acquisition methods further include:
The image acquiring device is set to repeat the image data acquisition step of the single source device, to generate N row testing number
According to synthesizing the N row detection data and form the detection image.
The multiple light courcess detection image acquisition methods further include photoelectric conversion compensation process, for each of the present image
Pixel carries out Gamma correction according to photoelectric conversion penalty coefficient table.
Wherein, which is distributed on three-dimensional space around the test object;
When the image acquiring device completes local according to the response curve that the reference clock information and photoelectric conversion compensate
Clock compensation;
The light supply apparatus is completed local clock according to the response curve that the reference clock information and photoelectric conversion compensate and is mended
It repays.
Second aspect, the technical solution that embodiment of the present invention provides is: providing a kind of Machine Vision Inspecting System, is used for
The defect of visual analysis test object, including being set to the image synthesis module of image acquiring device, main synchronization module, connecting and be somebody's turn to do
Main synchronization module and be set to the first of image acquiring device be arranged from synchronization module and corresponding N number of light supply apparatus N number of the
Two from synchronization module,
The image acquiring device obtain single source device detection data when, the main synchronization module be used for this first from
Synchronization module send reference clock information, this first from synchronization module according to the reference clock information carry out local clock compensation;
The main synchronization module is also used to send reference clock information to single second from synchronization module, receives the of the reference clock information
Two carry out local clock compensation from synchronization module;The main synchronization module is also used to simultaneously to the image acquiring device and light supply apparatus
Shooting instruction is sent, image acquiring device shooting obtains current figure while lighting the light supply apparatus for receiving the shooting instruction
Picture and a line detection data for forming detection image.
In the Machine Vision Inspecting System, which further includes first detection module, which uses
In making the image acquiring device obtain detection data when each light supply apparatus is individually lighted to generate N row detection data, the figure
As synthesis module forms detection image for synthesizing the N row detection data.
This device vision detection system further includes photoelectric conversion compensating module, which is used for deserving
Each pixel of preceding image carries out Gamma correction according to photoelectric conversion penalty coefficient table.
The Machine Vision Inspecting System further includes the conveying mechanism for loading the test object, the movement velocity of the test object
Less than the time for exposure of the image acquiring device and the product of N.
The Machine Vision Inspecting System further includes the sensing device for sensing the test object, which is connected to
The isochronous controller, the isochronous controller start the main synchronization module according to the feedback information of the sensing device, N number of light source dress
The detection motion profile set around the test object is distributed on three-dimensional space.
In the Machine Vision Inspecting System, which further includes the second detection mould of determining vision-based detection scheme
Block, second detection module include subscriber interface module, and user sets the vision of the test object by the subscriber interface module
Detection scheme.
In order to realize detection surface defect, the image acquiring device and isochronous controller connection should for visual analysis
The calculation server of detection image, the calculation server include surface deficiency analysis module.
When it is implemented, the main synchronization module includes Transmit-Receive Unit and driving unit, the Transmit-Receive Unit is for sending this
Reference clock information, the driving unit is for sending the shooting instruction.
The beneficial effect of embodiment of the present invention is: multiple light courcess detection image acquisition methods and the machine view of the present embodiment
Feel detection system, light supply apparatus high speed stroboscopic can be made and with image acquiring device high-speed synchronous so that single image acquisition device one
Wheel obtains the synthesis detection image under multiple light sources, exposes defect sufficiently to improve the accuracy and recall rate of defects detection.This
Inventive embodiments use one camera multiple light courcess technique for taking, are realized under multiple light courcess high speed strobe light by isochronous controller, one
Image acquiring device can synthesize the image of two kinds and the above polishing angle, to highlight same surface in the test object
Different defect effects of the defect under different polishing angles, then the image by synthesizing different polishing angles are detection figure
Picture includes the detection image of the different imaging effects of same defect, the inspection that calculation server can be very quick, stable according to this
It measures surface defect and more reliable defect classification can be carried out to various surface defects.
Detailed description of the invention
Fig. 1 is the broad flow diagram of the multiple light courcess detection image acquisition methods of the embodiment of the present invention;
Fig. 2 is the system construction drawing of the first embodiment of the Machine Vision Inspecting System of the embodiment of the present invention;
Fig. 3 is the specific flow chart of the multiple light courcess detection image acquisition methods of the embodiment of the present invention;
Fig. 4 is the system construction drawing of the second embodiment of the Machine Vision Inspecting System of the embodiment of the present invention;
Fig. 5 is the system module frame diagram of the Machine Vision Inspecting System of the embodiment of the present invention;
Fig. 6 is the light supply apparatus layout diagram of the Machine Vision Inspecting System of the embodiment of the present invention;And
Fig. 7 is the figure under the conditions of the monochromatic light source device different angle polishing of the Machine Vision Inspecting System of the embodiment of the present invention
As effect picture.
Specific embodiment
Understand in order to make the object, technical scheme and advantages of the embodiment of the invention clearer, with reference to the accompanying drawing to this hair
Bright embodiment is described in further detail.Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but simultaneously
It is not as a limitation of the invention.
The present embodiment is related to multiple light courcess detection image acquisition methods and Machine Vision Inspecting System.Multiple light courcess detection figure
As acquisition methods are used to obtain and synthesize different defect images under different polishing angles to generate detection image, the machine vision
Detection system extracts the image feature information of the detection image based on the detection image according to image recognition technology, and is based on the figure
As characteristic information differentiates test object 6, such as defect and the defect classification of glass product.
The Machine Vision Inspecting System of the present embodiment is used to detect the surface defects of products on assembly line.The product surface can
To be that plane is also possible to curved surface.Such as the depth scratch defects or the scratch of colored printing product etc. of glass product.This
The Machine Vision Inspecting System of embodiment drafts different vision-based detection schemes according to the characteristics of test object 6, for example, glass produces
The detection image that the defect of product needs to synthesize three polishing angles carries out defect analysis.Or the defect of printing product only needs two
The detection image of a polishing angle can accurately complete defect analysis.
The multiple light courcess detection image acquisition methods and Machine Vision Inspecting System of the present embodiment, pass through isochronous controller 2
Realize multiple light courcess high speed strobe light, the program that multiple sets of light sources device is set according to isochronous controller 2, in turn high speed opening and pass
It closes, 1 synchronous high-speed of single image acquisition device shoots the effect image under each light supply apparatus, while single image acquisition device
1 can realize that the effect image for synthesizing multiple polishing angles forms final detection image, and the effect image of different polishing angles can
To highlight different defect effects of the same surface defect under different polishing angles in test object 6, to sufficiently expose product
Defect is to improve the accuracy and recall rate that product defects detect.
The polishing and synchronous control technique of N number of light supply apparatus of the invention can be such that single image acquisition device 1 cooperates
Multiple light sources device carries out picture catching, can not only meet the multi-angle imaging of test object 6, and is at least saved using device
About system cost of manufacture.The multiple light courcess device simultaneous techniques of present patent application and image composing technique are based on multi-angle polishing simultaneously
Technology can show more so that detection image contains the multi-angle image of captured test object 6 at a time
Defect details improve defect analysis accuracy rate and respective rate in 7 defect analysis of calculation server.
Multiple light courcess detection image acquisition methods of the invention and Machine Vision Inspecting System are based on synchronous images and absorb skill
Art makes high-speed capture multiple groups effect image while each light supply apparatus high speed strobe light of image acquiring device 1, and with data
Capable form synthesizes the detection image, and surface defects of products is contained in the detection image for integrating multiple groups effect image in difference
Characteristics of image under the conditions of angle polishing, therefore, the detection image have irreplaceable role in surface defects detection.
Embodiment 1
Referring to FIG. 5, the Machine Vision Inspecting System of the present embodiment, for the defect of visual analysis test object 6, including
Calculation server 7, isochronous controller 2, connect isochronous controller 2 image acquiring device 1 and connect the isochronous controller 2
Several light supply apparatus.The isochronous controller 2 connects the calculation server 7, which also connects the calculating service
Device 7.In the present embodiment, which is camera.
In the embodiment of Machine Vision Inspecting System shown in Fig. 2, it is provided with three light supply apparatus, respectively first light source
Device 3, second light source device 5 and third light supply apparatus 4.The quantity of the light supply apparatus is special according to the defect of test object 6
Point setting, for example, the detection image that the defect of glass product needs to synthesize three polishing angles carries out defect analysis.
In the embodiment of Machine Vision Inspecting System shown in Fig. 4, it is provided with five light supply apparatus, respectively first light source
Device 3, second light source device 5, third light supply apparatus 4, the 4th light supply apparatus 7 and the 5th light supply apparatus 8.The light supply apparatus
Quantity is arranged according to the defect feature of test object 6, for example, the defect of certain curved face products needs to synthesize five polishing angles
The detection image of degree carries out defect analysis.
The image acquiring device 1 includes image synthesis module 15, memory module 14, photoelectric conversion compensating module 13, image
Module 12 and first is obtained from synchronization module 11.
The calculation server 7 of the connection image acquiring device 1 includes surface deficiency analysis module 72.
The isochronous controller 2 includes main synchronization module 21, first detection module 25 and the second detection module 27.The master is same
Walking module 21 includes Transmit-Receive Unit 22 and driving unit 23.The Transmit-Receive Unit 22 is for sending the reference clock information, the drive
Moving cell 23 is for sending the shooting instruction.
For each light supply apparatus other than ID is different, other constructions are identical.Each light supply apparatus includes second from synchronous mould
Block, receiving module and compensating module.For example, first light source device 3 include second from synchronization module 31, receiving module 32 and
Compensating module 33.Second light source device 5 includes second from synchronization module 51, receiving module 53 and compensating module 52.The third
Light supply apparatus 4 includes second from synchronization module 41, receiving module 43 and compensating module 42.It can be understood that more for using
When a multiple light courcess device, for the Machine Vision Inspecting System shown in Fig. 4, the 4th light supply apparatus 4 equally includes second from same
Walk module, receiving module and compensating module.5th light supply apparatus 4 equally include second from synchronization module, receiving module with
And compensating module.As can be seen that the Machine Vision Inspecting System includes N number of the second of corresponding N number of light supply apparatus in the present embodiment
From synchronization module.
The test object 6 is mounted on conveying mechanism 8, which installs at least one set of light source dress in setting position
It sets.For example, the one group of light source device in embodiment illustrated in fig. 2, this group of light supply apparatus includes around the of the conveying mechanism 8 installation
One light supply apparatus 3, second light source device 5 and third light supply apparatus 4, so that being mounted on the test object 6 on the conveying mechanism 8
Each light source assembly is distributed on three-dimensional space around the test object 6 when by this group of light supply apparatus forms multiple polishing angles
Degree;For another example, the one group of light source device in embodiment illustrated in fig. 4 includes the first light source device around the conveying mechanism 8 installation
3, second light source device 5, third light supply apparatus 4, the 4th light supply apparatus 7 and the 5th light supply apparatus 8, the position of this group of light supply apparatus
Arrangement is set so that the test object 6 being mounted on the conveying mechanism 8 each light source assembly when by this group of light supply apparatus surrounds
The test object 6, which is distributed on three-dimensional space, is similarly formed multiple polishing angles.
Synchronization and shooting process for each light supply apparatus cooperation image acquiring device 1 of clear explanation.Below with one
It is introduced for light supply apparatus.The sync pulse jamming process of other light supply apparatus is identical, repeats no more.
The image acquiring device 1 obtain single source device detection data when, the main synchronization module 21 to this first from
Synchronization module 11 send reference clock information, this first from synchronization module 11 according to the reference clock information carry out local clock benefit
It repays.The main synchronization module 21 also sends reference clock information to corresponding second from synchronization module simultaneously, receives the reference clock
The second of information carries out local clock compensation from synchronization module.Later, the main synchronization module 21 is simultaneously to the image acquiring device 1
Shooting instruction is sent with the light supply apparatus currently connecting, while so that the light supply apparatus for receiving the shooting instruction is lighted flash lamp,
The image acquiring device 1 shooting obtains the present image of the test object 6 and forms a line detection data of the detection image.
When the test object 6 is arranged distant from the position of light supply apparatus along conveying mechanism 8, which once will
Image data under all polishing angles that image acquiring device 1 is shot synthesizes the detection image according to the form of data line, and
The N row detection data of corresponding this group of polisher is taken out line by line by the surface deficiency analysis module 72 of the calculation server 7, also
Successively the uniline detection data under the illumination of different polishing angles is extracted according to the shooting sequence of group light supply apparatus where it
Out, formed multiple and different polishing angles under multiple independent light conditions for highlighting 6 defect of test object from multi-angle
Image data.
The first detection module 25 is program controling module, includes the synchronization with group light supply apparatus in the program controling module
Control and drive control, so that the image acquiring device 1 can complete the image taking work of more polishing angles in instantaneous time section
Make.
The image acquiring device 1 is set to obtain detection data when each light supply apparatus is individually lighted, it is same to organize light supply apparatus, than
If N number of light supply apparatus is to generate N row detection data.The photoelectric conversion compensating module 13 is used to shoot in the image acquiring device 1
Gamma correction is carried out according to photoelectric conversion penalty coefficient table to each pixel in this image while one image.
After the photoelectric conversion compensating module 13 completes photoelectric conversion compensation correction, the image synthesis module 15 is according to data line
Form synthesis the N row detection data is formed into the surface deficiency analysis module 72 can analyze the detection image used.
In the present embodiment, in order to guarantee to complete whole polishings and shooting with group light supply apparatus within the unit time, to dress
The speed for carrying the conveying mechanism 8 of the test object 6 has certain requirement, it is desirable that the movement velocity of the test object 6, that is, this is defeated
The conveying speed for sending mechanism 8, less than the product of the number N of the time for exposure and single group light supply apparatus of the image acquiring device 1.
The Machine Vision Inspecting System further includes the sensing device 28 for sensing 6 movement position of test object.The sense
It answers device 28 to be connected to the isochronous controller 2, information is generated by the 6 touch inducing device 28 of test object that conveying mechanism 8 transmits
And the information is fed back into the isochronous controller 2, which starts the master according to the feedback information of the sensing device 2
Synchronization module 21 starts synchronously control and image taking that multi-angle polishing is carried out to the test object 6 of process.
In the present embodiment, N number of light supply apparatus with group is installed around conveying mechanism 8, that is, with N number of light source of group
Device is mounted on the detection motion profile of test object 6 and is distributed in three dimensions.
Second detection module 27 is for determining vision-based detection scheme.Such as control one group of light source device carry out detection or
It controls multiple sets of light sources device and completes detection.In the present embodiment, which includes subscriber interface module, and user passes through
The subscriber interface module sets the vision-based detection scheme of the test object 6.
Please also refer to Fig. 2, Fig. 6 and Fig. 7, multiple light courcess detection image acquisition process introduced below:
The isochronous controller 2 that sensing device 28 triggers Machine Vision Inspecting System starts;
The main synchronization module 21 of a, isochronous controller 2 are synchronous and control first light source device 3 is lighted, while image obtains dress
Set a line image under 1 shooting first light source, that is, a line detection data;
The main synchronization module 21 of b, isochronous controller 2 are synchronous and control second light source device 5 is lighted, while image obtains dress
Set a line image under 1 shooting second light source;
The main synchronization module 21 of c, isochronous controller 2 are synchronous and control third light supply apparatus 4 is lighted, while image obtains dress
Set a line image under 1 shooting third light source;
With group light supply apparatus setting multiple light sources, ibid operates, once complete synchronization and the point of all light supply apparatus
It is bright.
When needing to obtain multiple detection images, while which moves slight distance with conveying mechanism 8, weight
The step of multiple a, b, c.
When the test object 6 leaves detection position with conveying mechanism 8, the surface deficiency analysis mould of the calculation server 7
Block 72 once takes out the detection data according to row shooting of the image acquiring device 1, successively obtains different polishing angles
Several row monitoring data are extracted according to the sequence that its light source is shot, and are reduced into N, such as in the case of three light supply apparatus
It is reduced into three images for indicating different polishing angles.
72 algorithm of surface deficiency analysis module analyzes one synthesis of image or synthesis under three polishing angle light sources
Defect map.The defect figure that is, detection image above-mentioned can be every row detection data and synthesize in proportion, it is possible to understand that
It is that can also be synthesized by the way of average intercept to N row detection data, specific synthesis mode can be according to test object 6
Different materials component carry out dynamic analysis depending on.
Fig. 6 and Fig. 7 are please referred to, specific detection example is shown, existing polishing mode is swept in the line of product producing line and felt
In detection, high angle is generally used, low angle is reflective to wait polishings mode.
It is to illustrate example with the vertical shot detection object 6 of image acquiring device 1, light source exists in a-quadrant and Y-axis in Fig. 6
Polishing, then be defined as high angle polishing between 15 degree of angles and 30 degree of angles;Light source is beaten in the region B and D, and above X-axis
Light, then it is defined as low angle polishing;Light is then defined as backlight in the polishing of the region C.
Three of the above polishing has the different effects that shows to the imaging effect of the same defect in test object 6, specifically at
As effect example please refers to Fig. 7.The present embodiment is by acquiring the image under different polishing angles, to highlight the test object
Different defect effects of the same surface defect under different polishing angles on 6, then the image by synthesizing different polishing angles
It include the detection image of the different imaging effects of same defect according to this as being detection image, calculation server 7 can be very fast
Fast, the stable surface defect detected in the test object 6.
Embodiment 2
Referring to FIG. 1, the present embodiment is related to multiple light courcess detection image acquisition methods, it is used to form the detection of test object 6
Image, including N number of light supply apparatus.
The image acquisition step of single source device includes:
Step 201: sending reference clock information to image acquiring device 1, the image acquiring device 1 is according to the reference clock
Information carries out local clock compensation, when it is implemented, the image acquiring device 1 is according to the reference clock information and photoelectric conversion
The response curve of compensation completes local clock compensation;
Step 202: sending reference clock information to light supply apparatus, which carries out this according to the reference clock information
Ground clock compensation, when it is implemented, the response curve that the light supply apparatus is compensated according to the reference clock information and photoelectric conversion
Complete local clock compensation;
Step 203: while shooting instruction is sent to the image acquiring device 1 and light supply apparatus, light the light supply apparatus
While the image acquiring device 1 shooting obtain present image and form a line detection data of the detection image.
Above multiple light courcess detection image acquisition methods can obtain a line detection data under single source device polishing, with
Capable form obtains detection data can provide sufficiently reflection defect spy for the surface deficiency analysis module 72 of subsequent calculation server 7
The defect analysis data of sign.
Please also refer to Fig. 3, it show and completely carries out machine vision inspection using the multiple light courcess detection image acquisition methods
The flow chart of survey.Machine vision detection method includes:
Step 204: storing a line detection data;
Step 205: judge whether N number of light supply apparatus traverses, when traversal is not with group light supply apparatus completely,
Step 206: obtaining the ID of next light supply apparatus, continue to acquire a line testing number under the polishing of single source device
According to;When complete traversal is with group light supply apparatus, detection image synthesis step is gone to;
Step 207: so that the image acquiring device 1 is repeated the image data acquisition step of the single source device, to generate N
Row detection data synthesizes the N row detection data and forms the detection image;
Step 208: the surface deficiency analysis module 72 of calculation server 7 completes the test object 6 according to the detection image
Surface deficiency analysis.
In the present embodiment, the multiple light courcess detection image acquisition methods and machine vision detection method further include photoelectric conversion
Compensation process carries out Gamma correction according to photoelectric conversion penalty coefficient table for each pixel to the present image.
In the machine vision detection method, N number of light supply apparatus with group is installed around conveying mechanism 8, that is,
N number of light supply apparatus with group is mounted on the detection motion profile of test object 6 and is distributed in three dimensions.
The multiple light courcess detection image acquisition methods and Machine Vision Inspecting System of the present embodiment can make light supply apparatus high speed
Stroboscopic and with 1 high-speed synchronous of image acquiring device so that single image acquisition device 1 one wheel obtain multiple light sources under synthesis inspection
Altimetric image exposes defect sufficiently to improve the accuracy and recall rate of defects detection.The embodiment of the present invention uses one camera mostly light
Source technique for taking realizes under multiple light courcess high speed strobe light that an image acquiring device 1 can be imaged two by isochronous controller 2
Kind and the above polishing angle image, to highlight in the test object 6 same surface defect under different polishing angles
Different defect effects, then the image by synthesizing different polishing angles is detection image, includes same defect according to this
Different imaging effects detection image, what calculation server 7 can be very quick, stable detect surface defect and can
More reliable carries out defect classification to various surface defects.
Finally, it should be noted that above embodiments are only to illustrate the technical solution of the application, rather than its limitations;At this
It under the thinking of application, can also be combined between the technical characteristic in above embodiments or different embodiment, step can be with
It is realized with random order, and there are many other variations of the different aspect of the application as described above, for simplicity, they do not have
Have and is provided in details;Although the application is described in detail with reference to the foregoing embodiments, the ordinary skill people of this field
Member is it is understood that it is still possible to modify the technical solutions described in the foregoing embodiments, or to part of skill
Art feature is equivalently replaced;And these are modified or replaceed, each reality of the application that it does not separate the essence of the corresponding technical solution
Apply the range of a technical solution.