Summary of the invention
In view of this, the present invention provides a kind of Kiwi berry automatic hierarchy system, to realize that Kiwi berry is carried out convenient, fast and accurate classification.
For solving the problems of the technologies described above; The technical scheme that the present invention adopts is: the automatic hierarchy system of a kind of Kiwi berry comprises: single file skate apparatus, single location transport, first motor, primary importance sensor, transparent transmission band, second motor, second place sensor, first camera, second camera, processor, controller and classification executive system; Wherein:
Said single file skate apparatus links to each other with said single location transport with material storing box respectively, is used for regulating the conveying capacity of the Kiwi berry that falls from storage device, makes it to become single-row shape and is delivered in the transport of said single location;
Said first motor links to each other with single location transport with said controller respectively, and the control signal that is used for when classification, sending according to said controller drives said single location transport and carries Kiwi berry;
Said primary importance sensor is positioned at the transportation tail of said single location transport; And link to each other with said controller; Be used for when Kiwi berry arrives said single location delivery device tip, gathering the information that said Kiwi berry arrives, and the information that the said Kiwi berry that will gather arrives is sent to controller;
Said controller shuts down according to said first motor of information Control that receives;
Said transparent conveyer belt links to each other with second motor with said single location transport respectively, is used for transmitting transport falls to said transparent conveyer belt from said single location Kiwi berry to image acquisition region;
Said second sensor is positioned at image acquisition region and links to each other with said controller; Be used for when Kiwi berry arrives image acquisition region with said transparent conveyer belt, gathering said Kiwi berry information in place, and the said Kiwi berry information in place that will gather is sent to controller;
Said controller shuts down according to the second coupled motor of information Control that receives, and the information that this Kiwi berry is in place sends to processor;
Said processor adopting triggers effective means; Present frame Kiwi berry image in all Kiwi berry images of first camera in the image acquisition region and second camera collection is as effective Kiwi berry image, and said image is sent to image pre-processing module in the processor as process object;
Said processor receives and handles said image, according to result output classification results;
Said controller also links to each other with said processor, is used to receive the classification results of said processor output, and controls said classification executive system according to said classification results Kiwi berry is dispensed to sorter frame.
Preferably, said processor comprises: human-computer interaction module, image pre-processing module, characteristic extracting module and characteristic Fusion Module; Wherein:
Said human-computer interaction module is through sending control command to controller, realize the controlling and keeping watch on of equipment, and coordinate image processing, IMAQ, controller three and work in order;
Said image pre-processing module is cut apart with the image cutting through image denoising, image the image of said first camera and second camera collection is carried out preliminary treatment;
Said characteristic extracting module is extracted size, shape and blemish characteristic from the pretreated image of process;
Said characteristic Fusion Module merges said size, shape and the blemish characteristic of extracting, and obtains classification results according to fusion results.
Preferably, said first camera links to each other with said processor through USB interface respectively with second camera.
Preferably, said controller is the STC89C52 single-chip microcomputer.
Preferably, also comprise the classification executive system that links to each other with said controller;
Said controller also links to each other with said processor, is used to receive the classification results of said processor output, and controls said classification executive system according to said classification results Kiwi berry is dispensed to sorter frame.
Can find out from above-mentioned technical scheme; The automatic hierarchy system of a kind of Kiwi berry disclosed by the invention; Through single file skate apparatus and single location transport; Can make Kiwi berry be arranged as the single file shape and can keep the distance of 4-6cm between any two; When the primary importance sensor detects Kiwi berry and arrives single location transport terminal; First motor that controller control drives single location conveyor running stops, and can guarantee in a period of time, to have only a Kiwi berry on transparent conveyer belt, to move to image acquisition region, when second place sensor detects Kiwi berry arrival image acquisition region; Second motor that controller control drives transparent conveyer belt running stops; Can make the single image acquisition region that is still in of Kiwi berry, first camera and second camera carry out IMAQ up and down to being still in Kiwi berry on the transparent transmission band, can make the Kiwi berry running that need not to roll just can collect the comparatively comprehensive image of Kiwi berry; Through processor classification results is handled and exported to the Kiwi berry image of gathering, controller restarts first motor next Kiwi berry is carried out hierarchical processing after a last Kiwi berry hierarchical processing finishes and gets into corresponding sorter frame.
The specific embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The embodiment of the invention discloses the automatic hierarchy system of a kind of Kiwi berry, to realize that Kiwi berry is carried out convenient, fast and accurate classification.
As shown in Figure 1, make hierarchy system by oneself for the disclosed a kind of Kiwi berry of the embodiment of the invention, comprising:
Single file skate apparatus 1, single location transport 2, first motor 3, primary importance sensor 4, transparent transmission band 5, second motor 6, second place sensor 7, first camera 8, second camera 9, processor 10, controller 11 and classification executive system 12; Wherein:
Single file skate apparatus 1 links to each other with single location transport 2 with material storing box respectively, is used for regulating the conveying capacity of the Kiwi berry that falls from storage device, makes it to become single-row shape and is delivered in the single location transport 2;
First motor 3 links to each other with single location transport 2 with controller 11 respectively, and when being used for starting working in system, the control signal of sending according to controller 11 drives single location transport 2 and carries Kiwi berrys;
Primary importance sensor 7 is positioned at the transportation tail of single location transport 2; And link to each other with controller 11; Be used for when Kiwi berry arrives single location transport 2 ends, gathering the information that Kiwi berry arrives, and the information that the Kiwi berry of gathering is arrived is sent to controller 11;
Controller 11 shuts down according to information Control first motor 3 that receives; Single location transport 2 transmits Kiwi berry no longer forward at this moment; After the classification results (current Kiwi berry gets into corresponding sorter frame) of the last Kiwi berry of processor 10 outputs, just begin to continue the next Kiwi berry of transmission; Guaranteed Kiwi berry is carried out single classification, avoided a plurality of Kiwi berrys to focus on image acquisition region together and make the inaccurate problem of classification results;
Transparent conveyer belt 5 links to each other with second motor 6 with single location transport 2 respectively, is used for transmitting transport 2 falls to transparent conveyer belt 5 from single location Kiwi berry to image acquisition region;
Second sensor 7 is positioned at image acquisition region and links to each other with controller 11; Be used for when Kiwi berry arrives image acquisition region with transparent conveyer belt 5, gathering the Kiwi berry information in place of said Kiwi berry; And the said information that will gather is sent to controller 11, wherein: after Kiwi berry falls on the transparent conveyer belt 5, can also pass through horizontal positioning device and deceleration plastics soft board; Kiwi berry is still on the transparent conveyer belt 5, and moves to image acquisition region with transparent conveyer belt 5;
Controller 11 shuts down according to the second coupled motor 6 of information Control that receives; Make the single image acquisition region that is still in of Kiwi berry; And the information that this Kiwi berry is in place sends to processor 10; Institute's processor 10 adopts and triggers effective means, and the present frame Kiwi berry image that first camera 8 in this moment image acquisition region and second camera 9 collect is effective Kiwi berry image, delivers to image pre-processing module in the processor 10 as process object.
First camera 8 and second camera 9 also link to each other through USB interface with processor 10 respectively, are used for the image of gathering is sent to processor 10;
Processor 10 receives and handles said image, according to result output classification results;
The classification results of controller 11 receiving processors 10 output, and Kiwi berry is dispensed to sorter frame according to said classification results control classification executive system 12.
After the classification results and (current Kiwi berry gets into corresponding sorter frame) of processor 10 output Kiwi berrys; Controller 11 sends control signal, controls first motor 3 and restarts running, and next Kiwi berry is transmitted; So circulation is carried out classification to all Kiwi berrys.
In above-mentioned, controller 11 is the STC89C52 single-chip microcomputer.
Image processor 10 is cut apart the image of first camera 8 and second camera 9 being gathered with the image cutting through the image pre-processing module through image denoising, image and is carried out preliminary treatment when the image that receives is handled;
Characteristic extracting module is extracted size, shape and blemish characteristic from the pretreated image of process;
The characteristic Fusion Module merges said size, shape and the blemish characteristic of extracting, and obtains classification results according to fusion results.
Concrete; Because the image of camera collection comprises information such as background, noise, need at first image to be carried out preliminary treatment, and the image preliminary treatment is the committed step that image is handled graphical analysis; Can be follow-up feature extraction, image recognition work provides Useful Information;
In the preprocessing process of image; Adopt medium filtering, mean filter, adaptive wiener filter and small echo denoising that the gray level image of Kiwi berry is carried out Filtering Processing respectively; Image after the contrast denoising is found: the picture contrast through after the small echo denoising is strong; Fuzzy few, definition is high, and image border and detail section information are preserved more complete;
To carrying out rim detection, find real more border through the image after the small echo denoising;
The image that rim detection is obtained adopts bigger expansion parameter to expand, then to the image after expanding fill, operations such as burn into opening operation, deletion redundant sub-pixels, finally obtain the Kiwi berry area image;
With the Kiwi berry area image as template, respectively with the small echo denoising after R, G, B component carry out and computing the last colored Kiwi berry image that obtains from background, splitting through synthetic computing;
For the ease of follow-up Surface Defect Recognition and Shape Feature Extraction; A large amount of white background is dismissed in the image after need image being cut apart; Four extreme position coordinates of searching image upper and lower, left and right with this coordinate information input cutting function, obtain images cut;
After the image preliminary treatment, from pretreated image, extract size, shape and blemish characteristic; Concrete, processor extracts the Kiwi berry size characteristic based on the match relation and the selection of threshold of area image pixel extraction, actual weight and amount of pixels;
The area image amount of pixels is extracted:
Because camera is taken the Kiwi berry image of two sides up and down respectively, and the fixed-site of camera, focal length mixes up in advance, and all shooting environmental immobilize, so can select for use Kiwi berry area image amount of pixels to represent its bulk very easily.Consider that lopsided Kiwi berry there are differences on two side sizes up and down, two width of cloth images up and down that camera is taken extract the area image amount of pixels simultaneously, make even all, as the judgment basis of Kiwi berry size;
The match relation of actual weight and amount of pixels:
Rule of 10 not of uniform size and shapes is chosen in experiment; With kind with batch Kiwi berry as sample; Extract its mean pixel information of two sides up and down respectively; And take by weighing its actual weight, adopt the two relation of least square fitting, draw Kiwi berry up and down mean pixel amount Y (unit: the individual) weight W actual of two sides with it (unit: g) satisfy linear approximate relationship as follows:
Y=798W+34081(1);
Selection of threshold:
According to the agricultural industry criteria NY/T1794-2009 of the People's Republic of China (PRC) of issue on December 22nd, 2009, Kiwi berry size specification standard and convolution (1) draw each specification amount of pixels threshold value of Kiwi berry.
Processor extracts based on Fourier transform pairs Kiwi berry shape facility:
Concrete, through the border follow the tracks of obtain border sequence select, obtain center point coordinate, calculate radius sequence and normalization, to the radius sequence make discrete Fourier transform, normalization Fourier descriptor, definition out-of-shape degree is described and the Kiwi berry Shape Feature Extraction is carried out in concrete experiment.
Processor is discerned the blemish characteristic based on the BP network:
Concrete; To the common scab symptom of Kiwi berry,, obtain the image approximate component through wavelet decomposition with the actual scab of blackspot simulation Kiwi berry; And extract its statistical nature and be used for BP network, the BP network after the training is realized the Surface Defect Recognition of Kiwi berry as grader.
Wavelet decomposition:
Wavelet transformation is a kind of new transform analysis method, and its main feature is through the abundant characteristic of some aspect of outstanding problem of conversion, is widely used in Digital Image Processing.The wavelet transformation W of arbitrary signal f (t)
f(a b) is defined as:
In the formula (2): ψ (t) is female small echo, and a is a contraction-expansion factor, and b is a shift factor.This shows that wavelet transformation is the signal of binary form, and wavelet transformation inhibit signal inner product is constant, it is at function space L
2(R) have complete inverse transformation relation on, wavelet transformation is a non-loss transformation.
Every layer of wavelet decomposition all resolves into a low frequency part and three HFSs, carries out subordinate when decomposing, and low frequency part is continued to decompose, and low frequency part promptly is the thumbnail of original image, and HFS has kept detailed information such as the texture, edge of image.Through repetition test, choose 2 rank Daubechies wavelet basis to carrying out the defect area characteristic that three layers of wavelet decomposition can embody Kiwi berry best through pretreated Kiwi berry gray level image.The image that the image preliminary treatment is obtained is converted into gray level image, and this gray level image is carried out three layers of wavelet decomposition with 2 rank Daubechies wavelet basis.
The BP network classification:
The defect area characteristic is the most obvious, and the approximate component of the minimum ground floor of interference such as edge is compressed into the matrix of 100 * 100 dimensions, and extracts the statistical nature of this matrix: intermediate value, maximum, minimum of a value, maximum and minimum of a value poor.From a large amount of Kiwi berry images of taking in advance, choose 100 of representative training samples, input BP network is trained after extracting above-mentioned 4 statistical natures and adopting the extreme value method for normalizing to carry out the normalization processing.To above-mentioned 4 statistical natures of the same extraction of the Kiwi berry image of taking in the equipment actual operation, utilize the maximum of training sample matrix, minimum of a value that it is done the normalization processing, the BP network after the input training is finally realized the Kiwi berry Surface Defect Recognition.
Merge said size, shape and the blemish characteristic extracted:
Concrete; According to the Kiwi berry agricultural industry criteria and combine consumer's hobby; Fusion is at size characteristic that feature extraction phases is extracted: big (L), in (M), little (S); Shape facility: good, poor and surface characteristics: surperficial defectiveness, zero defect characteristic, Kiwi berry is divided into four grades the most at last, has the Kiwi berry of scab defective to be divided into fourth class article with every.
In the above-described embodiments; Control first motor and second motor through controller; Make that Kiwi berry can be through single location transport and the single image acquisition region that is still in of transparent transmission band, solved and gathered the Kiwi berry image in the motion in traditional Kiwi berry hierarchy system and cause image blurring, programming complicated problems; And through two cameras that lay respectively at transparent conveyer belt upper and lower Kiwi berry is carried out IMAQ in the above-described embodiments, make that the Kiwi berry image that collects is comparatively complete.
Concrete; In automatic classification process to Kiwi berry; At first; Utilize human-computer interaction interface on the processor 10 to start classifying equipoment (man-machine interface mainly provide startups, time-out information such as parameter in continuation, shut-down operation and Kiwi berry classification results, classification progress, the classification); Connecting between initialization and it of realizing controller 11 simultaneously and the processor 10, subsequently, controller 11 determines first motor 3 of single location transport 2 whether to shut down according to whether receiving the Kiwi berry arriving signal that primary importance sensor 4 sends; If controller 11 receives the Kiwi berry arriving signal that primary importance sensor 4 sends; Then controlling single location transport 2 stops; (Kiwi berry is after dropping on the conveyer belt; Passed through horizontal positioning device, made the attitude basically identical of each Kiwi berry in image acquisition areas) monitor the Kiwi berry signal in place that second place sensor 7 transmits when controller 11, and whether shut down according to second motor 6 of the transparent conveyer belt 5 of this signal deciding classification; If controller 11 receives the Kiwi berry signal in place that second place sensor 7 sends, then control transparent conveyer belt 5 stop motions of classification, controller 11 sends Kiwi berry signal in place through serial communication to processor 10; First camera 8 and 9 pairs of Kiwi berrys of second camera carry out IMAQ subsequently; And read the Kiwi berry image of present frame through the image processing program of processor 10; And image handled; Obtain the quality of Chinese gooseberries characteristic parameter, the network based quality characteristic parameter of BP provides the Kiwi berry rank subsequently, and through serial communication graded signal is reached controller 11 by processor 10; Subsequently, controller 11 moves according to corresponding classification baffle plate in the graded signal control classification executive system 12, and restarts transparent conveyer belt 5 motions of second motor, 6 drive classifications, realizes the classification of Kiwi berry.
Each embodiment adopts the mode of going forward one by one to describe in this specification, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be conspicuous concerning those skilled in the art, and defined General Principle can realize under the situation that does not break away from the spirit or scope of the present invention in other embodiments among this paper.Therefore, the present invention will can not be restricted to these embodiment shown in this paper, but will meet and principle disclosed herein and features of novelty the wideest corresponding to scope.