CN205091249U - Timber colour identification system - Google Patents

Timber colour identification system Download PDF

Info

Publication number
CN205091249U
CN205091249U CN201520739355.2U CN201520739355U CN205091249U CN 205091249 U CN205091249 U CN 205091249U CN 201520739355 U CN201520739355 U CN 201520739355U CN 205091249 U CN205091249 U CN 205091249U
Authority
CN
China
Prior art keywords
color
color sensor
sensor
timber
pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201520739355.2U
Other languages
Chinese (zh)
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.)
FUYANG JINMU ARTS AND CRAFTS Co Ltd
Nanjing Forestry University
Original Assignee
FUYANG JINMU ARTS AND CRAFTS Co Ltd
Nanjing Forestry University
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 FUYANG JINMU ARTS AND CRAFTS Co Ltd, Nanjing Forestry University filed Critical FUYANG JINMU ARTS AND CRAFTS Co Ltd
Priority to CN201520739355.2U priority Critical patent/CN205091249U/en
Application granted granted Critical
Publication of CN205091249U publication Critical patent/CN205091249U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Spectrometry And Color Measurement (AREA)

Abstract

The utility model provides a simple structure, functioning speed are fast, low cost, distortion are little, timber colour identification system that the accuracy is high, and it includes white illuminating source, TCS3200D color sensor, programmable controller, LCD liquid crystal touch screen, and the light that white illuminating source sent gets into color sensor through the timber reflection, and color sensor, white illuminating source, LCD liquid crystal touch screen all are connected with programmable controller.

Description

