CN102614657B - Device and method for automatically detecting surface of common mahjong tile - Google Patents
Device and method for automatically detecting surface of common mahjong tile Download PDFInfo
- Publication number
- CN102614657B CN102614657B CN201210089505.0A CN201210089505A CN102614657B CN 102614657 B CN102614657 B CN 102614657B CN 201210089505 A CN201210089505 A CN 201210089505A CN 102614657 B CN102614657 B CN 102614657B
- Authority
- CN
- China
- Prior art keywords
- board
- board face
- chip microcomputer
- color
- mah
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Geophysics And Detection Of Objects (AREA)
- Spectrometry And Color Measurement (AREA)
Abstract
The invention relates to a device and a method for automatically detecting a surface of a common mahjong tile. The device is characterized by consisting of a color detector, a singlechip and a man-machine interaction device, wherein the color detector comprises a light source and a color sensor, and the man-machine interaction device comprises a button and an indication lamp; the singlechip is connected with the color sensor, the button and the indication lamp; and the color detector is arranged in the outer wall of a mahjong tile conveying channel. The method comprises the following steps of: (1) collecting surface color information of two tiles through the singlechip in advance and storing the surface color information; and (2) when a mahjong tile machine works, analyzing and comparing the collected surface color information with pre-stored color information by the singlechip to judge the surface of the mahjong tile. Compared with the prior art, the device for automatically detecting the surface of the common mahjong tile, disclosed by the invention, has the advantages of having an exact surface detection result, configuring no dust removing mechanism, and eliminating the influence of factors, such as temperature, on detection; in addition, the mahjong tile can utilize the common mahjong tile so as to reduce the production cost.
Description
Technical field
The present invention relates to mahjong machine, the board face that is specifically related to mah-jong pieces in mahjong machine detects.
Background technology
Mahjong machine is the conventional amusement and recreation instruments of people.Mahjong machine in the market, the mah-jong pieces of use are all special-purpose mah-jong pieces, are placed with permanent magnet or iron plate in board, and manufacturing process is complicated, and cost is high.Because board internal magnet riding position does not have unified standard, in society, occur " cheating mahjong machine ", manufacturer and user wish can use ordinary mahjong (inside does not have magnet or iron plate) in mahjong machine, but there is no so far this type of mahjong machine product.
While using ordinary mahjong on mahjong machine, have problems: during reason (washing) board, need to detect the board face of the mah-jong pieces that move in mahjong pieces transporting path, detect a class board of " board face is not inconsistent ", be hit and turn over, make it to build and put down by positive (face of carving characters).
On August 17th, 2005, Chinese patent CN2718677 open " a kind of for identifying the photoelectric recognition device of mah-jong pieces positive and negative ", it is characterized in that: adopt photoelectric probe, dust-proof mechanism is set, the voltage of exporting by reflective photoelectric sensor and setting voltage size relative discern.Its weak point is, 1. a mahjong machine is furnished with two secondary board face looks different board, and the comparative voltage that deck is set may be improper to another deck; In addition, board is with conveyer belt on conveyer belt, and sensor can not be definitely identical to the distance of every board face, identical board face, and the voltage of sensor output also may be different.2. dustproof glass still can be infected with dust, and dust can not be eliminated the impact detecting.
On December 7th, 2011, Chinese patent CN102266666 open " a kind of mahjong machine ", is characterized in that: perceptron is imaging device, the back side and the front of according to built-in algorithm identified, playing a card.Its weak point is that production cost is high.
Summary of the invention
The object of the invention is to solve the problem existing in background technology, a kind of board face automatic detection device and detection method with ordinary mahjong is provided, be used in mahjong machine.
The present invention is achieved in that a kind of board face automatic detection device of ordinary mahjong, it is characterized in that: comprise the color detector, the single-chip microcomputer that light source and color sensor, consist of; Color sensor is connected with single-chip microcomputer; Color detector is arranged in mahjong pieces transporting path sidewall or upper wall, when mah-jong pieces with conveyer belt to before color detector time, the illumination that light source sends is on board, part light is absorbed by board face, another part light carries board face colouring information and reflexes on color sensor, and single-chip microcomputer is according to the red-green-blue relative intensity judgement board face of color sensor output.
Characterized by further comprising the human-computer interaction device who is comprised of button and indicator lamp, button is connected with single-chip microcomputer with indicator lamp, is used in the time of need to storing board face look man-machine interaction.In described single-chip microcomputer, be solidified with pre-stored board face look and trace routine.
The detection method of the board face automatic detection device of described ordinary mahjong, is characterized in that comprising the following steps:
(1) before mahjong machine dispatches from the factory while changing board (or), by single-chip microcomputer, gather in advance the board face colouring information (red-green-blue relative intensity) of second mate's board, be stored in single-chip microcomputer.
(2) when mahjong is worked, single-chip microcomputer is by the board face colouring information collecting and be pre-stored in the colouring information analysis comparison in single-chip microcomputer, judgement board face.
Compared with prior art, advantage is in the present invention: board face testing result is accurate; Do not need to arrange dust-proof mechanism; Can eliminate the factors such as temperature to the impact detecting; Make mahjong machine can adopt ordinary mahjong, to reduce the production cost of mahjong machine.
Accompanying drawing explanation
Fig. 1 is principle schematic of the present invention;
Fig. 2 is color detector structural representation of the present invention;
Fig. 3 (a) is that color detector mahjong pieces transporting path sidewall of the present invention is installed front view (analysing and observe);
Fig. 3 (b) is that color detector mahjong pieces transporting path upper wall of the present invention is installed front view (analysing and observe);
Fig. 4 is a kind of circuit theory diagrams of the present invention;
Fig. 5 is the subroutine flow chart that prestores of the present invention;
Fig. 6 is main program flow chart of the present invention.
In Fig. 1~Fig. 3: 1. color detector; 11. light sources; 12. color sensors; 2. single-chip microcomputer; 3. human-computer interaction device; 4. mah-jong pieces; 5. mah-jong pieces mahjong pieces transporting path outer wall; 6. mah-jong pieces conveyer belt.
The specific embodiment
With reference to the accompanying drawings the present invention is described in further detail.
A board face automatic detection device for ordinary mahjong, as shown in Figure 1, comprises color detector 1, single-chip microcomputer 2, human-computer interaction device 3.
Color detector 1 structural representation as shown in Figure 2, is comprised of light source 11 and color sensor 12, light source 11 and color sensor 12 center distance 3.8mm.
Color detector is arranged in mahjong pieces transporting path outer wall.Fig. 3 (a) when prestoring, detecting the positive color of mah-jong pieces, color detector scheme of installation: light source 11 is blank without word place facing to the top edge (or lower limb) of mah-jong pieces.If prestore, while detecting mah-jong pieces reverse side color, color detector installation site is facing to mah-jong pieces face.Schematic diagram when Fig. 3 (b) is arranged on mahjong pieces transporting path upper wall for color detector, light source 11 and color sensor 12 positions should be directly over mah-jong pieces overlay coatings.
In accompanying drawing 4, U1 is color sensor 12, model is TCS3404, its inside is integrated with 4 groups of 16 photodiodes, wherein 3 groups respectively redly, green, blue color filter, 1 group of free of light filter, converts the red-green-blue composition light intensity of light and total luminous intensity to digital quantity, and accompanying drawing 4 has provided the physical circuit being connected with single-chip microcomputer 2.
The optional inside of single-chip microcomputer 2 is integrated with 8 or 32 single-chip microcomputers of FlashROM, EEPROM.
In accompanying drawing 4, U2 is single-chip microcomputer 2, and model is STC15F104E, 8 pins of this single-chip microcomputer, and inside is integrated with 4KB FlashROM, 1KB EEPROM and clock, reset circuit.
In accompanying drawing 4, K1 is the button (prestoring strong) in human-computer interaction device, and D2 is indicator lamp in human-computer interaction device, and R2 is current-limiting resistance, and resistance is 470 Ω.
In accompanying drawing 4, C1 is filter capacitor, and capacity is 100nF.
The detection method of the board face automatic detection device of described ordinary mahjong, is characterized in that comprising the following steps:
(1) colouring information that the board face of pre-stored second mate's board is not inconsistent face (mahjong machine dispatch from the factory before or while changing board) to EEPROM in monolithic Bigpian, comprises the steps:
Step 1: take out one card from the first secondary mah-jong pieces, " board face is not inconsistent " face is placed in before color detector, the K1 that pushes button (prestoring strong) start;
Step 2: gather board face red-green-blue light intensity and total light intensity, be kept at variable R
1, G
1, B
1, K
1in;
Step 3: the ratio PR that calculates red-green-blue light intensity and total light intensity
1=R
1/ K
1, PG
1=G
1/ K
1, PB
1=B
1/ K
1, by PR
1, PG
1, PB
1be saved in the interior EEPROM of monolithic Bigpian;
Step 4: after preservation, make indicator lamp D2 flicker 5 seconds, prompting discharges by strong K1, after K1 discharges, the end that prestores of the first secondary mah-jong pieces.
Step 5: take out one card from the second secondary mah-jong pieces, " board face is not inconsistent " face is placed in before color detector, press and prestore by strong K1, repeating step two~step 4, by the PR of the second secondary mah-jong pieces
2, PG
2, PB
2be saved in the interior EEPROM of monolithic Bigpian.
(2) when mahjong machine is worked, single-chip microcomputer will detect in real time board face colouring information and be pre-stored in the colouring information analysis comparison in EEPROM in monolithic Bigpian, and judgement board face board face, comprises the steps:
Step 1: judge whether that board moves to (total the light intensity of detection becomes greatly) before color detector with conveyer belt 6, if do not have, cycle detection is waited for;
Step 2: gather the strong and total light intensity of the flushing green blue three color light of board, be kept in variable R, G, B, K;
Step 3: the ratio P that calculates red-green-blue light intensity and total light intensity
r=R/K, P
g=G/K, P
b=B/K;
Step 4: calculate color component ratio difference degree:
S1=(P
R/PR
1)x(P
G/PG
1)x(P
B/PB
1)
S2=(P
R/PR
2)x(P
G/PG
2)x(P
B/PB
2)
Step 5: whether the value that judges S1 is more than or equal to 0.85, is less than or equal to 1.15, the board that if so, this board is " board face is not inconsistent ", makes the P3.0 pin of single-chip microcomputer export high level; Otherwise, judging whether the value of S2 is more than or equal to 0.85, be less than or equal to 1.15, the board that if so, this board is " board face is not inconsistent ", makes the P3.0 pin of single-chip microcomputer export high level;
Step 6: judge that board, whether by (total light intensity of detection diminishes), by rear, makes the P3.0 pin output low level of single-chip microcomputer.
Claims (4)
1. a board face automatic detection device that is used in the ordinary mahjong in mahjong machine, is characterized in that, comprising:
Color detector (1); Described color detector (1) is comprised of white light LEDs (11) and color sensor (12), be arranged in mahjong machine mahjong pieces transporting path outer wall (5), when mah-jong pieces move to color detector (1) when front with conveyer belt (6), color sensor (12) converts the board face look of mah-jong pieces to digital quantity;
Described color sensor (12) is connected with single-chip microcomputer (2); Described single-chip microcomputer (2) is for gathering the digital quantity of color sensor (12) output, and judgement board face is also exported high level or low level from 1 I/O pin;
Described single-chip microcomputer (2) is also connected with human-computer interaction device (3); Described human-computer interaction device (3) is comprised of button K1 and indicator lamp D2, and mah-jong pieces " board face is not inconsistent " face colouring information prestores before dispatching from the factory for mahjong machine or while changing mah-jong pieces;
Described single-chip microcomputer (2) when mahjong machine is worked by collect board face colouring information be pre-stored in colouring information analysis comparison single-chip microcomputer (2) in, judge mah-jong pieces board face.
2. the board face automatic detection device of a kind of ordinary mahjong according to claim 1, is characterized in that: described color sensor (12) model is TCS3404.
3. the board face automatic detection device of a kind of ordinary mahjong according to claim 1, is characterized in that: described single-chip microcomputer (2) is the single-chip microcomputer of 8 pins.
4. the detection method of the board face automatic detection device of ordinary mahjong according to claim 1, is characterized in that:
(1) before mahjong machine dispatches from the factory or while changing mah-jong pieces, the board face colouring information of pre-stored second mate's board, to single-chip microcomputer, comprises the steps:
Step 1: take out one card from the first secondary mah-jong pieces, " board face is not inconsistent " face is placed in before color detector, K1 start push button;
Step 2: gather board face red-green-blue light intensity and total light intensity, be kept at variable R
1, G
1, B
1, K
1in; Calculate the ratio PR of red-green-blue light intensity and total light intensity
1=R
1/ K
1, PG
1=G
1/ K
1, PB
1=B
1/ K
1and preserve;
Step 3: make indicator lamp D2 flicker, prompting discharges by strong K1, after K1 discharges, the end that prestores of the first secondary mah-jong pieces;
Step 4: the board face of another deck is not inconsistent to face and is placed in before color detector, gather board face red-green-blue light intensity and total light intensity, be kept at respectively variable R
2, G
2, B
2, K
2in; Calculate PR
2=R
2/ K
2, PG
2=G
2/ K
2, PB
2=B
2/ K
2and preserve;
(2) when mahjong machine is worked, single-chip microcomputer is by the board face colouring information collecting and be pre-stored in the colouring information analysis comparison in single-chip microcomputer, and judgement board face, comprises the steps:
Step 1: judged whether that board moves to before color detector with conveyer belt (6), if do not have, cycle detection is waited for;
Step 2: gather the strong and total light intensity of the flushing green blue three color light of board, be kept in variable R, G, B, K;
Step 3: the ratio P that calculates red-green-blue light intensity and total light intensity
r=R/K, P
g=G/K, P
b=B/K;
Step 4: calculate color component ratio difference degree:
S1=(P
R/PR
1)×(P
G/PG
1)×(P
B/PB
1)
S2=(P
R/PR
2)×(P
G/PG
2)×(P
B/PB
2)
Step 5: whether the value that judges S1 is more than or equal to 0.85, is less than or equal to 1.15, the board that if so, this board is " board face is not inconsistent ", makes the P3.0 pin of single-chip microcomputer export high level; Otherwise, judging whether the value of S2 is more than or equal to 0.85, be less than or equal to 1.15, the board that if so, this board is " board face is not inconsistent ", makes the P3.0 pin of single-chip microcomputer export high level.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210089505.0A CN102614657B (en) | 2012-03-30 | 2012-03-30 | Device and method for automatically detecting surface of common mahjong tile |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210089505.0A CN102614657B (en) | 2012-03-30 | 2012-03-30 | Device and method for automatically detecting surface of common mahjong tile |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102614657A CN102614657A (en) | 2012-08-01 |
CN102614657B true CN102614657B (en) | 2014-03-19 |
Family
ID=46555082
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210089505.0A Expired - Fee Related CN102614657B (en) | 2012-03-30 | 2012-03-30 | Device and method for automatically detecting surface of common mahjong tile |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102614657B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105032789B (en) * | 2015-08-17 | 2018-06-26 | 江苏瑞新科技股份有限公司 | The aberration sorting equipment and its method for sorting of a kind of silicon cell |
CN109060132A (en) * | 2018-09-11 | 2018-12-21 | 新灵电子技术开发(深圳)有限公司 | A kind of color identification processing system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005189119A (en) * | 2003-12-25 | 2005-07-14 | Osaka Industrial Promotion Organization | Color measuring method and color measuring device |
CN1698919A (en) * | 2004-05-17 | 2005-11-23 | 于作涛 | Automatic shuffle method and structure of color choosing mah-jong machine |
CN201130057Y (en) * | 2007-08-15 | 2008-10-08 | 广东威创视讯科技股份有限公司 | Color detector and color recognition device |
CN102266666A (en) * | 2011-08-19 | 2011-12-07 | 许宏 | Mahjong machine |
CN202599806U (en) * | 2012-03-30 | 2012-12-12 | 南京财经大学 | Tile face automatic detecting device of common mahjong tiles |
-
2012
- 2012-03-30 CN CN201210089505.0A patent/CN102614657B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005189119A (en) * | 2003-12-25 | 2005-07-14 | Osaka Industrial Promotion Organization | Color measuring method and color measuring device |
CN1698919A (en) * | 2004-05-17 | 2005-11-23 | 于作涛 | Automatic shuffle method and structure of color choosing mah-jong machine |
CN201130057Y (en) * | 2007-08-15 | 2008-10-08 | 广东威创视讯科技股份有限公司 | Color detector and color recognition device |
CN102266666A (en) * | 2011-08-19 | 2011-12-07 | 许宏 | Mahjong machine |
CN202599806U (en) * | 2012-03-30 | 2012-12-12 | 南京财经大学 | Tile face automatic detecting device of common mahjong tiles |
Also Published As
Publication number | Publication date |
---|---|
CN102614657A (en) | 2012-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101109659A (en) | Device and method for color recognition | |
CN201130057Y (en) | Color detector and color recognition device | |
CN203629685U (en) | Color identification device based on LED | |
CN206208775U (en) | Realize the vision system and its image capturing system of ammeter outward appearance detection | |
CN101836180A (en) | Detecting ambient light levels in a vision system | |
CN102614657B (en) | Device and method for automatically detecting surface of common mahjong tile | |
CN205849569U (en) | Electric toothbrush | |
CN202506458U (en) | Paper shredder capable of detecting paper filling degree | |
CN108646253B (en) | Photoelectric proximity sensor system and photoelectric proximity detection method | |
CN1971635B (en) | A numeral voice money detection pen | |
CN209720571U (en) | Intelligent classification dustbin | |
CN202599806U (en) | Tile face automatic detecting device of common mahjong tiles | |
CN100570330C (en) | A kind of reagent color detection means based on color sensor | |
CN203117107U (en) | Device for detecting penetration rate of photochromic material | |
CN206295345U (en) | A kind of Vission detector | |
US20020030593A1 (en) | Touch pad, led motion detector head | |
CN201488814U (en) | Tea chromaticity detector | |
CN106137115A (en) | A kind of Intelligent eyesight tester | |
CN102175688A (en) | Colour code detector | |
CN208377141U (en) | A kind of included joint detector of ZJ17 cigarette making machine tipping paper | |
CN208739200U (en) | A kind of mobile phone flashlight detection jig | |
CN204191758U (en) | A kind of auxiliary achromate distinguishes the Intelligent bracelet of look | |
CN106304529A (en) | A kind of remote controller for intelligence colored lamp and the control method of intelligence colored lamp | |
CN104337137B (en) | A kind of achromate of auxiliary distinguishes the Intelligent bracelet of color and distinguishes color method | |
CN206683761U (en) | Color identification device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220113 Address after: 252000 315-316, North building, Kechuang building, No.16, Huanghe Road, Gaoxin District, Liaocheng City, Shandong Province Patentee after: LIAOCHENG YULIN INDUSTRIAL DESIGN Co.,Ltd. Address before: 210046 No. 3 Wenyuan Road, Xianlin University City, Qixia District, Nanjing City, Jiangsu Province Patentee before: NANJING University OF FINANCE AND ECONOMICS |
|
TR01 | Transfer of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140319 |
|
CF01 | Termination of patent right due to non-payment of annual fee |