Summary of the invention
Object of the present invention is exactly for addressing the above problem, and provides a kind of algorithm simple, efficient and low image acquisition and disposal route and the device of cost, comprises hardware configuration, image partition method, image processing algorithm and image combining method that image is processed.
For achieving the above object, the present invention adopts following technical scheme:
A kind of high-speed image sampling and treating apparatus, it comprises imageing sensor, and imageing sensor is connected with imageing sensor control circuit, imageing sensor and image acquisition with cut apart module and be connected, image acquisition with cut apart module and be connected with interface circuit, interface circuit is connected with computing machine; Imageing sensor control circuit also respectively with image acquisition with cut apart module and interface circuit is connected.
A kind of high-speed image sampling and treating apparatus, it comprises imageing sensor, imageing sensor is connected with imageing sensor control circuit, imageing sensor and image acquisition with cut apart module and be connected, image acquisition with cut apart module and be connected with interface circuit, interface circuit is connected with many computing machines, and interface circuit is also connected with imageing sensor control circuit.
Described imageing sensor is cmos image sensor or ccd image sensor.
The resolution that described imageing sensor is is greater than 500,000 pixels, and speed reaches at least 100 frames array image sensor per second.
Described imageing sensor is that resolution is greater than 4000 pixels, and speed reaches the line scan image sensor of at least 6000 lines per seconds.
Described imageing sensor control circuit provides working sensor needed clock signal, for the gain of imageing sensor, speed parameter are arranged.
Described image acquisition with cut apart the image that module generates imageing sensor and become a plurality of image-regions by column split, between adjacent area, be provided with shared region, then the image in a plurality of regions after cutting apart sent to respectively to interface circuit.
Described interface circuit can comprise gigabit ethernet interface.
Described interface circuit can comprise CameraLink standard interface.
Described computing machine is merged into complete image the image of interface circuit output.
An image processing method for high-speed image sampling and treating apparatus,
1) image acquisition;
2) to Image Segmentation Using
According to pixel column, carrying out image cuts apart; And adjacent two, cut apart between image and set up a shared region when cutting apart, the image of shared region had both belonged to adjacent region, its left side, also belonged to adjacent region, the right;
3) computing machine, according to required work, is cut apart rear image to each receiving and is carried out independent analyzing and processing, according to analysis processing result, judges whether image meets the requirements or result is exported;
4), after finishing dealing with, computing machine as required, compresses respectively rear preservation by the image after respectively cutting apart; Or preserve merging into piece image after the compression of images after respectively cutting apart; Or after respectively cutting apart rear image merging, compression is preserved; Or directly will respectively cut apart Image Saving.
An image processing method for high-speed image sampling and treating apparatus,
1) image acquisition;
2) to Image Segmentation Using
According to pixel column, carrying out image cuts apart; And adjacent two, cut apart between image and set up a shared region when cutting apart, the image of shared region had both belonged to adjacent region, its left side, also belonged to adjacent region, the right;
3) each computing machine, according to required work, is cut apart rear image to each receiving and is carried out analyzing and processing, according to analysis processing result, judges whether image meets the requirements or result is exported;
4), after finishing dealing with, computing machine as required, compresses respectively rear preservation by the image after respectively cutting apart; Or preserve merging into piece image after the compression of images after respectively cutting apart; Or after respectively cutting apart rear image merging, compression is preserved; Or directly will respectively cut apart Image Saving.
When to Image Segmentation Using, as image is divided into two parts, the resolution of horizontal direction of original image of take is w, and original image is divided into two parts; The adjacent two horizontal direction resolution of cutting apart image are x and y; The width of two-part shared region or overlapping region is d; Image after cutting apart with cut apart before the pass of image in resolution be: w=x+y-d; If x=y, w=2x-d.
When to Image Segmentation Using, more than image is divided into three parts, the resolution of horizontal direction of original image of take is w, and original image is divided into n part; The horizontal direction resolution of cutting apart rear image is respectively x
1, x
2..., x
n; The width of shared region or overlapping region is respectively d
1, d
2... d
n-1; Image after cutting apart with cut apart before the pass of image in resolution be:
if x
1=x
2=...=x
n, d
1=d
2=...=d
n-1, w=nx-(n-1) d.
Described each sub-processor has corresponding storer for caching image data and the needed data of image processing process; The algorithm that image is processed comprises image pre-service and two stages of post processing of image; Wherein image pre-service comprises filtering and binary image Processing Algorithm; Sub-processor carries out post processing of image to the image after pre-service; Post processing of image comprises optical character identification OCR, bar-code identification or characteristic matching; Wherein optical character identification is for car plate identification, tag recognition field; Bar-code identification is used for identifying a peacekeeping two-dimensional bar code; Characteristic matching comprises form fit, color-match and predefined pattern coupling, for printing quality detection field.
Device of the present invention is mainly by an imageing sensor, imageing sensor control circuit, an image acquisition with cut apart module and one or more computing machine forms, as shown in Figure 1, 2.
Imageing sensor: be used for the light signal of target object to convert analog electrical signal to, and can convert digital signal to.Can be the imageing sensor of bidimensional (face battle array), can be also the imageing sensor of one dimension (linear array).Can be cmos image sensor, can be also ccd image sensor.If imageing sensor itself does not comprise analog to digital conversion circuit, can after imageing sensor, add one-level analog to digital conversion circuit.Described in the application imageing sensor espespecially resolution be greater than 500,000 pixels, speed can reach at least 100 frames array image sensor per second and resolution is greater than 4000 pixels, speed can reach the line scan image sensor of at least 6000 lines per seconds.
Imageing sensor control circuit: provide working sensor needed clock signal, for the parameters such as the gain of imageing sensor, speed are arranged.
Image acquisition with cut apart: the image that imageing sensor is generated becomes a plurality of image-regions by column split, between adjacent area, can have shared region.Send to respectively corresponding computer to carry out parallel processing the image in a plurality of regions after cutting apart again.System can complete image processing within the shorter time like this.
Computing machine: in order to solve the limited problem of processor processing power, native system adopts one or more computing machine.Each computing machine is parallel processing image independently.For the treatment of the corresponding view data from after the cutting apart of image capture module output.Each processor can be exported result, also can export original or process after image.Between each computing machine, also can communicate with one another.
The export structure that computing machine can be processed the image of each processor module is unified to process.Optionally, computing machine can be merged into complete image the image of each processor module output.
The introducing of interface circuit, can gather and cut apart after image with form at a high speed, send one or several computing machines to and process.Especially, adopt gigabit Ethernet or the CameraLink high-speed interface of standard, image can be sent to the farther computing machine of distance.
Workflow of the present invention can be divided into that image acquisition, image are cut apart, image is processed and result output four-stage.
Image is cut apart principle:
Because the transmission of image sensor pixel is to carry out according to the mode of row, and col width is greater than line width conventionally, so this patent has proposed to carry out according to pixel column the algorithm that image is cut apart.
In order to make the image of the object of adjacent image regions intersection can keep complete, can define a shared region.The image of shared region had both belonged to the region on the left side, also belonged to the region on the right.Can guarantee that like this object in image can be by correct and complete identification.
The basic thought that image is cut apart is as follows.As shown in Figure 3, the resolution of the horizontal direction of original image is w.Original image is divided into left and right two parts, and the horizontal direction resolution on the left side is x; The right horizontal direction resolution is y.The width of two-part shared region or overlapping region is d.Image after cutting apart with cut apart before the pass of image in resolution be: w=x+y-d; If x=y, w=2x-d.
Based on similar thought, piece image can be divided into the subimage of three or more.Every number of sub images sends to respectively a processor to carry out image processing.The subimage of cutting apart is more, and the speed that system diagram picture is processed is faster, and real-time is better.
For line scan image sensor, the data of its image are also to transmit according to the mode of row, are then accumulated as two dimensional image, so can adopt the same image partition method.
Image composition principle:
System can be merged into an image the same or approaching with original image resolution by the subimage of processing through image the subimage after cutting apart or after cutting apart.Due in image cutting procedure, system has been known concrete partition data, as the position of the col width of original image, subimage quantity and subimage and col width etc., so can merge and do not need first to carry out the complicated calculating such as image similarity and displacement according to these given datas.
Image processing algorithm:
System sends to respectively corresponding computer to process for image the sub-image data after cutting apart.Each computing machine has corresponding storer for caching image data and the needed data of image processing process.The algorithm that image is processed comprises image pre-service and two stages of post processing of image.Image pre-service can comprise the common image processing algorithms such as filtering and binaryzation.Computing machine can carry out post processing of image to the image after pre-service.Post processing of image can comprise optical character identification (OCR), bar-code identification or characteristic matching.Wherein optical character identification can be used for the fields such as car plate identification, tag recognition; Bar-code identification is used for identifying a peacekeeping two-dimensional bar code; Characteristic matching comprises form fit, color-match and predefined pattern coupling, can be used for the fields such as printing quality detection.
Computing machine compresses the image of cutting apart after processing.
Or the image after being combined compresses.
Above-mentioned compression of images is mainly for meeting the needs of storage and transmission.
The invention has the beneficial effects as follows:
Adopt high speed imaging sensor and computing machine and image is cut apart and composition algorithm, can be applied in and detect in real time at a high speed application.Native system adopts image segmentation algorithm, and original image is divided into several number of sub images, and every computing machine is processed one of them subimage, and many computing machines can parallel processing like this.Because the processing between subimage does not have coupling, therefore improved the processing speed of system, and the treatment effeciency of system is significantly improved, reach the effect of real-time processing.Adjacent sub-images after cutting apart has certain overlapping region, can guarantee that like this each sub-picture pack is containing complete detected information, so can avoid the generation of undetected situation.Accuracy and the integrality of target object identification have so just been guaranteed.
In order to obtain the image of original image resolution, can reconsolidate by the subimage the subimage after cutting apart or after processing.Because system is known the size of subimage and the position in original image thereof, thus can merge very easily, and do not need complicated algorithm.
Computing machine can compress image, is convenient to transmission and storage.Because after compression, data volume is little a lot, the bandwidth requirement of transmission has been reduced; And need storage space to be still less used for memory image number, saved storage space.
Compare with the system of multiple image sensor, the installation of native system and use conveniently, work efficiency is higher.
Embodiment
Below in conjunction with accompanying drawing and embodiment, the present invention will be further described.
Embodiment 1:
A kind of high-speed image sampling and treating apparatus, it comprises imageing sensor, and imageing sensor is connected with imageing sensor control circuit, imageing sensor and image acquisition with cut apart module and be connected, image acquisition with cut apart module and be connected with interface circuit, interface circuit is connected with computing machine; Imageing sensor control circuit also respectively with image acquisition with cut apart module and interface circuit is connected.
Described imageing sensor is cmos image sensor or ccd image sensor.
The resolution that described imageing sensor is is greater than 500,000 pixels, and speed reaches at least 100 frames array image sensor per second.
Described imageing sensor is that resolution is greater than 4000 pixels, and speed reaches the line scan image sensor of at least 6000 lines per seconds.
Described imageing sensor control circuit provides working sensor needed clock signal, for the gain of imageing sensor, speed parameter are arranged.
Described image acquisition with cut apart the image that module generates imageing sensor and become a plurality of image-regions by column split, between adjacent area, be provided with shared region, then the image in a plurality of regions after cutting apart sent to respectively to interface circuit.
Described interface circuit can comprise gigabit ethernet interface.
Described interface circuit can comprise CameraLink standard interface.
Described computing machine is merged into complete image the image of interface circuit output.
Embodiment 2:
A kind of high-speed image sampling and treating apparatus, it comprises imageing sensor, imageing sensor is connected with imageing sensor control circuit, imageing sensor and image acquisition with cut apart module and be connected, image acquisition with cut apart module and be connected with interface circuit, interface circuit is connected with many computing machines, interface circuit also with imageing sensor control linkage.
Described imageing sensor is cmos image sensor or ccd image sensor.
The resolution that described imageing sensor is is greater than 500,000 pixels, and speed reaches at least 100 frames array image sensor per second.
Described imageing sensor is that resolution is greater than 4000 pixels, and speed reaches the line scan image sensor of at least 6000 lines per seconds.
Described imageing sensor control circuit provides working sensor needed clock signal, for the gain of imageing sensor, speed parameter are arranged.
Described image acquisition with cut apart the image that module generates imageing sensor and become a plurality of image-regions by column split, between adjacent area, be provided with shared region, then the image in a plurality of regions after cutting apart sent to respectively to interface circuit.
Described interface circuit can comprise gigabit ethernet interface.
Described interface circuit can comprise CameraLink standard interface.
Described computing machine is merged into complete image the image of interface circuit output.
Embodiment 3:
For two-way traffic car plate, identifying:
In high performance vehicle real-time monitoring system, the technology application based on high speed imaging is more and more general.For the monitoring of two-way traffic, can adopt single image sensing system to realize.In order to realize the real-time processing of a large amount of view data, with two computing machines, process respectively the image information in track, left and right.Image capture module segments the image into two parts, and every part covers respectively a track.Wherein, two parts all comprise the part that two tracks have a common boundary.Then the image in track, left and right is sent respectively to two processors.Like this, can avoid when the vehicle difficulty that identification brings to car plate during across lanes.As shown in Figure 4, the position of the car plate of cross-line driving vehicle is just in time positioned at the centre of original image, if just simply image is cut apart from middle, car plate can be truncated, and is assigned in two width images and goes.If the method according to Fig. 5 is cut apart, just can address this problem.
As shown in Figure 5, the resolution of original image is 2000x1024, has 1024 row and 2000 row.Can segment the image into two number of sub images, the col width of each image is 1280 pixels, and line number is constant, and the resolution of two images after cutting apart is respectively 1280x1024.Like this, 560 row in the middle of original image had both belonged to the subimage on the left side after cutting apart, and also belonged to the subimage on the right.Two number of sub images after cutting apart send to respectively two computing machines to carry out image processing.
Embodiment 4:
In three track car plate identifications:
Similar to Example 1, in the application of car plate identification, also this image can be divided into 3 parts.As shown in Figure 6.Then send to respectively three computing machines to carry out image processing the subimage after cutting apart (image-region 1,2 and 3).Therefore greatly shorten the time that image is processed, improved the performance of system.
Embodiment 5:
In bar-code identification:
As shown in Figure 7, the image of captured bar code is positioned at the place that original image is taken back.If cut apart from image middle, bar code can be divided into two parts, can not complete decoding.According to the region shown in figure, cut apart, the sub-picture pack on the left side has contained complete bar code information.Can carry out complete decoding, simultaneously because the size of subimage is much smaller than original image, so bar code decoding speed can improve a lot.
Embodiment 6:
In label printing quality testing:
In label printing industry, the quality requirements of label is very strict, can not occur the situations such as stain, the many China inks of stroke or few China ink.Otherwise quality problems Hui Gei producer brings huge loss.The application of high-speed printer is at present very extensive, and the efficiency that employing manual type is carried out printing quality detection is very low, and detection person's human factor may cause flase drop.Adopt the on-line detecting system based on high-speed photographic technique at a high speed greatly to enhance productivity and to detect accuracy.Adopt image to cut apart and parallel processing technique, can further improve detection efficiency.As shown in Figure 8, the label image collecting can be divided into left and right two width subimages.Two width subimages are given respectively two processors and are carried out image processing.As long as find that there is printing quality problem in any one subimage, label is substandard product.A part of overlapping region is set, can prevents from cutting apart due to image the generation of the undetected situation causing.
Embodiment 7:
In the system based on linear array imaging device:
Linear array imaging technology can realize higher image resolution ratio conventionally.The technology of this patent can be applied in linear array imaging system equally.The two dimensional image of linear array imaging system completes by accumulation linear array images.As shown in Figure 9, when gathering linear array images, just view data can be cut apart along the direction of row.Then send to respectively different computing machines to process image.The same with in face battle array imaging system of follow-up processing mode.