CN103018259A - 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
CN103018259A
CN103018259A CN2012105568197A CN201210556819A CN103018259A CN 103018259 A CN103018259 A CN 103018259A CN 2012105568197 A CN2012105568197 A CN 2012105568197A CN 201210556819 A CN201210556819 A CN 201210556819A CN 103018259 A CN103018259 A CN 103018259A
Authority
CN
China
Prior art keywords
image
cpld
dsp
subsystem
arm
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.)
Granted
Application number
CN2012105568197A
Other languages
Chinese (zh)
Other versions
CN103018259B (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

Images

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

Multi_region vision detection system and detection method based on embedded framework
Technical field
The present invention relates to image 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 that all use in the finished product of the personal hygiene articles such as baby diaper and sanltary towel is made, they are disposable products, and directly contact with human body, thereby client extremely pays close attention to quality and the sanitary condition of product.Yet in the production run of finished product, the dirts such as some machine greasy dirts, powder, a glue even dead insect can occur inevitably and be attached on the finished surface, the size of these dirts differs.The line speed per minute of present domestic personal hygiene article industry is up to 300m, and the artificial random sampling before the packing detects not only inefficiency, can't detect all products, and increase personnel cost.At production line vision detection system being installed, is the new demand that proposes of domestic nonwoven fabrics finished product production firm over the past two years.The Vision Builder for Automated Inspection of at present personal hygiene article industry use mainly contains two kinds: the integrated system that (1) international large manufacturer provides, such as the vision system of Cognex, Keyence, Omron etc.; (2) more domestic companies adopt the vision system of OEM camera independent development on personal computer (PC) platform.Yet these two kinds of vision systems is expensive, and not only the cost of production line manufacturing firm and final products manufacturer has increased, and can't grasp the core knowledge property right.
In addition, the finished product of actual infant's nappy and adult health's articles for use often is not a lily surface in quality and the effect of design in order to improve product, not only has embossing, but has added other absorbent material, is referred to as blue chip.Embossing and blue chip and nappy surface exist very large gray scale difference, vision system is used as spot to embossing and blue chip easily when detecting, so the existence of embossing and blue chip has directly caused the surface defect detection system need to carry out dividing processing to different zones when design.
Summary of the invention
The shortcoming that the object of the invention is to overcome prior art provides a kind of multi_region vision detection system that detects False Rate, improves detecting reliability that reduces with not enough.
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 the first purpose, 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;
The CPLD subsystem drives image-signal processor collection raw image data according to outer synchronous signal and trigger pip, and these data are written among the DSP, and the CPLD subsystem carries out video memory management and VGA outgoing management to man-machine interface simultaneously;
Setting and the setting of multi_region parameter of image acquisition running parameter finished in the generation of the custom menu in the ARM subsystem controls man-machine interface and the action of response hand behaviour plate;
The DSP subsystem, according to running parameter and the zone that the ARM subsystem arranges, the image of finishing respectively in a plurality of zones that split is processed, and produces judged result and exports pulse;
IO subsystem, the IO of system comprise image acquisition control and bad part eject control; Process external trigger and external synchronization signal, guarantee that the original image that gathers can not produce because of the variation of line speed distortion; After DSP detects stain, behind the default delay screening number of counting, send the bad part eject signal in addition.
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, drive image-signal processor and gather raw image data, and generation met the signal of DSP data bus sequential, these view data that collect are written in the buffer memory of DSP data bus; Man-machine interface is as video memory by CPLD management SRAM static memory, CPLD opens bus to ARM with the form of register, ARM carries out read-write operation with its asynchronous memory bus to these registers, realize the renewal of video memory data by the register of ARM read-write CPLD, CPLD first is written to menu data value in its register to ARM, be saved in address location fixing in the video memory, carry out the VGA demonstration by the data that read in the video memory again, realize menu interface.
Preferably, described ARM subsystem comprises the asynchronous storage bus interfaces that is connected with CPLD, the I2C interface of configuration image process chip, the serial ports that is connected with DSP and expansion interface, the ARM system is as the controller of vision system, the setting of the interface management of chief leading cadre's machine and system operational parameters, ARM arranges the related register of the special-purpose ccd sensor image collection chip of VSP1021 by the I2C interface; To ARM, ARM carries out read-write operation with its asynchronous memory bus to these registers to CPLD with the open bus of the form of register, realize between ARM and the CPLD co-ordination, finish the management of man-machine interface; ARM is connected with DSP by serial ports simultaneously, the parameters such as image detection, Region Segmentation is offered DSP, to finish the analysis of image.
Preferably, described DSP subsystem comprises, comprise that image storage section, image processing section, external interface partly consist of, image storage section provides the PPI interface to CPLD by DSP, CPLD produces the signal that meets DSP data bus sequential during work, the original ccd image data that collect are written in the buffer memory of PPI interface data bus of DSP, and by the dma operation of DSP the data in the buffer memory are saved among the SDRAM, finish the image storage; According to running parameter and zone that the ARM subsystem arranges, process by the image of finishing respectively in a plurality of zones that split by DSP for these original images; The external interface part is connected with ARM by serial ports, obtains the image processing parameter, and the judged result that last image operation produces also outputs signal to CPLD by external terminal and processes.
Preferably, described IO subsystem comprises, the IO subsystem by outer synchronously, the screening signal of external trigger, bad part eject consists of, system is in operational process, CCD is continuous sweep, yet the production of finished product is spaced, will pass through the external trigger signal like this, on direction of motion, correctly identify the reference position of each product, calculate to notify CPLD that this part view data is written among the DSP, external trigger is that the code device signal on the production line is counted as electric cam, exports to realize by the counting of electric cam;
In addition, because system adopts the linear array CCD scanning image, the line frequency of scanning need to be corresponding with the linear velocity of production line, to guarantee that image can not be out of shape because of the variation of line speed, the accuracy that the range of influence is selected guarantees the image detection precision, wants when gathering image so synchronously, adopt the servo drive signal of servoamplifier as the synchronizing signal benchmark, and determine the sample frequency of image with the divider ratios that arranges;
Bad part eject is after DSP carries out image operation, when finding that abnormal conditions are arranged, by the notice of the pulse signal on output pin CPLD, is sent by CPLD that the screening pulse signal realizes to the topworks of production line again; Because DSP waits for obtaining the view data that CPLD writes and calculating, and minute sector signal (being the external trigger signal) of product is linked into CPLD and controls image acquisition, there are data just to calculate as long as that is to say DSP, and no matter when outer triggering signal begins.But the position that the position at the substandard products place that topworks rejects and vision system are installed might differ the position of several products not in same place.When DSP sends abnormal pulsers to CPLD, just mean that current this product has problem, but these substandard products will be on production line more forward several positions just can be performed mechanism and reject, therefore reject pulse and will postpone to send, the unit of this delay is exactly the counting of several times external trigger.CPLD is according to the delay number that sets in advance on the interface, after receiving the detection abnormal pulsers that DSP sends, external trigger is subsequently counted, each product space that is equivalent to pass by of counting, when the delay that equals to arrange when count value is counted, just send and reject pulse to topworks, thereby finish the rejecting of substandard products.
In order to reach above-mentioned the second purpose, 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 the accuracy of detection requirement, detection algorithm is to consider that from tangential movement direction and vertical movement direction the characteristic of image designs.The present invention adopts the mode of locator field to determine the reference position of image border realize because other the region unit that splits all is based on the relative reference position of locator field, locator field determine that we adopt edge detection algorithm to realize.After determining locator field, other regional positions are also just relatively fixing, the original image that these are regional, can carry out by the DMA two-dimensional operation of DSP original image extracts, the original image of the regional that these extract, just can carry out spot by several detection algorithms default in the zone and detect, introduce a kind of Threshold segmentation statistic algorithm implementation procedure here.Its concrete steps are as follows:
S1, on the tangential movement direction, adopt line array CCD to obtain the image of high-velocity scanning, the data of N scanning are stitched together, consist of the interior face system of battle formations picture of a subrange, detect again; 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 of finishing this N bar line requires to realize in N * 0.1ms;
S2, on the vertical movement direction, image to the N bar line that collects carries out piecemeal, and the mean picture brightness of supposing adjacent two zones is close, the threshold value of cutting apart as next area image with the average brightness of normal pixel in the previous zone is an image-region take N * n-quadrant during piecemeal;
S3, to each N * n-quadrant piece, to not comprise in the upper zone that the mean value of all pixel intensity of defect pixel is as this regional segmentation threshold, add up the image pixel number that does not satisfy Threshold segmentation in this zone, with the area of this statistical value as spot; If the area of spot is greater than default alarm threshold value in N * n-quadrant, DSP judges that in the output of IO pin abnormal pulsers is to CPLD so, if the spot area of statistics is less than alarm threshold value, mark should the zone and M adjacent zone so, and the area of M+1 the interior spot in zone of statistics, with the basis for estimation of this area sum as the interrupted thread spot that links to each other.
Preferably, the processing of each N * n-quadrant data is to carry out in the inner buffer of BlackFin531, and two memory blocks have been opened up at inner buffer, adopt the storer DMA passage of BlackFin531, each N * n-quadrant data are moved the DSP inner buffer with the form of ping-pong operation from SDRAM, can ignore the time of data-moving when carrying out computing like this.
Preferably, before carrying out the spot judgement, image has been carried out the filtering processing, the impact of spot being judged to reduce noise, check the saltus step waveform on the IO pin of BlackFin531 by oscillograph, find that this algorithm calculates the N * 2048 used time of a pixel less than N * 0.1ms, and consider the setting of detection boundaries during work, actual every line of sensing range is less than 2048 pixels, so algorithm has real-time when guaranteeing accuracy of detection.
Preferably, judgement for " statistical value is greater than alarm threshold value ", if the statistical pixel number of current region is less than setting threshold, then need mark M the zone adjacent with current N * N pixel region, if the statistical value sum in M+1 zone exceeds empirical value, think then to have thread spot in this scope that system produces the screening pulse signal, topworks after receiving pulse signal rejects faulty goods, finishes the surface defect detection in the cut zone.
The present invention has following advantage and effect with respect to prior art:
1, embedded machine vision detection system of the present invention has been introduced hardware configuration and spot determination methods that the multi_region of system is processed, and the impact that can avoid blue chip that spot is judged during detection reduces False Rate, improves the reliability that detects.Simultaneously this system integration man-machine interface, can avoid relying on computing machine and the ease of use issues that causes.Practical application shows, in the nappy production line that this system's on-line velocity is 300m/min, can detect 1 square millimeter spot.
2, the present invention adopts the vision detection system of embedded frame design, integrated man machine operation interface so that the debugging of system and parameter are no longer dependent on industrial computer, has not only reduced cost, and flexible for installation, operating aspect, improved the ease for use of system.
3, the present invention adopt 2048 pixels high speed linear array CCD as the image acquisition sensor, can realize the high resolution detection of 30cm wide format, the precision that guarantee to detect.
4, the present invention has outer synchronous and external trigger signal capture function, guarantees that the image that gathers when line speed changes is indeformable.
5, a pair complete finished figure picture of the present invention to collecting, can carry out multi_region processes, each zone can self defined area reference position and area, and select different detection algorithms according to the characteristic of finished product, to realize that the finished surface spot with embossing and blue chip detects, improved the reliability that system detects.
Description of drawings
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 of the present invention.
Embodiment
The present invention is described in further detail below in conjunction with embodiment and accompanying drawing, but embodiments of the present invention are not limited to this.
Embodiment
Vision Builder for Automated Inspection comprises image acquisition and image processing two parts, and what image acquisition adopted is charge coupled cell (CCD) sensor.Ccd sensor can be divided into two kinds of face battle array and linear arrays from the chip structure, area array CCD is mainly used in record, storage, and line array CCD is mainly used in the accurate location in non-contact detecting, classification, surface quality evaluation, intelligent measurement and control and the machine vision of product external dimensions etc.Line array CCD has imaging resolution, pixel grayscale and sample rate height and detects the characteristics such as size is large, can realize high-precision detection.The amenities such as nappy have at a high speed in process of production usually, the characteristics of large format, so adopt the more realistic application requirements of linear CCD sensor.
Embedded machine vision system is when gathering image, can utilize CPLD (CPLD) driven CCD sensor, and according to the sequential requirement of DSP data bus, realize the high-speed transfer of view data, so not only can flexible design and installation, and can guarantee real-time and the reliability of data transmission.For other part dividing processing of finished surface are followed in embossing and blue chip, the multi_region of implementation algorithm is processed, and system has adopted ARM as controller, and the convenience of ARM programming helps to realize man-machine interface and Region Segmentation operation.And DSP provides abundant image to process function and digital processing ability has at a high speed been arranged, and can finish at short notice image processing algorithm, guarantees the real-time of online detection algorithm.
As shown in Figure 1, system is mainly by comprising CPLD subsystem, ARM subsystem, DSP subsystem, IO subsystem.The raw image data Acquisition Circuit is made of CCD driving circuit, special image signal processor and peripheral circuit, the CPLD subsystem drives image-signal processor collection raw image data according to outer synchronous signal and trigger pip, and man-machine interface also will be carried out video memory management and VGA outgoing management by CPLD simultaneously.The ARM subsystem generates the generation of the custom menu in the major control man-machine interface and setting, multi_region parameter that the image acquisition running parameter is finished in the action of response hand behaviour plate and arranges etc., and these running parameters are given respectively CPLD and realized that image acquisition and DSP carry out image operation.Produce the signal that meets 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 the buffer memory are saved among the SDRAM, finish the image storage, the running parameter and the zone that are arranged according to the ARM subsystem by DSP at last, the image of finishing respectively in a plurality of zones that split is processed, and produces judged result and exports pulse.The IO interface signal of system comprises synchronizing signal, external trigger signal and the bad part eject signal of system.Synchronizing signal is from the servoamplifier pulse of production line, is used for the velocity variations of production control line and the corresponding relation between the CCD sampling line frequency, and stretching or compression deformation appears in the image of avoiding the variation of line speed to cause gathering.The external trigger signal is from the output of electric cam, is mainly used to identify on the direction of motion between discontinuous detection zone; The bad part eject signal is transferred to topworks and finds defective product to reject.
The system image acquisition is used linear CCD sensor, and its model is the TCD1209D of Toshiba, it be 2048 as quick unit effectively, data transfer rate is 20MB.Carry out the signal of image data acquiring by shown in Figure 3 by CPLD driven CCD sensor.
The output of TCD1209D shown in Figure 2 is finished the A/D conversion by the special-purpose ccd sensor image collection chip of VSP1021, and it supports double-sampling, built-in input clamping circuit and programmable gain amplifier.The SR that system provides by CPLD, SV and ADCCLK clock signal are regulated two sampling processes.Serial SCLK, SDIN and CS interface sequence that ARM provides by the I2C interface, the register on the configuration VSP1021 chip and adjusting gain.The raw image data of 8 precision of VSP1021 output, carry out logical process by CPLD after, the write timing requirement according to write timing and the video memory chip of DSP data bus is written in DSP internal memory and the video memory, for subsequent treatment.
Vision system generally needs to gather realtime graphic and analyzes, so that correct running parameter to be set when debugging.The debugging interface not only faces the real time problems of data transmission in enormous quantities, and PC will be installed on the production line take PC as Platform Designing, has reduced the ease for use of system, has increased the popularization difficulty.For this reason, when design system with regard to integrated man-machine interface, by its VGA interface, directly with interface display on the standard VGA display, and coming the interface of operating system with Simple hand behaviour plate, the parameter of finishing the work setting and Region Segmentation are selected, these running parameters and select the reference position, detection algorithm parameter etc. in zone, all be kept among the external EEPROM of system, guarantee to power on rear automatic loading parameters.
Man-machine interface has the three aspects: function: preserve realtime graphic and wait operation, generation system menu, VGA to show to finish the zone selection, the key that realizes this three aspects: function is the video memory management, during design system with the SRAM static memory as video memory, mainly realize the renewal of video memory data by the register of ARM read-write CPLD, realize the menu function of man-machine interface.
Refreshing of realtime graphic is after CPLD obtains the view data of VSP1021 output, at each row in synchronizing cycle, 2048 valid data of single pass write DSP, and the sampling ratio with 4:1 is kept at view data in the video memory simultaneously.System interface adopts standard 640 * 480 resolution of VGA, its line period is 31.77 μ s, CPLD adopts 20MHz as the clock frequency that drives the VGA sequential, the sweep length of each pixel is 50ns, the total number of pixel cells of every row is 31.77 μ s/50ns=636, and the valid pixel unit number is 25.17 μ s/50ns=512.Row resolution adopts the form of standard, and the total number of pixel cells of every row is 524, and effectively line number is 480.Simultaneously in order preventing video memory to be carried out clashing between the data of read-write operation, to require when carrying out read operation, can not carry out write operation, and write operation to make its data pin be in high resistant after finishing.
System menu is mainly generated by ARM, because CPLD also needs to use a few thing parameter such as outer synchronous divider ratios, and ARM also needs to obtain the linear velocity information that calculates through CPLD when regulating the working point of A/D, CPLD opens bus to ARM with the form of register when therefore designing, ARM carries out read-write operation with its asynchronous memory bus to these registers, realizes the co-ordination between ARM and the CPLD.CPLD first is written to menu data value in its register to ARM, is saved in address location fixing in the video memory, carries out VGA and shows by reading data in the video memory again, realizes menu interface.ARM is based on μ C/OS-II system architecture and programmes, and can realize easily multi-task scheduling, and the operation when especially selecting for multizone has realized being 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, can guarantee the real-time of interface display, overcome the inconvenience of debugging based on the PC interface.
The IO of system mainly comprises two parts function: image acquisition control and bad part eject control.Image acquisition control by outer synchronously and the external trigger input signal realize.System is in operational process, CCD is continuous sweep, yet the production of finished product is spaced, will pass through the external trigger signal like this, on direction of motion, correctly identify the reference position of each product, with notice CPLD this part view data is written among the DSP and calculates.External trigger is that the code device signal on the production line is counted as electric cam, exports to realize by the counting of electric cam.
In addition, because system adopts the linear array CCD scanning image, the line frequency of scanning need to be corresponding with the linear velocity of production line, to guarantee that image can not be out of shape because of the variation of line speed, the accuracy that the range of influence is selected guarantees the image detection precision, wants synchronously when gathering image like this.Adopt the servo drive signal of servoamplifier as the synchronizing signal benchmark, and determine the sample frequency of image with the divider ratios that arranges.
CPLD is when gathering image, and the realtime graphic that obtains is kept in the video memory with the sampling ratio of 4:1.The realtime graphic that shows in the VGA interface can identify image in the toggle area with the vertical line of white at Far Left one row at interface, distinguishing the image of non-toggle area, convenient debugging with monitor.
Bad part eject is after DSP carries out image operation, when discovery has abnormal conditions, by the notice of the pulse signal on output pin CPLD, sent by CPLD again that the screening pulse signal realizes to the topworks of production line. because DSP waits for obtaining the view data that CPLD writes and calculating, and minute sector signal (being the external trigger signal) of product is linked into CPLD and controls image acquisition, there are data just to calculate as long as that is to say DSP, and no matter when outer triggering signal begins.But the position that the position at the substandard products place that topworks rejects and vision system are installed might differ the position of several products not in same place.When DSP sends abnormal pulsers to CPLD, just mean that current this product has problem, but these substandard products will be on production line more forward several positions just can be performed mechanism and reject, therefore reject pulse and will postpone to send, the unit of this delay is exactly the counting of several times external trigger.CPLD is according to the delay number that sets in advance on the interface, after receiving the detection abnormal pulsers that DSP sends, external trigger is subsequently counted, each product space that is equivalent to pass by of counting, when the delay that equals to arrange when count value is counted, just send and reject pulse to topworks, thereby finish the rejecting of substandard products.
The control tasks such as multizone image extraction of the storage allocation that DSP in the system not only will finish original image when detecting also will be finished analysis and the computing of image, and having adopted the BlackFin531 of ADI when therefore designing is core processor.BlackFin series DSP architecture is to realize on the basis of the micro-signal mechanism (MSA) of ADI and Intel joint development, be not only applicable to digital signal processing, comprehensive control ability also is provided, eliminated the complicacy that interrelates between a plurality of different processors, simplify the structure of system, increased to a certain extent the reliability of system.BlackFin531 adopts μ C/OS-II framework to programme during design, and to make things convenient for 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.
CPLD is the ccd sensor data that collect, and the PPI interface by the BlackFin531 processor is written in the PPI interface buffer memory, carries out data transmission by PPI in conjunction with the DMA technology.The PPI interface of BlackFin531 is when carrying out the DMA data transmission, and the data that two 8 view data are packaged as 16 are transmitted, and can improve the utilization factor of storage space and the speed that data transmit.For the destructiveness that prevents data writes, guarantee the completeness and efficiency of view data, system has opened up 2 BANK as the buffer area of original image in the outside SDRAM storage space of BlackFin531, preserve respectively the view data of 2048 * 2048 pixels, expression can be stored the view data of 2048 CCD scannings.。
When vision system moved at the actual production line, detection algorithm must have real-time when guaranteeing accuracy of detection.In the calculating of accuracy of detection, according to the handbook of TCD1209D sensor as can be known, sensor can be operated under the data transfer rate of 20MB, its resolution is 2048 pixels, the line frequency of its scanning is 20MB/2048=10000 just so, when being CCD with the fastest line frequency work, 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 7 pixels, so the accuracy of detection on the vertical movement direction can guarantee.And the precision on the direction of motion depends on the sweep frequency of CCD, under the linear velocity of production line at 300m/min, move, CCD also works under highest frequency, at this moment scan period production line distance of passing by is that 0.1ms * 5m/s is 0.5mm, namely every millimeter distance can scan twice at least, thereby system can guarantee 1mm under the linear velocity of 300m/min 2Accuracy of detection.
By above-mentioned accuracy of detection analysis as can be known, for the precision that guarantees to detect, CCD need to be operated under the line frequency of 10kHz, and DSP only finishes the processing of 2048 data of single pass, the real-time of guarantee computing in 0.1ms.Owing to adopt the DMA passage to carry out data transmission during the image storage, and used two each and every one buffer areas to carry out data buffering, so the data transfer time can not considered at algorithm in the time.
For the accuracy of detection requirement, detection algorithm is to consider that from direction of motion and vertical movement direction the characteristic of image designs.We adopt the mode of locator field to determine the reference position of image border realize because other the region unit that splits all is based on the relative reference position of locator field, locator field determine that we adopt edge detection algorithm to realize.After determining locator field, other regional positions are also just relatively fixing, the original image that these are regional, can carry out by the DMA two-dimensional operation of DSP original image extracts, the original image of the regional that these extract, just can carry out spot by several detection algorithms default in the zone and detect,, introduce a kind of Threshold segmentation statistic algorithm implementation procedure here.
Algorithm is at first considered the problem on the direction of motion.Adopt line array CCD can obtain the image of high-velocity scanning, yet the surface of finished product not smooth surface usually, if detect with 2048 data of single pass, must reflect Characteristic of Image, cause easily erroneous judgement disconnected.So during program design, the data of 20 row are stitched together, consist of the face system of battle formations picture in the subrange, detect again, such Characteristic of Image more abundant information, thus when guaranteeing accuracy of detection, improve the reliability of detection.The data processing time of finishing these 20 lines requires to realize in 2ms.
Secondly, the problem on the consideration vertical movement direction.When installation system, because the reason of mechanical erection causes two ends, ccd sensor left and right sides uneven illumination even, thus the different situation of view data left and right sides two ends brightness that occurs collecting.If adopt unified threshold value to carry out image segmentation, cause easily erroneous judgement disconnected.So need to consider dynamic threshold during the designed image detection algorithm, namely the image of 20 row carried out piecemeal again, and the mean picture brightness of supposing adjacent two zones is close, the threshold value of cutting apart as next area image with the average brightness of normal pixel in the previous zone.Be an image-region during piecemeal take 20 * 20 zones.
In product line, the spot type of finished surface is a lot, and the area of spot varies.For the interrupted thread spot that links to each other, in 20 * 20 zone, the stain insufficient area of adding up during detection reaches the threshold value of warning, therefore mark need to be carried out in the zone of finding stain, and the stain area in the adjacent area of mark is added up.
To each 20 * 20 region unit, to not comprise in the upper zone that the mean value of all pixel intensity of defect pixel is as this regional segmentation threshold, add up the image pixel number that does not satisfy Threshold segmentation in this zone, with the area of this statistical value as spot.If the area of spot is greater than default alarm threshold value in 20 * 20 zones, DSP judges that in the output of IO pin abnormal pulsers is to CPLD so.If the spot area of statistics is less than alarm threshold value, mark should zone and 8 adjacent zones so, and add up the area of spot 9 zones in, with the basis for estimation of this area sum as intermittently continuous thread spot.When algorithm is realized at DSP, for faster processing speed is arranged, guarantee the real-time of computing, the processing of each 20 * 20 area data is to carry out in the inner buffer of BlackFin531, and two memory blocks have been opened up at inner buffer, adopt the storer DMA passage of BlackFin531, each 20 * 20 area data is moved the DSP inner buffer with the form of ping-pong operation from SDRAM, can ignore the time of data-moving when carrying out computing like this.The image treatment scheme before carrying out the spot judgement, has been carried out the filtering processing to image, the impact of spot being judged to reduce noise as shown in Figure 3.Check the saltus step waveform on the IO pin of BlackFin531 by oscillograph, find that this algorithm calculates 20 * 2048 used times of pixel less than 2ms, and when work considered the setting of detection boundaries, actual every line of sensing range is less than 2048 pixels, so algorithm has real-time when guaranteeing accuracy of detection.
Judgement for " statistical value is greater than alarm threshold value ", if the statistical pixel number of current region is less than setting threshold, then need mark 8 zones adjacent with current 20 * 20 pixel regions, if the statistical value sum in 9 zones exceeds empirical value, then think and have thread spot in this scope, system produces the screening pulse signal, and topworks after receiving pulse signal rejects faulty goods, finishes the surface defect detection in the cut zone.
Above-described embodiment is the better embodiment of the present invention; but embodiments of the present invention are not restricted to the described embodiments; other any do not deviate from change, the modification done under Spirit Essence of the present invention and the principle, substitutes, combination, simplify; all should be the substitute mode of equivalence, be included within protection scope of the present invention.

Claims (9)

1. the multi_region vision detection system based on embedded framework is characterized in that, comprises CPLD subsystem, ARM subsystem, DSP subsystem and IO subsystem;
The CPLD subsystem drives image-signal processor collection raw image data according to outer synchronous signal and trigger pip, and these data are written among the DSP, and the CPLD subsystem carries out video memory management and VGA outgoing management to man-machine interface simultaneously;
Setting and the setting of multi_region parameter of image acquisition running parameter finished in the generation of the custom menu in the ARM subsystem controls man-machine interface and the action of response hand behaviour plate;
The DSP subsystem, according to running parameter and the zone that the ARM subsystem arranges, the image of finishing respectively in a plurality of zones that split is processed, and produces judged result and exports pulse;
IO subsystem, the IO of system comprise image acquisition control and bad part eject control; Process external trigger and external synchronization signal, guarantee that the original image that gathers can not produce because of the variation of line speed distortion; After DSP detects stain, behind the default delay screening number of counting, send the bad part eject signal in addition.
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, drive image-signal processor and gather raw image data, and generation met the signal of DSP data bus sequential, these view data that collect are written in the buffer memory of DSP data bus; Man-machine interface is as video memory by CPLD management SRAM static memory, CPLD opens bus to ARM with the form of register, ARM carries out read-write operation with its asynchronous memory bus to these registers, realize the renewal of video memory data by the register of ARM read-write CPLD, CPLD first is written to menu data value in its register to ARM, be saved in address location fixing in the video memory, carry out the VGA demonstration by the data that read in the video memory again, realize menu interface.
3. the multi_region vision detection system based on embedded framework according to claim 1, it is characterized in that, described ARM subsystem comprises the asynchronous storage bus interfaces that is connected with CPLD, the I2C interface of configuration image process chip, the serial ports that is connected with DSP and expansion interface, the ARM system is as the controller of vision system, the setting of the interface management of chief leading cadre's machine and system operational parameters, ARM arranges the related register of the special-purpose ccd sensor image collection chip of VSP1021 by the I2C interface; To ARM, ARM carries out read-write operation with its asynchronous memory bus to these registers to CPLD with the open bus of the form of register, realize between ARM and the CPLD co-ordination, finish the management of man-machine interface; ARM is connected with DSP by serial ports simultaneously, the parameter of image detection, Region Segmentation is offered DSP, to finish the analysis of image.
4. the multi_region vision detection system based on embedded framework according to claim 1, it is characterized in that, described DSP subsystem comprises, comprise that image storage section, image processing section, external interface partly consist of, image storage section provides the PPI interface to CPLD by DSP, CPLD produces the signal that meets DSP data bus sequential during work, the original ccd image data that collect are written in the buffer memory of PPI interface data bus of DSP, and by the dma operation of DSP the data in the buffer memory are saved among the SDRAM, finish the image storage; According to running parameter and zone that the ARM subsystem arranges, process by the image of finishing respectively in a plurality of zones that split by DSP for these original images; The external interface part is connected with ARM by serial ports, obtains the image processing parameter, and the judged result that last image operation produces also outputs signal to CPLD by external terminal and processes.
5. the multi_region vision detection system based on embedded framework according to claim 1, it is characterized in that, described IO subsystem comprises, the IO subsystem by outer synchronously, the screening signal of external trigger, bad part eject consists of, system is in operational process, CCD is continuous sweep, on direction of motion, correctly identify the reference position of each product, calculate to notify CPLD that this part view data is written among the DSP, external trigger is that the code device signal on the production line is counted as electric cam, exports to realize by the counting of electric cam; The outer servo drive signal that adopts synchronously servoamplifier is as the synchronizing signal benchmark, and determines the sample frequency of image with the divider ratios that arranges; Bad part eject is after DSP carries out image operation, when finding that abnormal conditions are arranged, by the notice of the pulse signal on output pin CPLD, is sent by CPLD that the screening pulse signal realizes to the topworks of production line again; CPLD is according to the delay number that sets in advance on the interface, after receiving the detection abnormal pulsers that DSP sends, external trigger is subsequently counted, each product space that is equivalent to pass by of counting, when the delay that equals to arrange when count value is counted, just send and reject pulse to topworks, finish the rejecting of substandard products.
6. the detection method of the multi_region vision detection system based on embedded framework according to claim 1 is characterized in that, comprises the steps:
S1, on the tangential movement direction, adopt line array CCD to obtain the image of high-velocity scanning, the data of N scanning are stitched together, consist of the interior face system of battle formations picture of a subrange, detect again; 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 of finishing this N bar line requires to realize in N * 0.1ms;
S2, on the vertical movement direction, image to the N bar line that collects carries out piecemeal, and the mean picture brightness of supposing adjacent two zones is close, the threshold value of cutting apart as next area image with the average brightness of normal pixel in the previous zone is an image-region take N * n-quadrant during piecemeal;
S3, to each N * n-quadrant piece, to not comprise in the upper zone that the mean value of all pixel intensity of defect pixel is as this regional segmentation threshold, add up the image pixel number that does not satisfy Threshold segmentation in this zone, with the area of this statistical value as spot; If the area of spot is greater than default alarm threshold value in N * n-quadrant, DSP judges that in the output of IO pin abnormal pulsers is to CPLD so, if the spot area of statistics is less than alarm threshold value, mark should the zone and M adjacent zone so, and the area of M+1 the interior spot in zone of statistics, with the basis for estimation of this area sum as the interrupted thread spot that links to each other.
7. the multi_region vision detection system based on embedded framework according to claim 6, it is characterized in that, the processing of each N * n-quadrant data is to carry out in the inner buffer of BlackFin531, and two memory blocks have been opened up at inner buffer, adopt the storer DMA passage of BlackFin531, each N * n-quadrant data are moved the DSP inner buffer with the form of ping-pong operation from SDRAM, can ignore the time of data-moving when carrying out computing like this.
8. the multi_region vision detection system based on embedded framework according to claim 6, it is characterized in that, before carrying out the spot judgement, image has been carried out the filtering processing, the impact of spot being judged to reduce noise, check the saltus step waveform on the IO pin of BlackFin531 by oscillograph, find that this algorithm calculates the N * 2048 used time of a pixel less than N * 0.1ms, and when work considered the setting of detection boundaries, actual every line of sensing range is less than 2048 pixels, so algorithm has real-time when guaranteeing accuracy of detection.
9. the multi_region vision detection system based on embedded framework according to claim 6, it is characterized in that, judgement for " statistical value is greater than alarm threshold value ", if the statistical pixel number of current region is less than setting threshold, then need mark M the zone adjacent with current N * N pixel region, if M+1 the interior statistical value sum in zone exceeds empirical value, then think and have thread spot in this scope, system produces the screening pulse signal, topworks after receiving pulse signal rejects faulty goods, finishes the surface defect detection in the 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 true CN103018259A (en) 2013-04-03
CN103018259B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103776837A (en) * 2013-11-18 2014-05-07 深圳盛世天予科技发展有限公司 Visual positioning device for LED package and control method of visual positioning device
CN106331540A (en) * 2016-09-13 2017-01-11 首都师范大学 Multi-mode CMOS image sensor and control method thereof
CN108195855A (en) * 2017-12-27 2018-06-22 同方威视技术股份有限公司 Safety check system and its method
CN108564627A (en) * 2018-04-02 2018-09-21 成都精工华耀科技有限公司 A kind of positioning of linear array images sleeper and method of counting based on multizone Gray Projection
CN110691272A (en) * 2019-10-18 2020-01-14 四川长虹电器股份有限公司 Method for improving image display effect and video playing effect
CN111402234A (en) * 2020-03-16 2020-07-10 深圳市启灵图像科技有限公司 Machine vision detection system

Citations (4)

* 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
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

Patent Citations (4)

* 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
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
张谦等: "一种嵌入式机器视觉的图像处理系统设计", 《广东第二师范学院学报》 *
张谦等: "无纺布成品表面污渍机器视觉检测系统的设计", 《华南理工大学学报》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103776837A (en) * 2013-11-18 2014-05-07 深圳盛世天予科技发展有限公司 Visual positioning device for LED package and control method of visual positioning device
CN106331540A (en) * 2016-09-13 2017-01-11 首都师范大学 Multi-mode CMOS image sensor and control method thereof
CN106331540B (en) * 2016-09-13 2019-09-13 首都师范大学 A kind of multi-mode cmos image sensor and its control method
US11057562B2 (en) 2016-09-13 2021-07-06 Capital Normal University Multi-mode CMOS image sensor and control method thereof
CN108195855A (en) * 2017-12-27 2018-06-22 同方威视技术股份有限公司 Safety check system and its method
CN108195855B (en) * 2017-12-27 2023-11-03 同方威视技术股份有限公司 Security check system and method thereof
CN108564627A (en) * 2018-04-02 2018-09-21 成都精工华耀科技有限公司 A kind of positioning of linear array images sleeper and method of counting based on multizone Gray Projection
CN108564627B (en) * 2018-04-02 2021-11-02 成都精工华耀科技有限公司 Linear array image sleeper positioning and counting method based on multi-region gray projection
CN110691272A (en) * 2019-10-18 2020-01-14 四川长虹电器股份有限公司 Method for improving image display effect and video playing effect
CN110691272B (en) * 2019-10-18 2021-08-10 四川长虹电器股份有限公司 Method for improving image display effect and video playing effect
CN111402234A (en) * 2020-03-16 2020-07-10 深圳市启灵图像科技有限公司 Machine vision detection system
CN111402234B (en) * 2020-03-16 2024-05-03 深圳市启灵图像科技有限公司 Machine vision detecting system

Also Published As

Publication number Publication date
CN103018259B (en) 2015-07-01

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
WO2019154112A1 (en) Entry/departure status detection method and device
CN106597463B (en) Photo-electric proximity sensor and detection method based on dynamic visual sensor chip
JP5575867B2 (en) Method and apparatus for automatic visual event detection
CN104093016A (en) Camera module smudginess detection method and system
CN104898907B (en) Semiconductor device and electronic equipment
CN107238727B (en) Photoelectric type rotation speed sensor based on dynamic vision sensor chip and detection method
CN202393715U (en) Automatic detecting device for grey cloth defect spot
JP5350444B2 (en) Method and apparatus for automatic visual event detection
CN201540259U (en) Online flaw detector of textile
CN102854195B (en) Method for detecting defect coordinates on color filter
CN201653450U (en) Digital display meter automatic calibration device based on machine vision
CN202486064U (en) Digital image processing system used for detecting blots on surface of finished non-woven fabric
CN104417788A (en) Small-sized packing horizontal sealing detection method and small-sized packing horizontal sealing detection system having quality tracing function
CN109174693A (en) A kind of synchronous method of linear sweep graph as acquisition system and device for eliminating
CN201681051U (en) Visual detecting system for chip encapsulating and forming quality of integrated circuit
TW201224893A (en) Touch device with light frequency sensor for sensing relative position of object to be detected
Karloff et al. A flexible design for a cost effective, high throughput inspection system for pharmaceutical capsules
CN103413170A (en) Real-time locating method for edge of paper currency of currency count machine
Zhang et al. A Visual Detection System Design of Multi-region Segmentation Based on Embedded System Framework
Bialik et al. Fast-moving object counting with an event camera
CN102661902B (en) Portable device for measuring heat resistance of thermoplastic material as well as method for measuring heat resistance of thermoplastic material
US9152137B2 (en) Device activating unit and CPU
CN207503284U (en) Image Edge-Detection 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