Summary of the invention
In order to solve the problem, the invention provides a kind of tobacco cut tobacco width Identification platform, according to the shape facility of tobacco cut tobacco, be provided with the image pre-processing unit for detecting cut tobacco width, described image segmentation unit, described Impurity removal unit, described burr removing unit and described width detection unit, be provided with different width detection standards for dissimilar tobacco cut tobacco, user only need input tobacco type can determine that whether the tobacco cut tobacco width of current detection is qualified automatically simultaneously.
According to an aspect of the present invention, provide a kind of tobacco cut tobacco width Identification platform, described Identification platform comprises cut tobacco load bearing equipment, high-definition camera equipment, floor light light source, width identification equipment and AT89C51 single-chip microcomputer, described cut tobacco load bearing equipment is used for putting non-touching many cut tobaccos, described high-definition camera equipment is taken described many cut tobaccos under the floor light of floor light light source, to obtain cut tobacco image, described width identification equipment and described high-definition camera equipment connection, for carrying out image procossing to described cut tobacco image, to obtain cut tobacco width, described AT89C51 single-chip microcomputer is connected with described width identification equipment, whether qualified according to described cut tobacco width determination cut tobacco.
More specifically, in described tobacco cut tobacco width Identification platform, also comprise: user input device, for the operation according to user, input the type of the tobacco cut tobacco of current identification, memory device, for having prestored tobacco cut tobacco information table, described tobacco cut tobacco information table with tobacco cut tobacco type for index, have recorded the benchmark cut tobacco width range of each type tobacco cut tobacco, cut tobacco upper limit gray threshold and cut tobacco lower limit gray threshold respectively, described cut tobacco upper limit gray threshold and described cut tobacco lower limit gray threshold are used for the cut tobacco in image to separate with background, and described memory device is also for having prestored pixel quantity threshold value and longitudinally having cut quantity, micro objective group, is placed between described cut tobacco load bearing equipment and described high-definition camera equipment, for amplifying many cut tobaccos on described cut tobacco load bearing equipment, takes for described high-definition camera equipment, voice playing equipment, is connected with described AT89C51 single-chip microcomputer, for playing the voice prompted file corresponding with tobacco cut tobacco width qualifying signal or the defective signal of tobacco cut tobacco width, display device, is connected with described AT89C51 single-chip microcomputer, for showing the prompt text corresponding with tobacco cut tobacco width qualifying signal or the defective signal of tobacco cut tobacco width, described cut tobacco load bearing equipment is a flat shape, for putting non-touching many cut tobaccos, described high-definition camera equipment comprises optical filter, camera lens and cmos image sensor, and described camera lens is between described optical filter and described cmos image sensor, and the resolution of the cut tobacco image of described cmos image sensor collection is 1366 × 768, floor light light source comprises luminance sensor and luminescent device, and described luminance sensor detects the ambient brightness of surrounding environment, and described luminescent device is connected with described luminance sensor, determines the luminous power of the floor light provided based on described ambient brightness, described width identification equipment comprises image pre-processing unit, image segmentation unit, Impurity removal unit, burr removing unit and width detection unit, described image pre-processing unit is connected with described cmos image sensor, medium filtering and gray processing process are performed successively to described cut tobacco image, to obtain gray level image, described image segmentation unit is connected respectively with described image pre-processing unit and described AT89C51 single-chip microcomputer, receive target cut tobacco upper limit gray threshold and the target cut tobacco lower limit gray threshold of the transmission of described AT89C51 single-chip microcomputer, the pixel identification of gray-scale value in described gray level image between described target cut tobacco upper limit gray threshold and described target cut tobacco lower limit gray threshold is formed multiple cut tobacco sub pattern, described Impurity removal unit is connected respectively with described image segmentation unit and described memory device, calculate the total pixel number of each cut tobacco sub pattern in multiple cut tobacco sub pattern, one or more cut tobacco sub pattern that output total pixel number is more than or equal to pixel quantity threshold value export as one or more target cut tobacco sub pattern, described burr removing unit is connected with described Impurity removal unit, for removing the burr of described one or more target cut tobacco sub pattern, to obtain one or more processed cut tobacco sub pattern, described width detection unit is connected respectively with described burr removing unit and described memory device, each processed cut tobacco sub pattern is longitudinally cut the number of times reaching described longitudinally cutting quantity by predetermined space, obtain the multiple horizontal cut tobacco width that quantity is described longitudinally cutting quantity, described multiple horizontal cut tobacco width is averaged, obtain the width of each processed cut tobacco sub pattern, and the width of one or more processed cut tobacco sub pattern is averaged, to obtain described cut tobacco width, described AT89C51 single-chip microcomputer is connected respectively with described user input device and described memory device, type based on the tobacco cut tobacco of described current identification searches the benchmark cut tobacco width range with the type matching of the tobacco cut tobacco of described current identification in described tobacco cut tobacco information table, cut tobacco upper limit gray threshold and cut tobacco lower limit gray threshold, using as target fiducials cut tobacco width range, target cut tobacco upper limit gray threshold and target cut tobacco lower limit gray threshold export, described AT89C51 single-chip microcomputer is also connected with described width detection unit, to obtain described cut tobacco width, and when described cut tobacco width drops on described target fiducials cut tobacco width range, send tobacco cut tobacco width qualifying signal, when described cut tobacco width is not in described target fiducials cut tobacco width range, send the defective signal of tobacco cut tobacco width, wherein, described cut tobacco load bearing equipment also comprises cut tobacco automatic cleaning device, is connected with described AT89C51 single-chip microcomputer, for after receiving described tobacco cut tobacco width qualifying signal or the defective signal of described tobacco cut tobacco width, and many cut tobaccos described in automatic cleaning.
More specifically, in described tobacco cut tobacco width Identification platform, described Identification platform also comprises: power supply device, be connected with described AT89C51 single-chip microcomputer, for under the control of described AT89C51 single-chip microcomputer, for described Identification platform provides various different electric power supply pattern, described various different electric power supply pattern comprises battery saving mode and normal mode.
More specifically, in described tobacco cut tobacco width Identification platform: described image pre-processing unit, described image segmentation unit, described Impurity removal unit, described burr removing unit and described width detection unit adopt different fpga chips to realize respectively.
More specifically, in described tobacco cut tobacco width Identification platform: described image pre-processing unit, described image segmentation unit, described Impurity removal unit, described burr removing unit and described width detection unit are all integrated in same fpga chip.
More specifically, in described tobacco cut tobacco width Identification platform: described voice playing equipment is loudspeaker, and described display device is LCDs, described user input device is keyboard or the touch-screen integrated with described display device.
Embodiment
Below with reference to accompanying drawings the embodiment of tobacco cut tobacco width Identification platform of the present invention is described in detail.
Nicotiana tubular flower order, the annual or limited per nnial herb of Solanaceae, base portion is lignification slightly.Inflorescence top is raw, coniform, spends more; Capsule ovum shape or square round shape, be about and equal persistent calyx.Summer and autumn yields positive results.Mainly be distributed in South America, South Asia, China.Tobacco is planted out, and the tobacco leaf grown out is through dehydration, and the operations such as baking can produce the cigarette that people suck.
Tobacco business and impact thereof should be divided into two: from taxes and profits, and the taxes and profits income that tobacco brings country for a year is equivalent to expenditure on armaments, and this brings larger interests to national interests; Healthy from life threatening, Smoking is harmful to your health, and tobacco strictly should control even to ban as setting sun enterprise; From the care people's livelihood, due to cigarette, factory is many, and smoking is had a large population, and tobacco leaf demand is large, solves the approach that some people is obtained employment and peasant increases income.Thus, current world most countries and area are also take not confine the attitude combined that the development of tobacco business and public opinion strictly ban on opium-smoking and the opium trade to tobacco business.
In order to provide qualified product to the people sucking cigarette, reduce the infringement that cigarette inferior causes smoker's health to the full extent, the every procedure of tobacco leaf production producer to the production of tobacco has strict quality control, and wherein the width of tobacco cut tobacco forms the target of attaching most importance to and detecting owing to directly affecting tobacco quality.Current tobacco cut tobacco width detection technology for detection speed slowly, too relies on artificial, and test result is also unstable, cannot provide reliable reference data for the judgement of tobacco quality.
The present invention has built a kind of tobacco cut tobacco width Identification platform, based on the feature of tobacco cut tobacco, multiple detection sub-unit is set and carries out tobacco cut tobacco wide band detection targetedly, simultaneously for the tobacco of different cultivars arranges different examination criterias, thus tobacco cut tobacco width data can be obtained quickly and accurately.
Fig. 1 is the block diagram of the tobacco cut tobacco width Identification platform illustrated according to an embodiment of the present invention, described Identification platform comprises cut tobacco load bearing equipment 1, high-definition camera equipment 2, width identification equipment 3, floor light light source 4, micro objective group 5, AT89C51 single-chip microcomputer 6, user input device 7, memory device 8, voice playing equipment 9, display device 10 and power-supply unit 11, AT89C51 single-chip microcomputer 6 and cut tobacco load bearing equipment 1, high-definition camera equipment 2, width identification equipment 3, floor light light source 4, micro objective group 5, user input device 7, memory device 8, voice playing equipment 9, display device 10 and power-supply unit 11 are connected to realize the various controls to connection device respectively, high-definition camera equipment 2 is connected with width identification equipment 3.
Wherein, described cut tobacco load bearing equipment 1 is for putting non-touching many cut tobaccos, described high-definition camera equipment 2 is taken described many cut tobaccos under the floor light of floor light light source, to obtain cut tobacco image, described width identification equipment 3 is for carrying out image procossing to described cut tobacco image, to obtain cut tobacco width, whether described AT89C51 single-chip microcomputer 6 is for qualified according to described cut tobacco width determination cut tobacco.
Then, continue to be further detailed the concrete structure of tobacco cut tobacco width Identification platform of the present invention.
In described Identification platform, user input device 7, for the operation according to user, inputs the type of the tobacco cut tobacco of current identification.
In described Identification platform, memory device 8 is for having prestored tobacco cut tobacco information table, described tobacco cut tobacco information table with tobacco cut tobacco type for index, have recorded the benchmark cut tobacco width range of each type tobacco cut tobacco, cut tobacco upper limit gray threshold and cut tobacco lower limit gray threshold respectively, described cut tobacco upper limit gray threshold and described cut tobacco lower limit gray threshold are used for the cut tobacco in image to separate with background, and described memory device 8 is also for having prestored pixel quantity threshold value and longitudinally having cut quantity.
In described Identification platform, micro objective group 5 is placed between described cut tobacco load bearing equipment 1 and described high-definition camera equipment 2, for amplifying many cut tobaccos on described cut tobacco load bearing equipment 1, takes for described high-definition camera equipment 2.
In described Identification platform, voice playing equipment 9 is connected with described AT89C51 single-chip microcomputer 6, for playing the voice prompted file corresponding with tobacco cut tobacco width qualifying signal or the defective signal of tobacco cut tobacco width.
In described Identification platform, display device 10 is connected with described AT89C51 single-chip microcomputer 6, for showing the prompt text corresponding with tobacco cut tobacco width qualifying signal or the defective signal of tobacco cut tobacco width.
In described Identification platform, described cut tobacco load bearing equipment 1 is a flat shape, for putting non-touching many cut tobaccos.
In described Identification platform, described high-definition camera equipment 2 comprises optical filter, camera lens and cmos image sensor, described camera lens is between described optical filter and described cmos image sensor, and the resolution of the cut tobacco image of described cmos image sensor collection is 1366 × 768.
In described Identification platform, floor light light source 4 comprises luminance sensor and luminescent device, described luminance sensor detects the ambient brightness of surrounding environment, and described luminescent device is connected with described luminance sensor, determines the luminous power of the floor light provided based on described ambient brightness.
In described Identification platform, described width identification equipment 3 comprises image pre-processing unit, image segmentation unit, Impurity removal unit, burr removing unit and width detection unit, described image pre-processing unit is connected with described cmos image sensor, medium filtering and gray processing process are performed successively to described cut tobacco image, to obtain gray level image, described image segmentation unit is connected respectively with described image pre-processing unit and described AT89C51 single-chip microcomputer 6, receive target cut tobacco upper limit gray threshold and the target cut tobacco lower limit gray threshold of the transmission of described AT89C51 single-chip microcomputer 6, the pixel identification of gray-scale value in described gray level image between described target cut tobacco upper limit gray threshold and described target cut tobacco lower limit gray threshold is formed multiple cut tobacco sub pattern, described Impurity removal unit is connected respectively with described image segmentation unit and described memory device 8, calculate the total pixel number of each cut tobacco sub pattern in multiple cut tobacco sub pattern, one or more cut tobacco sub pattern that output total pixel number is more than or equal to pixel quantity threshold value export as one or more target cut tobacco sub pattern.
Described burr removing unit is connected with described Impurity removal unit, for removing the burr of described one or more target cut tobacco sub pattern, to obtain one or more processed cut tobacco sub pattern, described width detection unit is connected respectively with described burr removing unit and described memory device 8, each processed cut tobacco sub pattern is longitudinally cut the number of times reaching described longitudinally cutting quantity by predetermined space, obtain the multiple horizontal cut tobacco width that quantity is described longitudinally cutting quantity, described multiple horizontal cut tobacco width is averaged, obtain the width of each processed cut tobacco sub pattern, and the width of one or more processed cut tobacco sub pattern is averaged, to obtain described cut tobacco width.
In described Identification platform, described AT89C51 single-chip microcomputer 6 is connected respectively with described user input device 7 and described memory device 8, type based on the tobacco cut tobacco of described current identification is searched and the benchmark cut tobacco width range of the type matching of the tobacco cut tobacco of described current identification, cut tobacco upper limit gray threshold and cut tobacco lower limit gray threshold in described tobacco cut tobacco information table, to export as target fiducials cut tobacco width range, target cut tobacco upper limit gray threshold and target cut tobacco lower limit gray threshold.
Described AT89C51 single-chip microcomputer 6 is also connected with described width detection unit, to obtain described cut tobacco width, and when described cut tobacco width drops on described target fiducials cut tobacco width range, send tobacco cut tobacco width qualifying signal, when described cut tobacco width is not in described target fiducials cut tobacco width range, send the defective signal of tobacco cut tobacco width.
Wherein, described cut tobacco load bearing equipment 1 also comprises cut tobacco automatic cleaning device, is connected with described AT89C51 single-chip microcomputer 6, for after receiving described tobacco cut tobacco width qualifying signal or the defective signal of described tobacco cut tobacco width, and many cut tobaccos described in automatic cleaning.
In described Identification platform, power supply device 11 is connected with described AT89C51 single-chip microcomputer 6, for under the control of described AT89C51 single-chip microcomputer 6, for described Identification platform provides various different electric power supply pattern, described various different electric power supply pattern comprises battery saving mode and normal mode.
Wherein, in described Identification platform, described image pre-processing unit, described image segmentation unit, described Impurity removal unit, described burr removing unit and described width detection unit can be adopted different fpga chips to realize respectively; Also can described image pre-processing unit, described image segmentation unit, described Impurity removal unit, described burr removing unit and described width detection unit be all integrated in same fpga chip; Described voice playing equipment 9 is chosen as loudspeaker, and described display device 10 is chosen as LCDs, and described user input device 7 is chosen as keyboard or the touch-screen integrated with described display device 10.
In addition, FPGA (Field-Programmable Gate Array), i.e. field programmable gate array, he is the product further developed on the basis of the programming devices such as PAL, GAL, CPLD, occur as a kind of semi-custom circuit in special IC (ASIC) field, he solves the deficiency of custom circuit, also overcomes the shortcoming that original programming device gate circuit number is limited.
As far back as 1980 mid-nineties 90s, FPGA takes root in PLD equipment.CPLD and FPGA includes the Programmadle logic unit of some relatively large amount.The density of CPLD logic gate is between several thousand to several ten thousand logical blocks, and FPGA normally arrives millions of several ten thousand.The key distinction of CPLD and FPGA is their system architecture.CPLD is a somewhat restrictive structure.This structure is arranged by the logical groups of one or more editable result sum and forms with the register of the locking of some relatively small amounts.Such result lacks editor's dirigibility, but but have the time delay and logical block that can estimate to the advantage of linkage unit height ratio.And FPGA has a lot of linkage units, although allow him edit more flexibly like this, structure is complicated many.The difference of CPLD and FPGA another one is that most FPGA contains high-level built-in module (such as totalizer and multiplier) and built-in memory body.Therefore relevant important difference be much new FPGA support completely or part system in reconfigure.Allow their design along with system upgrade or dynamically reconfigure and change.Some FPGA can allow a part for equipment update and other parts continue normal operation.
FPGA have employed logical cell array LCA (Logic Cell Array) such concept, and inside comprises configurable logic blocks CLB (Configurable Logic Block), input/output module IOB (Input Output Block) and interconnector (Interconnect) three parts.
Field programmable gate array (FPGA) is programming device, and as compared to conventional logic circuit and gate array (as PAL, GAL and CPLD device), FPGA has different structures.FPGA utilizes small-sized look-up table (16 × 1RAM) to realize combinational logic, each look-up table is connected to the input end of a d type flip flop, trigger drives other logical circuits again or drives I/O, thus constitute the basic logic unit module that not only can realize combination logic function but also can realize sequential logic function, these intermodules utilize metal connecting line to be connected to each other or are connected to I/O module.
Adopt tobacco cut tobacco width Identification platform of the present invention, for existing tobacco cut tobacco width identification equipment at substantial cost of labor and time cost and the technical matters of Measurement reliability difference, automatically complete the measurement of all kinds tobacco cut tobacco width by image processing techniques and type matching pattern targetedly and qualification judges, realize tobacco cut tobacco width examination and controlling timely and effectively.
Be understandable that, although the present invention with preferred embodiment disclose as above, but above-described embodiment and be not used to limit the present invention.For any those of ordinary skill in the art, do not departing under technical solution of the present invention ambit, the technology contents of above-mentioned announcement all can be utilized to make many possible variations and modification to technical solution of the present invention, or be revised as the Equivalent embodiments of equivalent variations.Therefore, every content not departing from technical solution of the present invention, according to technical spirit of the present invention to any simple modification made for any of the above embodiments, equivalent variations and modification, all still belongs in the scope of technical solution of the present invention protection.