Wood color recognition system
Technical field
This technology relate to wood surface color is identified, the system and method for sorting.
Background technology
Current domestic furniture, wooden decorative etc. require strict enterprise to the wood color homogeneity of timber, chromatic aberration, most mode of artificial naked eyes identification that adopts carries out sorting to the aberration of timber, and it exists the outstanding problems such as sharpness of separation is not high, Difference Control is inaccurate, sorting personnel are many, the efficiency of separation is low, production cost is high, pipelining is difficult, mechanization degree is low.Also someone adopts camera to take pictures to wood surface, process with the photo of computing machine to shooting again, the storage space that this method needs because of photo is large, the computing velocity that comparison film carries out subsequent treatment requirement requires very high, add that the price of camera own is also very high, so whole system is very expensive.
Summary of the invention
The object of this technology is to provide that a kind of structure is simple, travelling speed is fast, with low cost, distortion is little, the wood color recognition system that accuracy is high.
Wood color recognition system, it comprises white emitting light source, TCS3200D color sensor, Programmable Logic Controller, LCD liquid crystal touch screen, the light that white emitting light source sends enters color sensor through timber reflection, and color sensor, white emitting light source, LCD liquid crystal touch screen are all connected with Programmable Logic Controller.
Above-mentioned wood color recognition system, described Programmable Logic Controller is STM32F407ZGT6 chip.
Above-mentioned wood color recognition system, color sensor has more than three or three, and color sensor arranges along the Width of tested timber.
Above-mentioned wood color recognition system, white emitting light source and color sensor are arranged on can relative on the traversing carriage of tested wood surface movement.The position of traversing carriage can be regulated like this, make color sensor be in the best effort distance of color sensor to the distance of tested wood surface.
Above-mentioned wood color recognition system, the GPIOF5 of STM32F407ZGT6 connects the public OUT pin of color sensor, for wire size catches line; PA4 connects the public S2 pin of each color sensor, PA7 connects the public S3 pin of each color sensor, PE5 connects the public S1 pin of each color sensor, and PE6 connects the public S0 pin of each color sensor, PC6, PC7, PC8 respectively with the OE pin being connected three color sensors.
This technology provide simultaneously a kind of can the fast wood color recognition methods of distinguishing quickly wood color, travelling speed.
The wood color recognition methods of this technology, use above-mentioned wood color recognition system, its step comprises:
A, demarcation: color sensor catches the light of the pure white tabula rasa reflection of being irradiated by white light source, measure color sensor for red, green, blue three primary colours output cycle tr, tg, tb by controller;
B, test: the light that light source sends is radiated at the surface of tested timber, the reflected light of timber enters color sensor, measures color sensor for red, green, blue output cycle sr, sg, sb by controller;
C, gray count: calculate gray scale Gray with following formula and export display display to:
Gray=30%×255×sr/tr+59%×255×sg/tg+11%×255×sb/tb。
Above-mentioned wood color recognition methods, white emitting light source and color sensor are arranged on can relative on the traversing carriage of tested wood surface movement; When carrying out described step b, the position of adjustment traversing carriage, makes color sensor be 10mm to the distance of tested wood surface in real time.
Above-mentioned wood color recognition methods, described wood color recognition system also comprises the Material Sensor for judging whether to have below sensor tested timber; When Material Sensor detect to have tested timber below sensor time, carry out described step b, c.
Above-mentioned wood color recognition methods, tested timber passes through below sensor; When tested timber passes through below sensor,
Carry out described step b, gray scale that c obtains timber.
Above-mentioned wood color recognition methods, tested timber passes through below sensor; When tested timber passes through below sensor,
Repeat described step b, gray scale that c obtains timber different parts.
Above-mentioned wood color recognition methods, after a color sensor or the gray scale of multiple color sensors to the different parts of tested board surface gather, by controller, each position gray values collected is calculated, when tested timber is completely by after sensor, using the arithmetic mean of each position gray values as the final gray-scale value of this timber and export to display display, the color grade data area of final gray-scale value and storage contrasts, and finally determines tested plank color grade scope.After same color sensor or the gray scale of different color sensors to the different parts of tested board surface are tested, export using the arithmetic mean of each position gray scale as the final gray-scale value of this timber.
Above-mentioned wood color recognition methods, respectively arranges one for judging whether have Material Sensor below sensor in the both sides, front and back of color sensor; Tested timber passes through below sensor; When Material Sensor when above detects that one block of tested timber enters into the position below color sensor, repeat step b, c; Material Sensor when below detects that the tested timber of this block leaves after below color sensor, by controller, each position gray values collected is calculated, using the arithmetic mean of each position gray values as the final gray-scale value of this timber and export to display display.Like this, this method is specially adapted to continuous flowing water work operations, can complete the gray scale test job to the tested timber that one piece of block passes through successively below sensor continuously.Best, Material Sensor, white emitting light source and color sensor are all arranged on can relative on the traversing carriage of tested wood surface movement; When Material Sensor when above detects that one block of tested timber enters into the position below color sensor, the position of adjustment traversing carriage, makes color sensor be 10mm to the distance of tested wood surface, then repeats step b, c in real time; Material Sensor when below detects that the tested timber of this block leaves after below color sensor, by controller, each position gray values collected is calculated, using the arithmetic mean of each position gray values as the final gray-scale value of this timber and export to display display.
The beneficial effect of this technology: this technology is only analyzed with the reflected light of one or more color sensor to timber, draw for reflected light in trichromatic output cycle or the frequency such as redness, green, blueness, and according to the scale factor of white balance correction (demarcation) gained (be respectively be 255/tr, 255/tg, 255/tb for red, green, blue scale factor), draw the gray scale of certain point on the timber measured by this color sensor.If the color of wood surface is basically identical, the gray scale of timber substantially can be determined according to a bit.Certainly, in order to reduce randomness and the error of test, after can testing the gray scale of the different parts of tested board surface, export using the arithmetic mean of monoblock wood surface each position gray scale as the final gray-scale value of this timber.
Because this patent only needs the umber of pulse of testing color sensor output, travelling speed is exceedingly fast, and needs the byte of storage very short, so not only this cost of testing system is low, and can adapt to the timber of movement fast, be particularly useful for pipelining.Generally when testing, demarcating and only needing to do once, later only need to repeat timber test and gray count.
Accompanying drawing explanation
Fig. 1 is the overall framework figure of wood color recognition system;
Fig. 2 is the frame diagram of TCS3200D color reaction device;
Fig. 3 is the circuit diagram that three TCS3200D color reaction device parallel connections are connected with STM32F407ZGT6 microprocessor;
Fig. 4 is the process flow diagram taking turns to read data to three TCS3200D color reaction devices;
Fig. 5 is STM3F407ZGT6 microprocessor acquisition algorithm process flow diagram.
Embodiment
1 General layout Plan
The efficient automatic analysis system of wood surface color acquisition-aberration of design is made up of TCS3200D color reaction device, STM32F407ZGT6 microprocessor, ILI9341 liquid crystal display and associated electrical utility appliance thereof.Various equipment room use SPI, 8080, the communications protocol communication such as SCCB, frame diagram is as Fig. 1.TCS3200D inductor exports each component pulse signal of wood surface color RGB, STM32F407ZGT6 catches pulse, again according to the RGB data conversion gradation values that eye recognition custom will read, compare with 10 the gray shade scale standard interval censored datas arranged by LCD display in advance, determine tested plank color grade scope, and separation results is shown by display, provide operating personnel with reference to operation.
2 color acquisition designs
Color reaction part kernal hardware is the TCS3200D color reaction device that TOAS company produces.This working sensor error under voltage is 2.7V-5.5V, 50KHz duty is less than 0.2%, and has power-off function, and supporting pieces selects; Exportable 2%, 20%, 100% 3 kind of frequency band; Output frequency dutycycle is 50%; Directly can export corresponding RGB color pulses, without the need to passing through analog-digital conversion; White emitting light source 2 and and color sensor be fixed on the traversing carriage that can move back and forth up and down, by adjusting the upper-lower position of traversing carriage during sensor in real time, make no matter how timber 1 thickness changes, remain that the distance of color sensor and light source distance wood surface is constant, maintain best coverage 10mm, thus ensure that TCS3200D color sensor is enough to competent color acquisition task.
TCS3200D induction chip frame diagram is as Fig. 2, and the illumination of reflecting when timber 1 is mapped on TCS3200D, and by the combination of pin s2 and s3 varying level, the corresponding three primary colors gathered in light are namely red, green, blue.And the not homochromy meeting of the intensity of this color causes its OUT output frequency different, the intensity of three kinds of colors can be judged according to OUT output frequency.Selected color RGB component by S2 and S3 pin low and high level, such as when S2 and S3 is low level simultaneously, OUT pin exports pulse and represents R value component, specifically combines in table 1.Selected OUT output pulse frequency by S0 and S1 pin low and high level, such as when S0 is low level, when S1 is high level, OUT output pulse frequency is 2% of maximum output frequency, specifically combines in table 2.In table 1,2, L represents low level, and H represents high level.
Table 1TCS3200D exports color selecting
S2 S3 Export color
L L Red
L H Blue
H L Nothing
H H Green
Table 2TCS3200D output frequency
S0 S1 Output frequency
L L Powered-down
L H 2%
H L 20%
H H 100%
2.1 induction installation hardware design
Consider that timber slab has one fixed width, according to single TCS3200D color sensor, color acquisition region is very narrow, for expanding the width in color acquisition region, the convenient color data gathering wide format steel slab surface, select multi-parallel TCS3200D color sensor form, namely by three or more TCS3200D color sensor Side by side groupings, center sensor spacing 15mm.Wherein public output frequency selects pin S0 and S1, output color selecting pin S2 and S3, output terminal OUT, and sheet selects Enable Pin OE independently to use, OE Low level effective, carries out digital independent by turns by Software for Design to three TCS3200D.TCS3200D hardware three is connected in parallel schematic diagram as 3.8 0.2W white LED lamps are provided with, for TCS3200D sensor provides white light source in this device.
2.2 color reaction device Software for Design
According to above-mentioned color reaction device hardware design, software takes turns to read data to three TCS3200D, and is taking turns in reading process, takes turns to read RGB three primary colours component respectively to each inductor.Software workflow figure is as Fig. 4.
Software starts, first the OE pin of TCS1 (first color sensor) is dragged down, draw high the OE pin of TCS2 (second color sensor) and TCS3 (the 3rd color sensor), only enable TCS1, enter subroutine (subroutine shows in MCU algorithm), then read respectively by dragging down or draw high S2 and S3 pin, OUT pin exports corresponding RGB pulse, read the RGB component of TCS1, after exiting subroutine, turn to TCS2, enable TCS2 exports, after output completes, equally to the enable output of TCS3.After reading completes TCS3, again TCS1 is read.Circulation like this is read and is exported.
3MCU design and related algorithm
MCU (miniature central processing unit) selects STM32F407ZGT6, and this chip is the Cortex-M4 family chip that ST company produces, and its operation frequency, up to 168MHz, has 2 senior timers, 10 general purpose timers and 2 basic timers.Wherein, general purpose timer count frequency is 84MHz, can complete 0-65535 and count from top to bottom or from bottom to up.This program uses the OUT pin of passage 1 couple of TCS3200D of timer TIM2 to export pulse and catches, and pulse output valve under calculating different colours.
3.1STM32F407ZGT6 signal wiring designs
STM32F407ZGT6 pin is numerous, in order to the hardware connection mode of itself and TCS3200D can be conveniently described, only list following pin, that the GPIOF5 (hereinafter referred to as PF5) of STM32F407ZGT6 connects the public OUT pin of color sensor respectively, for wire size catches line, PA4 connects the public S2 pin of color sensor, PA7 connects the public S3 pin of color sensor, PE5 connects the public S1 pin of color sensor, PE6 connects the public S0 pin of color sensor, PC6 connects the OE pin of TCS1, and PC7 connects the OE pin of TCS2, and PC8 connects the OE pin of TCS3.In addition other basic function pins such as clock wire size line etc. of STM32F407ZGT6, because not as this program emphasis, so do not do detailed statement.STM32F407ZGT6 and TCS3200D color reaction device signal wiring figure is shown in Fig. 3.
3.2STM32F407ZGT6 data capture and color conversion
The light that light source sends enters color sensor through timber reflection, uses the TIM2 passage 1 of STM32F407ZGT6 to carry out OUT pin frequency acquisition.Process flow diagram is as Fig. 5, and first initialization TIM2 General timer, initialization adopts 21 frequency divisions, because TIM2 counting clock is 84MHz, namely 1/84us counts 1 time, when adopting 21 frequency division, namely adopts 21/84us (0.25us) to count once.Because TCS3200D exports as square wave, dutycycle is 50%, only needs to catch twice rising edge signal continuously, can complete a cycle collection.When catching first time rising edge signal, emptying TIM2 counter, waiting second time rising edge to be captured, read TIM2 counter values N, one can be calculated and export T cycle length, T=numerical value of N * 0.25us.The light that light source sends enters color sensor through timber reflection, and the color sensor that setting chip measures is respectively sr, sg, sb for red, green, blue output cycle.
After the timber the captured concrete RGB component cycle, also need to compare with the RGB numeral under white light light conditions, concrete RGB numerical value can be calculated.Therefore, before catching different colours RGB, need first to carry out white balance (demarcation).The method of white balance is white light source is irradiated pure white tabula rasa, and after the reflection of pure white tabula rasa, enter TCS3200D, draw the RGB three primary colours component cycle respectively, these three cycles are standard white light RGB numerical value.The color sensor that setting chip measures is respectively tr, tg, tb to the redness in standard white light, green, blue output cycle.So, be exactly be 255/tr, 255/tg, 255/tb respectively for red, green, blue scale factor (white balance coefficients).The redness in the reflected light of timber, green, blue concrete intensity level can be calculated according to R=255 × sr/tr, G=255 × sg/tg, B=255 × sb/tb.
3.3 color gray-scale value process
Read wood surface RGB color component, correspond to redness, green, blue three numerical value, color depth cannot be carried out and compare, produce comparability to three numerical value are converted into a numeral, and in conjunction with human eye, custom is distinguished to color depth, therefore select gray-scale value comparative approach.Namely gray scale take black as reference color, and the black of different saturation degrees shows image.Usual pixel represents with a byte (8bit) after quantizing.Such as blackly be quantified as 256 gray levels to ash to white continually varying gray-scale value having, the scope of gray-scale value is 0 ~ 255, and it represents that brightness is from deeply to shallow, and the color in correspondence image is that the psychology formula that RGB transfers gray-scale value to is from black in vain:
Gray=30%×R+59%×G+11%×B
MCU can must be changed by completeness color-gray-scale value by above-mentioned formula, and wood surface color will be converted into the quantized values between 0-255, thus facilitate depth ratio comparatively, draw aberration grade.
4TFTLCD information exports
TFTLCD liquid crystal display is as the important hardware device of man-machine interaction, essential in automation control system.Native system directly utilizes ILI9341 capacitance plate as output information and associative operation equipment.
4.1LCD Display designing
LCD display part, main use ILI9341IC chip liquid crystal display, this display also has touch screen function.
ILI9341GRAM part is maximum stores 18 storage spaces, considers that color stores, and divides 8,16,24 etc.Wherein 16 is enhancing color.Select the display of 16 colors in native system, wherein 0 and 12 invalid.RGB component stores according to 5:6:5.GRAM is in fact similar with video memory, and its register address and lcd screen show some one_to_one corresponding.The LCD display resolution that native system adopts is 480*800, capacitance plate touch-control.
Because LCD display section is not the design's emphasis, only emphasize that result exports, so, concrete ILI9341 storage register is not described in detail.
The advantage of this patent:
1, collector is selected to be the TCS3200D sensor that SOAT company produces, and volume is little, and quality is light, and the image noise that the vibrations that pipeline operation produces cause has well tackles effect.
2, MCU selection STM32F407ZGT6, the features such as framework is ARM company designs, and data processing speed is fast, and response rapidly, data processing is stable, cost is low, apply and extensively, provide technical support to following wood industry automatically screening in Industry Control.
3, color gray count, changes into solid color by different colours, and differentiating for color depth provides foundation, for the wood surface of color and complexity thereof, adaptable.
4, LCD display has very strong interactive capability, and manual control system is convenient.
5, industry control part only need complete according to related interrupts.
Generally speaking, this patent is studied wood surface color acquisition, aberration grade and algorithm thereof.TCS3200D color reaction device is utilized to produce RGB three primary colours pulse signal, by STM32F407ZGT6 chip, it is caught, calculate corresponding RGB numerical value, and convert RGB to gray-scale value by the unification of gray count formula, contrast with the color gray scale aberration interval of setting and screen, show separation results by LCD.

