CN103018259B - Multi-zone segmentation visual detection system and method based on embedded type framework - Google Patents

Multi-zone segmentation visual detection system and method based on embedded type framework Download PDF

Info

Publication number
CN103018259B
CN103018259B CN201210556819.7A CN201210556819A CN103018259B CN 103018259 B CN103018259 B CN 103018259B CN 201210556819 A CN201210556819 A CN 201210556819A CN 103018259 B CN103018259 B CN 103018259B
Authority
CN
China
Prior art keywords
image
cpld
dsp
subsystem
region
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.)
Active
Application number
CN201210556819.7A
Other languages
Chinese (zh)
Other versions
CN103018259A (en
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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201210556819.7A priority Critical patent/CN103018259B/en
Publication of CN103018259A publication Critical patent/CN103018259A/en
Application granted granted Critical
Publication of CN103018259B publication Critical patent/CN103018259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a multi-zone segmentation visual detection system and method based on an embedded type framework. The system comprises a CPLD (complex programmable logic device) subsystem, an ARM (advanced RISC machines) subsystem, a DSP (digital signal processor) subsystem and an IO (integrated optics) subsystem, wherein the CPLD subsystem drives an image signal processor to collect original image data according to an external synchronous signal and a trigger signal, and simultaneously the CPLD subsystem performs video memory management and VGA (video graphics array) output management for a human-computer interface; the ARM subsystem controls the generation of user menus in the human-computer interface and responds to manual panel motions to complete settings of image collection working parameters and multi-zone segmentation parameters; and according to the working parameters and zones set by the ARM subsystem, the DSP subsystem respectively completes image processing in multiple zones which are segmented out to generate a determining result and output a pulse. The multi-zone segmentation visual detection system based on the embedded type framework and the detection method have the advantages of being capable of preventing a blue chip from affecting stain determination in detection, reducing false rate and improving the reliability of the detection. Simultaneously, the system integrates the human-computer interface, so that the problem of usability caused by the dependence on computers can be solved.

Description

Based on multi_region vision detection system and the detection method of embedded framework
Technical field
The present invention relates to Iamge Segmentation and technical field of image processing, particularly based on multi_region vision detection system and the detection method of embedded framework.
Background technology
The nonwoven fabrics starting material all used in the finished product manufacture of the personal hygiene article such as baby diaper and sanltary towel, they are disposable products, and and direct body contact, thus client extremely pays close attention to the quality of product and sanitary condition.But in the production run of finished product, inevitably some machine oil stain, powder, drip the dirts such as the even dead insect of glue and be attached on finished surface, the size of these dirts differs.The line speed of current domestic personal hygiene article industry is per minute up to 300m, and the artificial random sampling before packaging detects not only inefficiency, cannot detect all products, and add personnel cost.Installing vision detection system on a production line, is the new demand of domestic nonwoven fabrics finished product production firm proposition over the past two years.The Vision Builder for Automated Inspection that current personal hygiene article industry uses mainly contains two kinds: the integrated system that (1) international large manufacturer provides, as the vision system of Cognex, Keyence, Omron etc.; (2) more domestic company adopts the vision system of OEM camera independent development on personal computer (PC) platform.But these two kinds of vision systems is expensive, not only the cost of production line manufacturing firm and final products manufacturer adds, and cannot grasp core knowledge property right.
In addition, the finished product of actual infant's nappy and adult health's articles for use, in quality and the effect of design in order to improve product, not being often a lily surface, not only there is embossing, but adding other absorbent material, being referred to as blue chip.Embossing and blue chip and nappy surface also exist very large gray scale difference, vision system is easily used as embossing and blue chip as spot when detecting, and needs to carry out dividing processing to different regions so the existence of embossing and blue chip directly results in surface defect detection system when designing.
Summary of the invention
The object of the invention is to overcome the shortcoming of prior art and deficiency, provide a kind of and reduce the multi_region vision detection system detecting False Rate, improve detecting reliability.
Another object of the present invention is to, a kind of detection method based on above-mentioned vision detection system is provided.
In order to reach above-mentioned first object, the present invention by the following technical solutions:
A kind of multi_region vision detection system based on embedded framework of the present invention, comprises CPLD subsystem, ARM subsystem, DSP subsystem and IO subsystem;
CPLD subsystem drives image-signal processor to gather raw image data according to outer synchronous signal and trigger pip, and is written in DSP by these data, and CPLD subsystem carries out video memory management and VGA outgoing management to man-machine interface simultaneously;
The generation of the custom menu in ARM subsystem controls man-machine interface and the action of response hand behaviour plate complete setting and the multi_region optimum configurations of image acquisition running parameter;
DSP subsystem, the running parameter arranged according to ARM subsystem and region, complete the image procossing in multiple regions of splitting respectively, produces judged result and also export pulse;
IO subsystem, the IO of system comprises image acquisition and controls and bad part eject control; Process external trigger and external synchronization signal, ensure that the original image gathered can not produce distortion because of the change of line speed; In addition after DSP detects stain, according to after the delay screening number that counting is preset, send bad part eject signal.
Preferably, described CPLD subsystem comprises image acquisition, video memory management, outer synchronous and external trigger management, CPLD subsystem responses outer synchronous signal and trigger pip, image-signal processor is driven to gather raw image data, and will the signal meeting DSP data bus sequential being produced, the view data these collected is written in the buffer memory of DSP data bus; Man-machine interface manages SRAM static memory as video memory by CPLD, CPLD opens bus to ARM with the form of register, ARM carries out read-write operation with its asynchronous memory bus to these registers, the renewal of video memory data is realized by the register of ARM read-write CPLD, CPLD is first written to ARM the menu data value in its register, be saved in address location fixing in video memory, then carry out VGA display by the data read in video memory, realize menu interface.
Preferably, described ARM subsystem comprises the asynchronous storage bus interfaces, the I2C interface of configuration image process chip, the serial ports be connected with DSP and the expansion interface that are connected with CPLD, ARM system is as the controller of vision system, the setting of the man-machine interface management of primary responsibility and system operational parameters, ARM arranges the related register of the special ccd sensor image collection chip of VSP1021 by I2C interface; CPLD carries out read-write operation with its asynchronous memory bus to these registers to ARM, ARM with the open bus of the form of register, realizes the co-ordination between ARM and CPLD, completes the management of man-machine interface; Simultaneously ARM is connected with DSP by serial ports, image is detected, the parameter such as region segmentation is supplied to DSP, to complete the analysis of image.
Preferably, described DSP subsystem comprises, comprise image storage section, image processing section, external interface part formation, image storage section provides PPI interface to CPLD by DSP, during work, CPLD produces the signal meeting DSP data bus sequential, the raw CCD images data collected are written in the buffer memory of PPI interface data bus of DSP, and by the dma operation of DSP, the data in buffer memory are saved in SDRAM, complete image and store; The running parameter that these original images are arranged according to ARM subsystem by DSP and region, complete the image procossing in multiple regions of splitting respectively; External interface part is connected with ARM by serial ports, obtains Image Processing parameter, and the judged result that last image operation produces also outputs signal to CPLD process by external terminal.
Preferably, described IO subsystem comprises, IO subsystem is made up of outer synchronous, external trigger, bad part eject screening signal, system is in operational process, CCD is continuous sweep, but the production of finished product is spaced, external trigger signal will be passed through like this, correctly identify the reference position of each product in the movement direction, calculate to notify that this part view data is written in DSP by CPLD, external trigger is counted as electric cam by the code device signal on production line, realized by the counting output of electric cam;
In addition, because system adopts linear array CCD scanning image, the line frequency of scanning needs the linear velocity with production line corresponding, to ensure that image can not be out of shape because of the change of line speed, the accuracy that range of influence is selected, ensures image detection accuracy, wants synchronous when gathering image like this, adopt the servo drive signal of servoamplifier as synchronizing signal benchmark, and determine the sample frequency of image with the divider ratios arranged;
Bad part eject is after DSP carries out image operation, when finding that there is abnormal conditions, by pulse signal on output pin notice CPLD, then is sent by CPLD that screening pulse signal realizes to the topworks of production line; Because the view data of the CPLD writes to be obtained such as DSP is also carries out calculating, and a point sector signal (i.e. external trigger signal) for product is linked into CPLD to control image acquisition, as long as that is DSP has data just to calculate, and no matter when outer triggering signal starts.But the position that the position at the substandard products place that topworks rejects and vision system are installed, or not same place, likely differs the position of several product.When DSP sends abnormal pulsers to CPLD, just mean that this product current has problem, but these substandard products will on a production line more forward several position just can be performed mechanism and reject, therefore reject pulse and will postpone to send, this unit postponed is exactly the counting of several times external trigger.CPLD is according to the delay number that interface pre-sets, after receiving the detection abnormal pulsers that DSP sends, external trigger is subsequently counted, each counting is equivalent to a product space of passing by, when count value equals the delay number arranged, just send and reject pulse to topworks, thus complete the rejecting of substandard products.
In order to reach above-mentioned second object, the present invention by the following technical solutions:
This reverse side is based on the detection method of the multi_region vision detection system of embedded framework, and for accuracy of detection requirement, detection algorithm considers that from tangential movement direction and vertical movement direction the characteristic of image carries out designing.The present invention adopts the mode of locator field to determine the reference position of image border because other the region unit split all realizes based on the relative starting position of locator field, the determination of locator field we adopt edge detection algorithm to realize.After determining locator field, the position in other regions also just secures relatively, the original image in these regions, original image extraction can be carried out by the DMA two-dimensional operation of DSP, the original image of these regionals extracted, just can carry out spot detection by several detection algorithms preset in region, introduce a kind of Threshold segmentation statistic algorithm implementation procedure here.Its concrete steps are as follows:
S1, on tangential movement direction, adopt line array CCD to obtain the image of high-velocity scanning, the data of N scanning are stitched together, form the face system of battle formations picture in a subrange, then detect; Therefore the PPI interface dma operation of DSP and the Memory Allocation of SDRAM operate according to N bar line, and the data processing time completing this N bar line requires to realize in N × 0.1ms;
S2, on vertical movement direction, piecemeal is carried out to the image of the N bar line collected, and suppose that the mean picture brightness in adjacent two pieces of regions is close, the threshold value that the average brightness of normal pixel is split as next area image in previous region is an image-region with N × n-quadrant during piecemeal;
S3, to each N × n-quadrant block, the segmentation threshold of mean value as this region of all pixel intensity of defect pixel will not be comprised in a upper region, add up the image pixel number not meeting Threshold segmentation in this region, using the area of this statistical value as spot; If the area of spot is greater than default alarm threshold value in N × n-quadrant, so DSP exports and judges that abnormal pulsers is to CPLD in I/O pin, if the spot area of statistics is less than alarm threshold value, so mark this region and an adjacent M region, and add up the area of spot in M+1 region, the basis for estimation using this area sum as the interrupted thread spot that is connected.
Preferably, the process of each N × n-quadrant data carries out in the inner buffer of BlackFin531, and open two memory blocks at inner buffer, adopt the storer DMA passage of BlackFin531, each N × n-quadrant data are moved DSP inner buffer with the form of ping-pong operation from SDRAM, the time of data-moving when carrying out computing like this, can be ignored.
Preferably, before carrying out spot judgement, filtering process has been carried out to image, to reduce the impact that noise judges spot, checked the saltus step waveform in the I/O pin of BlackFin531 by oscillograph, find that this algorithm calculating N × 2048 pixel time used is less than N × 0.1ms, and when working, consider the setting of detection boundaries, the actual every bar line of sensing range is less than 2048 pixels, so algorithm has real-time while guarantee accuracy of detection.
Preferably, for the judgement of " statistical value is greater than alarm threshold value ", if the statistical pixel number of current region is less than setting threshold value, then need to mark M the region adjacent with current N × N pixel region, if the statistical value sum in M+1 region exceeds empirical value, then think to there is thread spot within the scope of this, system produces screening pulse signal, faulty goods is rejected after receiving pulse signal by topworks, completes the surface defect detection in cut zone.
The present invention has following advantage and effect relative to prior art:
1, embedded machine vision detection system of the present invention, describes hardware configuration and the spot determination methods of the multi_region process of system, can avoid the impact that blue chip judges spot during detection, reduces False Rate, improves the reliability detected.The man-machine interface of this system integration simultaneously, can to avoid relying on computing machine and the ease of use issues that causes.Practical application shows, this system on-line velocity is in the nappy production line of 300m/min, can detect the spot of 1 square millimeter.
2, the present invention adopts the vision detection system of embedded frame design, be integrated with man machine operation interface, make the debugging of system and parameter be no longer dependent on industrial computer, not only reduce cost, and flexible for installation, operating aspect, improve the ease for use of system.
3, the present invention adopts the high speed linear array CCD of 2048 pixels as image acquiring sensor, can realize the high resolution detection of 30cm wide format, ensures the precision detected.
4, the present invention has outer synchronous and external trigger signal capture function, and the image gathered when ensureing line speed change is indeformable.
5, the present invention is to collect one secondary complete finished figure picture, multi_region process can be carried out, each region can the reference position of self defined area and area, and select different detection algorithms according to the characteristic of finished product, detect with the finished surface spot realizing having embossing and blue chip, improve the reliability of systems axiol-ogy.
Accompanying drawing explanation
Fig. 1 is the frame diagram of multi_region vision detection system of the present invention;
Fig. 2 is the structural representation of image data acquiring signal;
Fig. 3 is the process flow diagram of detection method.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention are not limited thereto.
Embodiment
Vision Builder for Automated Inspection comprises image acquisition and image procossing two parts, and what image acquisition adopted is charge coupled cell (CCD) sensor.Ccd sensor can be divided into face battle array and linear array two kinds from chip structure, area array CCD is mainly used in record, stores, and line array CCD is mainly used in the accurate location etc. in the non-contact detecting of product external dimensions, classification, surface quality evaluation, intelligent measurement and control and machine vision.It is high and detect the features such as size is large that line array CCD has imaging resolution, pixel grayscale and sample rate, can realize high-precision detection.The amenities such as nappy have at a high speed in process of production usually, the feature of large format, so adopt the more realistic application requirement of linear CCD sensor.
Embedded machine vision system is when gathering image, CPLD (CPLD) driven CCD sensor can be utilized, and according to the timing requirements of DSP data bus, realize the high-speed transfer of view data, so not only can flexible design and installation, and the real-time that data are transmitted and reliability can be ensured.In order to embossing and blue chip are followed other part dividing processing of finished surface, the multi_region process of implementation algorithm, system have employed ARM as controller, and the convenience of ARM programming contributes to realizing man-machine interface and region segmentation operation.And DSP provides abundant image processing function and have digital processing capabilities at a high speed, image processing algorithm can be completed at short notice, ensure the real-time of on-line checkingi algorithm.
As shown in Figure 1, system is primarily of comprising CPLD subsystem, ARM subsystem, DSP subsystem, IO subsystem.Raw image data Acquisition Circuit is made up of CCD driving circuit, special image signal processor and peripheral circuit, CPLD subsystem drives image-signal processor to gather raw image data according to outer synchronous signal and trigger pip, and man-machine interface also will carry out video memory management and VGA outgoing management by CPLD simultaneously.ARM subsystem generates the setting, multi_region optimum configurations etc. that the generation of the custom menu in major control man-machine interface and the action of response hand behaviour plate complete image acquisition running parameter, and these running parameters are given CPLD respectively and realized image acquisition and DSP carries out image operation.Produced the signal meeting DSP data bus sequential by CPLD during system works, view data is written in the buffer memory of DSP data bus, and by the dma operation of DSP, the data in buffer memory are saved in SDRAM, complete image to store, the running parameter finally arranged according to ARM subsystem by DSP and region, complete the image procossing in multiple regions of splitting respectively, produce judged result and also export pulse.The I/O interface signal of system comprises the synchronizing signal of system, external trigger signal and bad part eject signal.Synchronizing signal, from the servoamplifier pulse of production line, is used for the corresponding relation that the velocity variations of production control line and CCD sample between line frequency, and stretching or compression deformation appears in the image avoiding the change of line speed to cause gathering.External trigger signal, from the output of electric cam, to be mainly used in mark direction of motion between discontinuous detection zone; Bad part eject Signal transmissions finds defective product to topworks to reject.
System image acquisition uses linear CCD sensor, and its model is the TCD1209D of Toshiba, and the effective of it is 2048 as quick unit, and data transfer rate is 20MB.The signal of image data acquiring is carried out as shown in Figure 3 by CPLD driven CCD sensor.
The output of TCD1209D shown in Fig. 2 completes A/D conversion by the special ccd sensor image collection chip of VSP1021, and it supports double-sampling, built-in input clamping circuit and programmable gain amplifier.SR, SV and ADCCLK clock signal that system is provided by CPLD, regulates two sampling process.Serial SCLK, SDIN and CS interface sequence that ARM is provided by I2C interface, the register on configuration VSP1021 chip and adjustment gain.VSP1021 exports the raw image data of 8 precision, after carrying out logical process, according to the write timing of DSP data bus and the write timing requirement of video memory chip, is written in DSP internal memory and video memory, for subsequent treatment by CPLD.
Vision system, when debugging, generally needs to gather realtime graphic and analyzes, to arrange correct running parameter.Take PC as Platform Designing Debugging interface, not only face the real time problems of data in enormous quantities transmission, and PC will be installed on a production line, reduce the ease for use of system, add popularization difficulty.For this reason, just man-machine interface is integrated with when design system, by its USB interface, directly by interface display on standard VGA display, and come the interface of operating system with Simple hand behaviour plate, finish the work optimum configurations and region segmentation selection, the reference position, detection algorithm parameter etc. of these running parameters and selected zone, all be kept in the external EEPROM of system, automatic loading parameters after guarantee powers on.
Man-machine interface has tripartite's surface function: preserve realtime graphic to complete the operations such as regional choice, generation system menu, VGA display, the key realizing this tripartite's surface function is that video memory manages, during design system using SRAM static memory as video memory, register mainly through ARM read-write CPLD realizes the renewal of video memory data, realizes the menu function of man-machine interface.
The refreshing of realtime graphic is after CPLD obtains the view data that VSP1021 exports, and within each row synchronizing cycle, by 2048 of single pass valid data write DSP, view data is kept in video memory with the oversampling ratio of 4:1 simultaneously.System interface adopts standard 640 × 480 resolution of VGA, its line period is 31.77 μ s, CPLD adopts 20MHz as the clock frequency driving VGA sequential, the sweep length of each pixel is 50ns, total number of pixel cells of often going is 31.77 μ s/50ns=636, and valid pixel unit number is 25.17 μ s/50ns=512.Row resolution adopts the form of standard, and total number of pixel cells of often going is 524, and effective line number is 480.Clashing in order between the data that prevent from carrying out read-write operation to video memory simultaneously, requiring can not carry out write operation when carrying out read operation, and write operation complete after its data pin will be made to be in high resistant.
System menu generates primarily of ARM, because CPLD also needs to use a few thing parameter as outer synchronous divider ratios, and ARM regulates the linear velocity information also needing acquisition to calculate through CPLD during the working point of A/D, therefore during design, CPLD opens bus to ARM with the form of register, ARM carries out read-write operation with its asynchronous memory bus to these registers, realizes the co-ordination between ARM and CPLD.CPLD is first written to ARM the menu data value in its register, is saved in address location fixing in video memory, then carries out VGA display by the data read in video memory, realizes menu interface.ARM programmes based on μ C/OS-II system architecture, can realize multi-task scheduling easily, and operation when especially selecting for multizone achieves and is similar to the action that mouse pulls choice box.During real work, the parameter that DSP carries out multizone graphical analysis and detection also sends to DSP by ARM by serial ports.In addition, based on the data manipulation of on-chip bus, the real-time of interface display can be ensured, overcome the inconvenience that Based PC interface carries out debugging.
The IO of system mainly comprises two parts function: image acquisition controls and bad part eject controls.Image acquisition controls to be realized by outer synchronous and external trigger input signal.System is in operational process, CCD is continuous sweep, but the production of finished product is spaced, will pass through external trigger signal like this, correctly identify the reference position of each product in the movement direction, calculate to notify that this part view data is written in DSP by CPLD.External trigger is counted as electric cam by the code device signal on production line, realized by the counting output of electric cam.
In addition, because system adopts linear array CCD scanning image, the line frequency of scanning needs the linear velocity with production line corresponding, to ensure that image can not be out of shape because of the change of line speed, the accuracy that range of influence is selected, ensures image detection accuracy, wants synchronous when gathering image like this.Adopt the servo drive signal of servoamplifier as synchronizing signal benchmark, and determine the sample frequency of image with the divider ratios arranged.
CPLD is when gathering image, and the realtime graphic of acquisition is kept in video memory with the sampling of 4:1 ratio.The realtime graphic shown in VGA interface, the vertical line of the Far Left one row white of meeting at interface identifies the image in toggle area, to distinguish the image in non-toggle region, conveniently debugs and monitors.
Bad part eject is after DSP carries out image operation, when finding that there is abnormal conditions, by the pulse signal notice CPLD on output pin, sent that screening pulse signal realizes to the topworks of production line again by CPLD. because the view data that DSP such as is at the CPLD to be obtained to be write carry out calculating, and a point sector signal (i.e. external trigger signal) for product is linked into CPLD to control image acquisition, as long as that is DSP has data just to calculate, and no matter when outer triggering signal starts.But the position that the position at the substandard products place that topworks rejects and vision system are installed, or not same place, likely differs the position of several product.When DSP sends abnormal pulsers to CPLD, just mean that this product current has problem, but these substandard products will on a production line more forward several position just can be performed mechanism and reject, therefore reject pulse and will postpone to send, this unit postponed is exactly the counting of several times external trigger.CPLD is according to the delay number that interface pre-sets, after receiving the detection abnormal pulsers that DSP sends, external trigger is subsequently counted, each counting is equivalent to a product space of passing by, when count value equals the delay number arranged, just send and reject pulse to topworks, thus complete the rejecting of substandard products.
The control tasks such as the multizone image zooming-out when DSP in system not only will complete the storage allocation of original image and detect, also will complete analysis and the computing of image, the BlackFin531 that therefore have employed ADI during design is core processor.BlackFin series DSP architecture realizes on the basis of the micro-signal mechanism (MSA) that ADI and Intel develops jointly, be not only applicable to digital signal processing, additionally provide comprehensive control ability, eliminate the complicacy be associated between multiple different processor, simplify the structure of system, add the reliability of system to a certain extent.During design, BlackFin531 adopts μ C/OS-II framework to programme, and to facilitate multi-task scheduling, the Bus Clock Rate of work is obtained by outside 27MHz crystal oscillator frequency multiplication, and Clock Multiplier Factor is 20, and namely the Bus Clock Rate of DSP is 540MHz.
The ccd sensor data that CPLD will collect, are written in PPI interface buffer memory by the PPI interface of BlackFin531 processor, carry out data transmission by PPI in conjunction with DMA technology.The data that the view data of two 8 is packaged as 16, when carrying out the transmission of DMA data, are transmitted by the PPI interface of BlackFin531, can improve the utilization factor of storage space and the speed of data transmission.Write to prevent the destructiveness of data, ensure the completeness and efficiency of view data, system opens the buffer area of 2 BANK as original image in the outside SDRAM storage space of BlackFin531, preserve the view data of 2048 × 2048 pixels respectively, represent the view data that can store 2048 CCD scannings.。
When vision system runs on actual production line, detection algorithm must have real-time while guarantee accuracy of detection.In the calculating of accuracy of detection, according to the handbook of TCD1209D sensor, under sensor can be operated in the data transfer rate of 20MB, its resolution is 2048 pixels, so the line frequency of its scanning is just 20MB/2048=10000, namely, when CCD works with the fastest line frequency, the time of every run-down is 0.1ms.The CCD resolution that known vertical movement direction is installed is 2048 pixels, and general nonwoven fabrics finished product is in the width of 30cm, and so corresponding resolution is about every millimeter of 7 pixels, and the accuracy of detection therefore on vertical movement direction can ensure.And the precision in direction of motion depends on the sweep frequency of CCD, when running under the linear velocity of production line at 300m/min, CCD also works under highest frequency, at this moment the distance that scan period production line is passed by is 0.1ms × 5m/s and 0.5mm, namely the distance of every millimeter at least can scan twice, and thus system can ensure 1mm under the linear velocity of 300m/min 2accuracy of detection.
Analyzed from above-mentioned accuracy of detection, in order to ensure the precision detected, under CCD needs to be operated in the line frequency of 10kHz, DSP only completes the process of 2048 data of single pass in 0.1ms, the real-time of guarantee computing.Owing to adopting DMA passage to carry out data transmission when image stores, and employ two each and every one buffer areas and carry out data buffering, therefore the transmission time of data can not be considered within the algorithm time.
For accuracy of detection requirement, detection algorithm considers that the characteristic of image carries out designing from direction of motion and vertical movement direction.We adopt the mode of locator field to determine the reference position of image border because other the region unit split all realizes based on the relative starting position of locator field, the determination of locator field we adopt edge detection algorithm to realize.After determining locator field, the position in other regions also just secures relatively, the original image in these regions, original image extraction can be carried out by the DMA two-dimensional operation of DSP, the original image of these regionals extracted, just can carry out spot detection by several detection algorithms preset in region, introduce a kind of Threshold segmentation statistic algorithm implementation procedure here.
First algorithm considers the problem in direction of motion.Adopt line array CCD can obtain the image of high-velocity scanning, but the surface of finished product is not smooth surface usually, if detected with 2048 of single pass data, must reflect the feature of image, easily cause erroneous judgement.So during program design, the data of 20 row be stitched together, form the face system of battle formations picture in a subrange, then detect, the characteristic information of this sampled images is abundanter, thus while guarantee accuracy of detection, improves the reliability detected.The data processing time completing these 20 lines requires to realize in 2ms.
Secondly, the problem on vertical movement direction is considered.When installation system, because the reason of mechanical erection, cause two ends, ccd sensor left and right uneven illumination even, thus occur the situation that the view data left and right two ends brightness that collects is different.If adopt unified threshold value to carry out Iamge Segmentation, easily cause erroneous judgement.So need during designed image detection algorithm to consider dynamic threshold, namely again piecemeal is carried out to the image of 20 row, and suppose that the mean picture brightness in adjacent two pieces of regions is close, the threshold value that the average brightness of normal pixel is split as next area image in previous region.Be an image-region with 20 × 20 regions during piecemeal.
In product line, the spot type of finished surface is a lot, and the area of spot varies.For the interrupted thread spot be connected, in the region of 20 × 20, the blemished area added up during detection is not enough to the threshold value reaching warning, therefore needs to find that the region of stain marks, and adds up to the blemished area in the adjacent area of mark.
To each 20 × 20 region units, the segmentation threshold of mean value as this region of all pixel intensity of defect pixel will not be comprised in a upper region, add up the image pixel number not meeting Threshold segmentation in this region, using the area of this statistical value as spot.If the area of spot is greater than default alarm threshold value in 20 × 20 regions, so DSP exports and judges that abnormal pulsers is to CPLD in I/O pin.If the spot area of statistics is less than alarm threshold value, so marks this region and adjacent 8 regions, and add up the area of spot in 9 regions, the basis for estimation using this area sum as the interrupted thread spot that is connected.When algorithm realizes on DSP, in order to there be processing speed faster, ensure the real-time of computing, the process of each 20 × 20 area datas carries out in the inner buffer of BlackFin531, and open two memory blocks at inner buffer, adopt the storer DMA passage of BlackFin531, each 20 × 20 area datas are moved DSP inner buffer with the form of ping-pong operation from SDRAM, the time of data-moving when carrying out computing like this, can be ignored.Image processing flow as shown in Figure 3, before carrying out spot judgement, has carried out filtering process to image, to reduce the impact that noise judges spot.The saltus step waveform in the I/O pin of BlackFin531 is checked by oscillograph, find that this algorithm 20 × 2048 pixel times used of calculating are less than 2ms, and when working, consider the setting of detection boundaries, the actual every bar line of sensing range is less than 2048 pixels, so algorithm has real-time while guarantee accuracy of detection.
For the judgement of " statistical value is greater than alarm threshold value ", if the statistical pixel number of current region is less than setting threshold value, then need to mark 8 regions adjacent with current 20 × 20 pixel regions, if the statistical value sum in 9 regions exceeds empirical value, then think to there is thread spot within the scope of this, system produces screening pulse signal, and faulty goods is rejected after receiving pulse signal by topworks, completes the surface defect detection in cut zone.
Above-described embodiment is the present invention's preferably embodiment; but embodiments of the present invention are not restricted to the described embodiments; change, the modification done under other any does not deviate from Spirit Essence of the present invention and principle, substitute, combine, simplify; all should be the substitute mode of equivalence, be included within protection scope of the present invention.

Claims (7)

1. based on a multi_region vision detection system for embedded framework, it is characterized in that, comprise CPLD subsystem, ARM subsystem, DSP subsystem and IO subsystem;
CPLD subsystem drives image-signal processor to gather raw image data according to outer synchronous signal and trigger pip, and is written in DSP by these data, and CPLD subsystem carries out video memory management and VGA outgoing management to man-machine interface simultaneously;
The generation of the custom menu in ARM subsystem controls man-machine interface and the action of response hand behaviour plate complete setting and the multi_region optimum configurations of image acquisition running parameter;
DSP subsystem, the running parameter arranged according to ARM subsystem and region, complete the image procossing in multiple regions of splitting respectively, produces judged result and also export pulse;
IO subsystem, the IO of system comprises image acquisition and controls and bad part eject control; Process external trigger and external synchronization signal, ensure that the original image gathered can not produce distortion because of the change of line speed; In addition after DSP detects stain, according to after the delay screening number that counting is preset, send bad part eject signal;
Described ARM subsystem comprises the asynchronous storage bus interfaces, the I2C interface of configuration image process chip, the serial ports be connected with DSP and the expansion interface that are connected with CPLD, ARM system is as the controller of vision system, the setting of the man-machine interface management of primary responsibility and system operational parameters, ARM arranges the related register of the special ccd sensor image collection chip of VSP1021 by I2C interface; CPLD carries out read-write operation with its asynchronous memory bus to these registers to ARM, ARM with the open bus of the form of register, realizes the co-ordination between ARM and CPLD, completes the management of man-machine interface; Simultaneously ARM is connected with DSP by serial ports, image is detected, the parameter of region segmentation is supplied to DSP, to complete the analysis of image;
Described DSP subsystem comprises image storage section, image processing section, external interface part formation, image storage section provides PPI interface to CPLD by DSP, during work, CPLD produces the signal meeting DSP data bus sequential, the raw CCD images data collected are written in the buffer memory of PPI interface data bus of DSP, and by the dma operation of DSP, the data in buffer memory are saved in SDRAM, complete image and store; The running parameter that these original images are arranged according to ARM subsystem by DSP and region, complete the image procossing in multiple regions of splitting respectively; External interface part is connected with ARM by serial ports, obtains Image Processing parameter, and the judged result that last image operation produces also outputs signal to CPLD process by external terminal.
2. the multi_region vision detection system based on embedded framework according to claim 1, it is characterized in that, described CPLD subsystem comprises image acquisition, video memory management, outer synchronous and external trigger management, CPLD subsystem responses outer synchronous signal and trigger pip, image-signal processor is driven to gather raw image data, and will the signal meeting DSP data bus sequential being produced, the view data these collected is written in the buffer memory of DSP data bus; Man-machine interface manages SRAM static memory as video memory by CPLD, CPLD opens bus to ARM with the form of register, ARM carries out read-write operation with its asynchronous memory bus to these registers, the renewal of video memory data is realized by the register of ARM read-write CPLD, CPLD is first written to ARM the menu data value in its register, be saved in address location fixing in video memory, then carry out VGA display by the data read in video memory, realize menu interface.
3. the multi_region vision detection system based on embedded framework according to claim 1, it is characterized in that, described IO subsystem is made up of outer synchronous, external trigger, bad part eject screening signal, system is in operational process, CCD is continuous sweep, correctly identify the reference position of each product in the movement direction, calculate to notify that this part view data is written in DSP by CPLD, external trigger is counted as electric cam by the code device signal on production line, realized by the counting output of electric cam; The outer synchronous servo drive signal of servoamplifier that adopts as synchronizing signal benchmark, and determines the sample frequency of image with the divider ratios arranged; Bad part eject is after DSP carries out image operation, when finding that there is abnormal conditions, by pulse signal on output pin notice CPLD, then is sent by CPLD that screening pulse signal realizes to the topworks of production line; CPLD is according to the delay number that interface pre-sets, after receiving the detection abnormal pulsers that DSP sends, external trigger is subsequently counted, each counting is equivalent to a product space of passing by, when count value equals the delay number arranged, just send and reject pulse to topworks, complete the rejecting of substandard products.
4. the detection method of the multi_region vision detection system based on embedded framework according to claim 1, is characterized in that, comprise the steps:
S1, on tangential movement direction, adopt line array CCD to obtain the image of high-velocity scanning, the data of N scanning are stitched together, form the face system of battle formations picture in a subrange, then detect; Therefore the PPI interface dma operation of DSP and the Memory Allocation of SDRAM operate according to N bar line, and the data processing time completing this N bar line requires to realize in N × 0.1ms;
S2, on vertical movement direction, piecemeal is carried out to the image of the N bar line collected, and suppose that the mean picture brightness in adjacent two pieces of regions is close, the threshold value that the average brightness of normal pixel is split as next area image in previous region is an image-region with N × n-quadrant during piecemeal;
S3, to each N × n-quadrant block, the segmentation threshold of mean value as this region of all pixel intensity of defect pixel will not be comprised in a upper region, add up the image pixel number not meeting Threshold segmentation in this region, using the area of this statistical value as spot; If the area of spot is greater than default alarm threshold value in N × n-quadrant, so DSP exports and judges that abnormal pulsers is to CPLD in I/O pin, if the spot area of statistics is less than alarm threshold value, so mark this region and an adjacent M region, and add up the area of spot in M+1 region, the basis for estimation using this area sum as the interrupted thread spot that is connected.
5. the detection method of the multi_region vision detection system based on embedded framework according to claim 4, it is characterized in that, the process of each N × n-quadrant data carries out in the inner buffer of BlackFin531, and open two memory blocks at inner buffer, adopt the storer DMA passage of BlackFin531, each N × n-quadrant data are moved DSP inner buffer with the form of ping-pong operation from SDRAM, the time of data-moving when carrying out computing like this, can be ignored.
6. the detection method of the multi_region vision detection system based on embedded framework according to claim 4, it is characterized in that, before carrying out spot judgement, filtering process has been carried out to image, to reduce the impact that noise judges spot, the saltus step waveform in the I/O pin of BlackFin531 is checked by oscillograph, find that this algorithm calculating N × 2048 pixel time used is less than N × 0.1ms, and when working, consider the setting of detection boundaries, the actual every bar line of sensing range is less than 2048 pixels, so algorithm has real-time while guarantee accuracy of detection.
7. the detection method of the multi_region vision detection system based on embedded framework according to claim 4, it is characterized in that, for the judgement of " statistical value is greater than alarm threshold value ", if the statistical pixel number of current region is less than setting threshold value, then need to mark M the region adjacent with current N × N pixel region, if the statistical value sum in M+1 region exceeds empirical value, then think to there is thread spot within the scope of this, system produces screening pulse signal, faulty goods is rejected after receiving pulse signal by topworks, complete the surface defect detection in cut zone.
CN201210556819.7A 2012-12-18 2012-12-18 Multi-zone segmentation visual detection system and method based on embedded type framework Active CN103018259B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210556819.7A CN103018259B (en) 2012-12-18 2012-12-18 Multi-zone segmentation visual detection system and method based on embedded type framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210556819.7A CN103018259B (en) 2012-12-18 2012-12-18 Multi-zone segmentation visual detection system and method based on embedded type framework

Publications (2)

Publication Number Publication Date
CN103018259A CN103018259A (en) 2013-04-03
CN103018259B true CN103018259B (en) 2015-07-01

Family

ID=47967106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210556819.7A Active CN103018259B (en) 2012-12-18 2012-12-18 Multi-zone segmentation visual detection system and method based on embedded type framework

Country Status (1)

Country Link
CN (1) CN103018259B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103776837B (en) * 2013-11-18 2016-05-25 深圳盛世天予科技发展有限公司 A kind of vision positioning device and control method thereof of LED encapsulation
CN106331540B (en) 2016-09-13 2019-09-13 首都师范大学 A kind of multi-mode cmos image sensor and its control method
CN108195855B (en) * 2017-12-27 2023-11-03 同方威视技术股份有限公司 Security check system and method thereof
CN108564627B (en) * 2018-04-02 2021-11-02 成都精工华耀科技有限公司 Linear array image sleeper positioning and counting method based on multi-region gray projection
CN110691272B (en) * 2019-10-18 2021-08-10 四川长虹电器股份有限公司 Method for improving image display effect and video playing effect
CN111402234B (en) * 2020-03-16 2024-05-03 深圳市启灵图像科技有限公司 Machine vision detecting system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202256179U (en) * 2011-09-09 2012-05-30 杭州品目科技有限公司 Surface defect detection device based on machine vision for sanitary towels and paper diapers
CN102724485A (en) * 2012-06-26 2012-10-10 公安部第三研究所 Device and method for performing structuralized description for input audios by aid of dual-core processor

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1019789A (en) * 1996-06-28 1998-01-23 Hitachi Ltd Fabrication of semiconductor device
JP2001083099A (en) * 1999-09-14 2001-03-30 Tokin Corp Stain sensor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202256179U (en) * 2011-09-09 2012-05-30 杭州品目科技有限公司 Surface defect detection device based on machine vision for sanitary towels and paper diapers
CN102724485A (en) * 2012-06-26 2012-10-10 公安部第三研究所 Device and method for performing structuralized description for input audios by aid of dual-core processor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种嵌入式机器视觉的图像处理系统设计;张谦等;《广东第二师范学院学报》;20111031;第31卷(第5期);全文 *
无纺布成品表面污渍机器视觉检测系统的设计;张谦等;《华南理工大学学报》;20120331;第40卷(第3期);82页右栏第2段,83页左栏第4段、右栏第2段,84页左栏第2段、右栏第2段,85页左栏第2段,右栏4-7段,86页左栏1、2段,86页右栏1段和图1 *

Also Published As

Publication number Publication date
CN103018259A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN103018259B (en) Multi-zone segmentation visual detection system and method based on embedded type framework
CN101002230A (en) Method and apparatus for improved vision detector image capture and analysis
US8249297B2 (en) Method and apparatus for automatic visual event detection
JP5575867B2 (en) Method and apparatus for automatic visual event detection
US20050226490A1 (en) Method and apparatus for improved vision detector image capture and analysis
JP5469433B2 (en) Image processing apparatus and image processing method
JP5350444B2 (en) Method and apparatus for automatic visual event detection
CN102854195B (en) Method for detecting defect coordinates on color filter
CN201540259U (en) Online flaw detector of textile
CN109174693A (en) A kind of synchronous method of linear sweep graph as acquisition system and device for eliminating
US9651499B2 (en) Configurable image trigger for a vision system and method for using the same
CN202486064U (en) Digital image processing system used for detecting blots on surface of finished non-woven fabric
CN108827976A (en) A kind of amenities stain vision detection system
CN201681051U (en) Visual detecting system for chip encapsulating and forming quality of integrated circuit
CN105203045A (en) System and method for detecting product shape integrity based on asynchronous time domain vision sensor
CN102302372A (en) Full-digital electronic system of full-digital processing device
CN202126273U (en) Automatic detecting system for automobile combination meter products
CN202989448U (en) Broken yarn detection device based on video signal processing
Karloff et al. A flexible design for a cost effective, high throughput inspection system for pharmaceutical capsules
Zhang et al. A Visual Detection System Design of Multi-region Segmentation Based on Embedded System Framework
US9152137B2 (en) Device activating unit and CPU
CN101943971B (en) Multi-contact identification system and method
US11816827B2 (en) User interface device for autonomous machine vision inspection
CN113970551A (en) Material surface quality detection method and system and storage device
CN206725462U (en) A kind of metering automation terminal appearance detecting system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant