Background technology
The scheme that is used for detection system at present generally has two kinds: a kind of detection system that is based on PC, another kind is based on the detection system of DSP.Though the powerful resources advantage of general purpose PC be other system can not compare, but high flow rate also is this system's one big disadvantage, medium Video processing ability can only be provided, and take the most processing power of CPU, this system bulk is too huge in addition, these factors have all caused the inconvenience in commercial Application, are used for the algorithm research and the simulation stage of video acquisition and Video processing more; Based on the detection system of DSP, because powerful processing power of DSP and high travelling speed, add programmablely, real time execution speed can reach the per second number with ten million bar complicated order program, considerably beyond general purpose microprocessor.Along with the development of DSP technology, high-speed image sampling and disposal system are widely used in the detection system.In addition, be based on image pick-up card mostly about embedded detection system in recent years, and do not have to find do not using the defect detection system of capture card.Do not use the quality detecting system of capture card under the accurate control that realizes the CCD camera, to reduce equipment cost, represented the developing direction of current detection system.Because testee is in the middle of the high-speed motion, and defects detection requires the high-resolution image of high definition, therefore is difficult to the no blurred picture that acquisition meets the demands with common picture pick-up device.The each scanning of line array CCD picture pick-up device utilizes the relative motion between subject and the CCD to form two dimensional image by continuous sweep only to a sweep trace imaging.Therefore, as long as the line sweep rate is enough high, can eliminate motion blur.
Quality testing has been proved to be the operation of the most difficult realization robotization in the production run.The online quality testing of movable band-shaped material at present relies on artificial visually examine's method to finish mostly.Shortcomings such as the artificial visually examine exists not only that labour intensity is big, efficient is low, is subject to the human factor influence, false drop rate and loss height also can cause serious injury workman's vision.Desk checking generally can only be checked out the fault of " 40%~60% ".Consult the patent about the online detection of strip material of application at home and abroad and recognize, the detection of strip material is only limited to iron and steel, glass, printed matters etc. are as 200710051862.7 1 kinds of on-line detection device of defects in float glass based on machine vision of patent; 200,410,061,395 1 kinds of print quality on-line measuring devices of patent; 200,720,067,927 1 kinds of bands of patent steel wave type on-line detecting system, these systems all are based on the on-line detecting system of industrial computer, do not relate to online quality detecting system based on the movable band-shaped material line scan image sensor array of DSP, especially the gordian technique that multi-thread battle array ccd array image acquisition does not need image pick-up card and self-adaptation synchro control etc. to detect in real time at a high speed, and the detection system specificity very strong can not flexible Application on other detection systems.Therefore research and development have a good application prospect and the market demand based on the online quality detecting system of parallel linear array ccd array of DSP.Through the adjustment of respective algorithms, this method can be applied to the quality testing of other strip material easily.
Summary of the invention
Technical matters to be solved by this invention provide a kind of under the situation of not using image pick-up card the embedded detection system to the image acquisition of movable band-shaped material and processing etc., be specially adapted to the quality testing and the On-line Control of dynamic strip material.Adopt a plurality of line array CCD sensors and the light source that is applicable to movable band-shaped material to form optical imaging system, utilize a plurality of dsp processors and host computer and various design circuit to constitute the control system of linear array CCD image sensor array, the data transmission that it can be gathered CCD under the situation of not using capture card is handled to DSP, according to the automatic control of movable band-shaped material velocity variations realization, make the image of gathering distortion can not occur to the CCD sample frequency.
The technical solution adopted for the present invention to solve the technical problems is: a kind of on-line quality detection system for movable band-shaped material is provided, comprise the parallel image sensor groups of forming by at least two high-resolution linear array CCDs, image transmission and the embedded system of processing and the illuminator that is fit to movable band-shaped winding material characteristics that one cover is made up of at least two DSP, described high-resolution linear array CCD comprises high-speed CCD signal digital multiplex circuit, realize the input of at least two road ccd signals, and the data of at least two CCD collections of a DSP processing, described high-resolution linear array CCD also comprises the automatic control circuit of the CCD sample frequency being controlled according to movable band-shaped material speed; Between described CCD and DSP data communication interface circuit is arranged, adopt TMS320C6416 under the situation of not using image pick-up card, to realize the real-time collection of movable band-shaped material image.
Described CCD takes outer synchronous triggering pattern, and trigger pip is produced by outer synchronous trigger circuit, is promptly produced by scrambler on the spool that is installed in movable band-shaped material equipment, has realized according to the automatic control of movable band-shaped material speed to the CCD sample frequency.
The outer synchronous triggering signal of DS90LV048A receiver reception from scrambler adopted in conversion between the input signal of described encoder output and camera, be the TTL conversion of signals LVDS differential signal simultaneously, the signal of scrambler is to be transferred to the CCD camera under DSP control, has added photoisolator and driver between encoder pulse output port and the DSP pulse output pin.
The transmitter of described CCD inside and the conversion of signals of back-end processor adopt the DS90CR286 chip that the LVDS conversion of signals of video camera output is become 28 CMOS/TTL signal, and then therefrom isolate viewdata signal and enable signal, as the enable signal and the data input signal of Back end data reception.
Adopt DS90CR286 to carry out level conversion between described CCD and DSP.
Data communication control circuit between described CCD and DSP designs in embedded system, utilizes the hyperchannel buffer memory serial ports MCBSP of DSP to realize communicating by letter of CCD and DSP and to the setting of CCD camera parameter.
Described illuminator adopts LED red light source and white background, according to the requirement of movable band-shaped material different-thickness and the characteristics of optical system, threshold value is adjusted.
The present invention by build high-speed CCD signal digital multiplex circuit, according to movable band-shaped material speed to the data communication interface circuit between automatic control circuit, CCD and the DSP of CCD sample frequency, under the situation of not using image pick-up card, realized the real-time collection of movable band-shaped material image.The image of gathering is handled the online detection (Fig. 1~3) that vision is realized in the back through the DSP of rear end.
High-speed CCD signal digital multiplex circuit adopts by row many CCD camera video signal is carried out multiple connection, adopts a plurality of buffer units that each road vision signal is carried out buffer memory, reads the multiple connection that just can realize video data then from buffer memory.Mainly solved and how to have determined the read-write of two buffer units and to produce the output video synchronizing signal according to two-way input video synchronizing signal.Because must contain video synchronization signal in the video data that obtains after the multiple connection, the DSP processing unit of rear end just can be with multi-channel video signal multiple connection correctly and fusion according to this video synchronization signal.Because native system adopts is that the camera output signal of CameraLink interface is 4 pairs of serial LVDS data-signals, the level signal that can receive with DSP does not match, therefore the input of redundant system is the LVDS signal, must be converted into the TTL/CMOS signal after, just can handle it.Circuit adopts the DS90CR286 of National Semiconductor to carry out level conversion.Because movable band-shaped material spool radius constantly changes, therefore the speed after the cutting is also changing, the image of gathering for fear of CCD since the change of movable band-shaped material speed occur stretching or compression deformation, design CCD takes outer synchronous triggering pattern, trigger pip is produced by outer synchronous trigger circuit, has realized according to the automatic control of movable band-shaped material speed to the CCD sample frequency.The whole CCD course of work is as follows: 1) scrambler output horizontal synchronizing pulse; 2) behind the DSP response synchronizing pulse, start exposure counter, the output high level is given CCD, makes CCD enter the integration state; 3) through behind the exposure cycle that meets the sequential requirement, CCD is arrived in the outer synchronous triggering signal EXSYNC of counter output pulse, EXSYNC pulse step-down, and termination exposure also triggering row is read; 4) video camera output LVAL and sign make data effective, and counter reset is waited for the arrival of next encoder pulse.
Because the parameter state of CCD acquiescence can not satisfy the requirement of system, need set parameters such as the exposure mode of system, time shutter.The CCD of L400K series is carried out parameter be provided with two kinds of methods: the one, utilize the CCT+ instrument that the parameter of CCD is set by PC; The 2nd, use the scale-of-two read/write command, by the method for programming camera is carried out the parameter setting.The design is not having under the situation of PC, the data communication control circuit in embedded system between design CCD and DSP and utilize the hyperchannel buffer memory serial ports MCBSP of DSP to realize communicating by letter of CCD and DSP and to the setting of CCD camera parameter.
In detection, the selection of stability of light source and detection background is bigger to the form influence of movable band-shaped material fault, adopt LED red light source and white background to overcome effectively because the detection error that variation brought of natural light, can threshold value be adjusted according to the requirement of movable band-shaped material different-thickness and the characteristics of optical system.
Contradiction between the data volume of handling for resolution system and the real-time of detection, DSP has passed through " handling in real time " and " quasi real time handling " to data, the real-time rank height of handling, and the rank of quasi real time handling is low, the purpose of handling is whether detected image exists fault in real time, " quasi real time processing intent is that the image that has fault is further detected, so that size, position, the classification of fault are distinguished.
Beneficial effect
1. realized parallel image acquisition, the disposal system of high speed linear array CCD array, the generation circuit of the outer synchronous triggering signal of design has been realized the strict synchronism of line array CCD array, reduce measuring error, therefore can adopt the high speed linear array CCD video camera to follow the tracks of fast the dynamically production run of strip material;
2. realize the image acquisition to movable band-shaped material under the condition of not using image pick-up card, reduced cost, the popularization of detection system is laid a good foundation for this reason.When the data communication control circuit that designs between CCD and DSP, though can use other serial communication circuit, that native system adopts is the hyperchannel buffer memory serial ports MCBSP of DSP simultaneously, has reduced the difficulty of design.
3. owing to the powerful image-capable of TMS320C6416, ensure stability, continuity and the reliability of rapid image transmission system, be specially adapted to the abominable occasion of processing environment; Contradiction between the data volume of handling for resolution system and the real-time of detection, DSP has passed through " handling in real time " and " quasi real time processing " to data.
4. She Ji movable band-shaped material special light source and detection background are laid a good foundation for the quick identification of its fault, adopt LED red light source and white background to have good stability, can overcome effectively because the detection error that variation brought of natural light.According to the requirement of movable band-shaped material different-thickness, can obtain more stable testing result simultaneously to threshold value adjustment;
5. based on the enforcement of the on-line quality detection system for movable band-shaped material of the linear array CCD image sensor array of DSP, changed in the past manual detection quality instability, easily produced problems such as fatigue and customer complaint be frequent, laid a good foundation for product quality reaches a new stage.
Embodiment
Below in conjunction with specific embodiment, further set forth the present invention.Should be understood that these embodiment only to be used to the present invention is described and be not used in and limit the scope of the invention.Should be understood that in addition those skilled in the art can make various changes or modifications the present invention after the content of having read the present invention's instruction, these equivalent form of values fall within the application's appended claims institute restricted portion equally.
Shown in Fig. 1~3, the present invention relates to principle of work based on the online defect detection of the movable band-shaped material of DSP system: since at the transmitter DS90CR285 of CCD inside with LVAL, the conversion of signals that DVAL and parallel image vision signal etc. are 28 becomes 4 pairs of serial LVDS data-signals, so the output signal of ccd video camera is the differential signal of Camera Link standard, the signal of it and back-end processor is different, needs to carry out conversion of signals between the two.The LVDS conversion of signals that the present invention uses the DS90CR286 chip of National Semiconductor that video camera is exported becomes 28 CMOS/TTL signal, and then therefrom isolate viewdata signal and enable signal, as the enable signal and the data input signal of Back end data reception.
Because encoder output is different with the input signal of camera, so need change.The present invention passes through the outer synchronous triggering signal of the DS90LV048A receiver reception of American National Instrument Semiconductor company from scrambler, is the TTL conversion of signals LVDS differential signal simultaneously.The signal of scrambler is transferred to the CCD camera under DSP control, for fear of the influence to DSP of the signal of scrambler, added photoisolator and driver between actual coding device pulse output end mouth and the DSP pulse output pin.In order to simplify control to outer triggering signal, the exposure mode of outer synchronous triggering signal Exsync is selected Programmable mode (control model able to programme) for use, the rising edge of time shutter from outer triggering signal begins to count, the time of lasting is realized by programming, line is read and is transmitted in end exposure and begins, and the negative edge of external signal is incoherent.The design of high-speed CCD signal digital change-over circuit and external trigger signal circuit, realization can be avoided because the motion of movable band-shaped material makes the image of collection the distortion that stretches or compress occur based on the image acquisition of embedded system and according to the automatic control of movable band-shaped material speed to the CCD sample frequency.Simultaneously, high-speed CCD signal digital change-over circuit can not need use image pick-up card, has both reduced system cost, has improved the accuracy of detection of system again.
Because the parameter state of CCD acquiescence can not satisfy the requirement of system, need set parameters such as the exposure mode of system, time shutter.Native system adopts the scale-of-two read/write command, by the method for programming camera is carried out the parameter setting, will solve the communication issue between camera and DSP to the parameter setting of CCD.This realizes that by two-way LVDS null modem cable they are respectively: the signal SerTC from the control system to the camera is used for sending order is set; Signal SerTFG from the camera to the control system is used for the information feedback after camera receives order.Asynchronous serial communication protocol is adopted in this communication, and each data is 10bit, comprises a start bit " 0 " and a position of rest " 1 ", but does not have parity bit and the position of shaking hands, and baud rate is defaulted as 9.6kbit.TMS320C6416 has MCBSP, utilizes the data communication between this serial ports realization DSP and the camera.
Be illustrated in figure 4 as DSP main program flow block diagram, DSP has passed through " handling in real time " and " quasi real time handling " to data, and when " handling in real time ", system has carried out the medium filtering pre-service to the view data in the CCD output buffers, noise in the removal of images keeps valid data; Be weighted method of average image co-registration then, purpose is that the image co-registration that many CCD are gathered is that a complete view data is convenient to follow-up defect detection; Adopt the gray scale matching method that image is carried out rough detection at last, purpose is to judge fast whether this two field picture has fault.If fault is arranged, then deposit this two field picture in buffer zone imDetect, so that further detect positional information and the classification that obtains fault after a while; If there is not fault, then do not preserve this two field picture.The image that is placed on buffer zone needs further to handle, so that size, position, the classification of fault are distinguished, these are finished by " examining survey " and " fault identification " two steps.