Claims (5)

1. wood color recognition system, it is characterized in that: it comprises white emitting light source, TCS3200D color sensor, Programmable Logic Controller, LCD liquid crystal touch screen, the light that white emitting light source sends enters color sensor through timber reflection, and color sensor, white emitting light source, LCD liquid crystal touch screen are all connected with Programmable Logic Controller.
2. wood color recognition system as claimed in claim 1, is characterized in that: described Programmable Logic Controller is STM32F407ZGT6 chip.
3. wood color recognition system as claimed in claim 2, is characterized in that: the GPIOF5 of STM32F407ZGT6 connects the public OUT pin of color sensor, for wire size catches line; PA4 connects the public S2 pin of each color sensor, PA7 connects the public S3 pin of each color sensor, PE5 connects the public S1 pin of each color sensor, and PE6 connects the public S0 pin of each color sensor, PC6, PC7, PC8 respectively with the OE pin being connected three color sensors.
4. wood color recognition system as claimed in claim 1, it is characterized in that: color sensor has more than three or three, color sensor arranges along the Width of tested timber.
5. wood color recognition system as claimed in claim 1, is characterized in that: white emitting light source and color sensor are arranged on can relative on the traversing carriage of tested wood surface movement.
CN201520739355.2U 2015-09-22 2015-09-22 Timber colour identification system Active CN205091249U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201520739355.2U CN205091249U (en) 2015-09-22 2015-09-22 Timber colour identification system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201520739355.2U CN205091249U (en) 2015-09-22 2015-09-22 Timber colour identification system

