Disclosure of Invention
The invention aims to overcome the defects of the prior art, further optimizes the color recognition device and the color recognition method according to the own characteristics of the billiard ball, and shortens the acquisition time of each billiard ball to 10 seconds. In particular to a billiard ball color recognition device and a billiard ball color recognition method based on a single color sensor. The identification device has the advantages of simple structure, high accuracy and good coordination of all parts.
In order to solve the above technical problems, a specific embodiment of the present invention provides a billiard ball color recognition device based on a single color sensor, the device comprising: a housing; the light blocking cover is arranged on the shell and used for blocking external light from irradiating the collecting area of the billiard ball; the sensor is arranged in the light blocking cover and is used for sensing the color distribution characteristics of the acquisition area; the light emitting piece is arranged in the light blocking cover and used for irradiating the acquisition area; and the processor is connected with the sensor and used for determining the type of the billiard ball according to the color distribution characteristics.
In a specific embodiment of the present invention, the identification device further includes: the movement mechanism is connected with the processor and used for moving the shell to a ball stacking position according to the type of the billiard ball and driving the billiard ball in the shell to roll in the moving process; and the steering engine is arranged on the shell, connected with the processor and used for releasing the billiards in the shell to the ball stacking position.
In a specific embodiment of the present invention, the identification device further includes: the supporting plate is arranged below the movement mechanism, and when the movement mechanism drives the shell to move, the supporting plate contacts the billiards in the shell so as to enable the billiards to roll, and therefore the sensor can detect a plurality of collecting areas of the billiards.
In the specific embodiment of the invention, the steering engine and the sensor are positioned at two sides of the billiard ball.
In a specific embodiment of the invention, the light shield has a cylindrical outer edge.
When the color distribution characteristics of the billiard ball are collected, the axis of the cylindrical outer edge passes through the center of the billiard ball.
When the color distribution characteristics of the billiards are collected, the spherical surface of the billiards is clung to the cylindrical outer edge, and the area outlined by the cylindrical outer edge is the collecting area.
The specific embodiment of the invention also provides a billiard ball color recognition method based on the single color sensor, which comprises the following steps: utilizing two struts of the shell to extrude billiards entering the shell, so that the billiards cling to the light blocking cover; collecting color distribution characteristics of the area of the billiard ball corresponding to the light barrier by using a sensor; and determining the type of the billiard ball according to the color distribution characteristics.
Wherein the method further comprises: and irradiating the area of the billiard ball corresponding to the light blocking cover by using an LED lamp.
Wherein the method further comprises: the shell is driven by the motion mechanism to move on the supporting plate according to a rectangular track, so that the billiard rolls on the supporting plate, and the sensor is enabled to collect a plurality of areas of the billiard.
Wherein the method further comprises: moving the shell to a ball stacking position according to the type of the billiards; and releasing the billiard ball to the ball stacking position through the steering engine.
According to the above specific embodiments of the present invention, a billiard ball color recognition device and method based on a single color sensor has at least the following advantages: the color sensor is used for identifying the color of the billiard ball, so that the billiard ball is fast in identification speed, simple in structure and high in reliability, the billiard ball is not damaged, the ball placing efficiency of the automatic ball placing machine can be improved, and the manual use degree is greatly reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the scope of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Fig. 1 is an overall structure diagram of a billiard ball color recognition device based on a single color sensor according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a billiard ball color recognition device based on a single color sensor according to an embodiment of the present invention.
Fig. 3 is a schematic side view of a billiard ball color recognition device based on a single color sensor according to an embodiment of the present invention.
Fig. 4 is a schematic view of a light blocking cover of a billiard ball color recognition device based on a single color sensor according to an embodiment of the present invention.
Fig. 5 is a circuit configuration diagram of a billiard ball color recognition device based on a single color sensor according to an embodiment of the present invention.
Fig. 6 is a diagram of a recognition path of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention.
Fig. 7 is a flowchart of an embodiment one of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention.
Fig. 8 is a flowchart of a second example of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention.
Fig. 9 is a flowchart of a third embodiment of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention.
Fig. 10 is a flowchart of a fourth embodiment of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention.
Reference numerals illustrate:
1-shell, 2-light shield, 3-sensor, 4-luminous element, 5-processor, 6-motion mechanism, 7-steering engine, 8-support plate, 21-cylindrical outer edge, A-path A, B-path B, C-billiard ball, L1-distance L1, L2-distance L2
Detailed Description
Various exemplary embodiments of the invention will now be described in detail, which should not be considered as limiting the invention, but rather as more detailed descriptions of certain aspects, features and embodiments of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the specific embodiments of the invention described herein without departing from the scope or spirit of the invention. Other embodiments will be apparent to those skilled in the art from consideration of the specification of the present invention. The specification and examples are exemplary only.
Fig. 1 is an overall structure diagram of a billiard ball color recognition device based on a single color sensor according to an embodiment of the present invention. As shown in fig. 1, a billiard ball C is inside a shell 1 for detection, a motion mechanism 6 is used for driving the shell 1 to move on a supporting plate 8 according to a rectangular track, so that the billiard ball C rolls on the supporting plate 8, meanwhile, a sensor 3 collects multipoint data on the sphere of the billiard ball C, the type of the billiard ball C is determined according to the data, and the motion mechanism 6 drives the shell 1 to move the billiard ball C to a ball stacking position; when the predetermined ball position is reached, the steering engine 7 releases the billiard ball C in the housing 1 to the corresponding ball position (the ball position is typically within the triangular area of the support plate 8). As shown in fig. 2 and 4, the identification device further includes: the light blocking cover 2, the sensor 3, the light emitting piece 4 and the steering engine 7, wherein the light blocking cover 2 is arranged on a PCB (printed circuit board) which is fixed with the shell 1, and the sensor 3 and the light emitting piece 4 are arranged in a circled area of the PCB. As shown in fig. 5, the identification device also has a processor 5. The light blocking cover 2 is arranged on the shell 1 and used for blocking external light from irradiating an acquisition area of the billiard ball C, the light blocking cover 2 is provided with a cylindrical outer edge 21, when the color distribution characteristics of the billiard ball C are acquired, the spherical surface of the billiard ball C is clung to the cylindrical outer edge 21, and the area encircled by the cylindrical outer edge 21 is the acquisition area, so that no communication between internal and external light can be ensured, and the movement of the billiard ball C is not influenced. When the color distribution characteristics of the billiard ball C are collected, the axis of the cylindrical outer edge 21 passes through the center of the billiard ball C. The sensor 3 is arranged in the light shield 2 for sensing the color distribution characteristics of the acquisition area. The sensor 3 is a color sensor, and the color sensor can directly return detected RGB data, has obvious data characteristics, low hardware cost and simple use, and does not need redundant peripheral hardware and processing algorithms. The light emitting piece 4 is a high-brightness LED lamp, and the light emitting piece 4 is arranged in the light shield 2 and used for irradiating the collecting area. Because the detection principle of the color sensor is based on illumination intensities of different light components, the billiard ball C surface needs to be polished in use. Under open environment, external light can mix into the sensor, and the result is influenced, so that the light source needs to be closed and isolated from external light, and the accuracy of the detection result is ensured. The processor 5 is connected to the sensor 3 for determining the type of billiard ball C from the color distribution characteristics. The steering engine 7 is arranged on the shell 1 and connected with the processor 5 and is used for releasing billiards C in the shell 1 to a ball stacking position. As shown in fig. 3, the steering engine 7 and the sensor 3 are located at two sides of the billiard ball C, and the steering engine 7 and two struts on the shell 1 jointly limit the billiard ball C, so that the billiard ball C is prevented from being separated from the light blocking cover 2 in the rolling process, and the acquisition result is prevented from being influenced. In the whole motion process of collection, the steering engine 7 keeps the state of blocking the billiard ball C all the time, and when the collection device moves to the placing position of the billiard ball C, the steering engine 7 can be released to enable the billiard ball C to fall into the corresponding position. In addition, a movement mechanism 6 is connected to the processor 5 for moving the housing 1 to the ball setting position according to the type of billiard ball C. The supporting plate 8 is arranged below the movement mechanism 6, and when the movement mechanism 6 drives the shell 1 to move, the supporting plate 8 contacts the billiard ball C in the shell 1, so that the billiard ball C rolls, and a plurality of collecting areas of the billiard ball C are detected by the sensor 3. The shell 1 is made of metal and is formed by processing a sheet metal process. Such a material makes the housing 1 more robust and durable, and extends the life.
Fig. 5 is a circuit configuration diagram of a billiard ball color recognition device based on a single color sensor according to an embodiment of the present invention. In the figure, the steering engine 7 is controlled by the processor 5 to clamp the billiard ball, then the processor 5 controls the luminous element 4 to emit light for illuminating a detection area, then the processor 5 controls the sensor 3 to detect, and simultaneously, the processor 5 also controls the movement mechanism 6 to perform a preset track movement so as to perform color detection on a plurality of areas of the billiard ball.
Fig. 6 is a diagram of a recognition path of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention. The billiard ball C is divided into full color and half color, and to finish the color recognition of the billiard ball C, the color data of multiple points on the sphere are needed, namely, the sensor 3 needs to collect multiple points on the surface of the billiard ball C. For the position of the acquisition point, the invention provides a specific acquisition path according to the color distribution characteristic of the semi-color billiard ball C sphere, can avoid redundant acquisition points and improves the acquisition speed as much as possible. The invention is collected in a rolling way, and the motion track of the shell 1 is a rectangle, the length is 1/2 billiard circumference, and the width is 1/4 billiard circumference on the supporting plate 8. The wide-direction movement can quickly pass through, the long-direction movement can perform real-time timing sampling, and the medium-speed movement can be realized.
Fig. 7 is a flowchart of an embodiment one of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention, as shown in fig. 7, two pillars of a shell are used to press billiards to be closely attached to a light-blocking cover, then the sensor is used to collect colors in a region in the light-blocking cover, and finally the type of billiards is determined according to the color distribution characteristics.
In the specific embodiment shown in the figure, the billiard ball color recognition method based on the single color sensor comprises the following steps:
step 100: and (3) extruding billiards entering the shell by using two struts of the shell, so that the billiards cling to the light blocking cover. In the specific embodiment of the invention, after the billiards enter the shell, the processor controls the steering engine to squeeze the billiards to be clung to the light-blocking cover, so that external light is prevented from entering the light-blocking cover.
Step 102: and collecting the color distribution characteristics of the area of the billiard ball corresponding to the light blocking cover by using a sensor. In the specific embodiment of the invention, the billiards are closely attached to the light barrier, the processor controls the sensor to collect the color of the coverage area of the light barrier,
step 103: and determining the type of the billiard ball according to the color distribution characteristics. In the specific embodiment of the invention, the color of the billiard ball is finally determined by utilizing the sensor to collect the color of the billiard ball and then transmitting the collected color data to the processor by the sensor and analyzing the color data by the processor.
Referring to fig. 7, the steering engine presses the billiard ball on the light blocking cover to prevent external light from entering the light blocking cover, the sensor detects the color of the billiard ball area covered by the light blocking cover, then the detected color data is transmitted to the processor, and the type of billiard ball is determined through the analysis of the color distribution characteristics by the processor.
Fig. 8 is a flowchart of a second embodiment of a billiard pattern recognition method based on a single color sensor according to an embodiment of the present invention, as shown in fig. 8, in which a billiard region covered by a light blocking cover is irradiated by an LED lamp, so as to provide a light source for detection of the sensor.
In the embodiment shown in the figure, before step 102, the billiard cue color recognition method based on a single color sensor includes:
step 101: and irradiating the area of the billiard ball corresponding to the light blocking cover by using an LED lamp. In the specific embodiment of the invention, the detection process of the sensor actually needs a light source, and the light shielding cover shields the external light source, so that a light source is needed to be arranged inside the light shielding cover, and necessary factors are provided for the detection of the sensor.
Referring to fig. 8, the area to be detected on the surface of the billiard ball is covered with a light blocking cover to prevent external light from entering, considering that the influence of ambient light causes deviation in detection of the sensor. However, the detection of the sensor also requires light, so that an LED lamp is arranged in the light blocking cover to polish the surface of the billiard ball.
Fig. 9 is a flowchart of a third embodiment of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention, as shown in fig. 9, a movement mechanism drives a casing to move on a support plate according to a rectangular track, so that the sensor can collect multiple areas of a billiard ball.
In the embodiment shown in the figure, before step 102, the billiard cue color recognition method based on a single color sensor includes:
step 101': the shell is driven by the motion mechanism to move on the supporting plate according to a rectangular track, so that the billiard rolls on the supporting plate, and the sensor is enabled to collect a plurality of areas of the billiard. In the specific embodiment of the invention, the sensor moves on the supporting plate according to a rectangular track so as to make the sensor walk a path intersecting at 90 degrees on the surface of the billiard ball, thus the type of the billiard ball can be detected to the greatest extent, and the identification accuracy is improved.
Fig. 10 is a flowchart of a fourth embodiment of a billiard ball color recognition method based on a single color sensor according to an embodiment of the present invention, as shown in fig. 10, according to the type of billiard ball obtained after detection, a processor controls a movement mechanism to move to a predetermined position, and then controls a steering engine to release the billiard ball to the predetermined position.
In the specific embodiment shown in the figure, after step 103, the billiard cue color recognition method based on the single color sensor includes:
step 104: and moving the shell to a ball stacking position according to the type of the billiards. In the specific embodiment of the invention, the billiards with finished color collection are required to be classified according to the types of the billiards detected by the billiards, so that the post-detection processor controls the movement mechanism to move to a preset position according to the types of the billiards.
Step 105: and releasing the billiards to the ball stacking position through the steering engine. In the specific embodiment of the invention, after the billiards are moved to the preset positions, the controller controls the steering engine to loosen the billiards and release the billiards to the preset positions, so that the identification and classification of the billiards are completed.
In the embodiment of the invention, the ball gesture of the billiard ball C falling into the shell 1 is random, and the starting point and the direction of the rolling path are random. Now consider the critical situation shown in fig. 6, i.e. when the billiard ball C falls, the sensor 3 is tangential to the outer edge of the color wheel and moves in the direction of maximum contact with the color area. The route corresponding to this case is shown as route a from top left to bottom right in fig. 6. As shown in fig. 6, the diameter of the light shield 2 is 8mm, and the sensor 3 is positioned in the middle of the light shield 2, so that the line A is tangential to the outer edge of the color ring and the distance L1 is 4mm when the line A is tangential. The points on route a all appear "non-white" except for the numerical area, whereas routes within a large angular range rotated counterclockwise from route a also all appear "non-white". Since the movement trace of the shell 1 is a rectangle, the length is 1/2 billiard circumference and the width is 1/4 billiard circumference, the route B is a route A which rotates anticlockwise by 90 degrees, and the straight line distance L2 between the intersection point of the route B and the outer circle boundary of the color ring on the billiard ball C is 5.7mm and is larger than the radius 4mm of the light shield 2 by measurement as shown in figure 6. I.e. on route B there is a "white" acquisition point. A pair of mutually orthogonal routes for the limit case of fig. 6 is also satisfactory with respect to both "white" and "color" remainders, so that it is generic.
The foregoing is merely illustrative of the embodiments of this invention and any equivalent and equivalent changes and modifications can be made by those skilled in the art without departing from the spirit and principles of this invention.