Publications (1)

Publication Number Publication Date
CN205091249U true CN205091249U (en) 2016-03-16

Family

ID=55481923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201520739355.2U Active CN205091249U (en) 2015-09-22 2015-09-22 Timber colour identification system

Country Status (1)

Country Link
CN (1) CN205091249U (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105181609A (en) * 2015-09-22 2015-12-23 南京林业大学 Wood color recognition system and method
CN106092908A (en) * 2016-05-26 2016-11-09 北京化工大学 A kind of method for quick of fungimycin based on two dynamic white balances of color sensor
CN106918560A (en) * 2017-04-24 2017-07-04 江西农业大学 A kind of fresh lotus seeds identifying device end to end
CN112113994A (en) * 2019-06-19 2020-12-22 日本株式会社日立高新技术科学 Thermal analysis device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105181609A (en) * 2015-09-22 2015-12-23 南京林业大学 Wood color recognition system and method
CN106092908A (en) * 2016-05-26 2016-11-09 北京化工大学 A kind of method for quick of fungimycin based on two dynamic white balances of color sensor
CN106918560A (en) * 2017-04-24 2017-07-04 江西农业大学 A kind of fresh lotus seeds identifying device end to end
CN112113994A (en) * 2019-06-19 2020-12-22 日本株式会社日立高新技术科学 Thermal analysis device

Similar Documents

Publication Publication Date Title
CN205091249U (en) Timber colour identification system
CN105181609A (en) Wood color recognition system and method
CN203629685U (en) Color identification device based on LED
CN102095499A (en) Method for automatic color separation of ceramic tiles
CN102253038B (en) Gold immune quantitative detection method and device on basis of embedded type charge coupled device (CCD) image acquisition
CN105300854A (en) Fog drop parameter measurement device and fog drop parameter measurement analysis method using device
CN104567680B (en) A kind of measuring system of electric wire structure
CN203629603U (en) Intelligent electric energy meter detection device based on image identification technology
CN105427449A (en) Bank note image optical compensation correction method, bank note testing identification device, and ATM
CN206208775U (en) Realize the vision system and its image capturing system of ammeter outward appearance detection
CN208568630U (en) A kind of mixed version detection device of the printed matter based on image
CN110831276B (en) LED-based lamplight brightness control method and related device
CN103808918A (en) Image-sensor-based detection system of colloidal gold immunoassay
CN207516267U (en) A kind of board surface defect double-side detecting device
CN105744261B (en) The test system and method for testing of set top box front panel
CN103971471A (en) Automatic pricing method and system for dinner plates based on color discrimination
CN105263008B (en) Color image quality method for improving and its device under low environment illumination
CN205607889U (en) Novel glass surface defect detection device
CN209589256U (en) A kind of identification of color and automatic information broadcast system
CN204346368U (en) A kind of measuring system of electric wire structure
CN202041284U (en) Portable color temperature and brightness meter with RGB (red, green and blue) analysis function
CN102508366A (en) Flicker measurer for liquid crystal unit
CN109540477A (en) A kind of TFT test device and its test method
CN104463898A (en) Image identification counting system for logistics platform
WO2022007124A1 (en) Portable waste recycling pricing system and corresponding terminal

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant