Method and device for identifying pocket billiard markers based on multi-source data
Patent Information
- Application Number
- CN202611029514.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-10-30
AI Technical Summary
该方案侧重颜色分布识别,未针对台球入袋后在通道内高速通过的情形设置基于速度的采样时间参数,也未将编号图像特征、条纹边界特征和色标颜色强度特征进行加权融合,单点色标传感器难以在极短时间内同时获得颜色、条纹和编号信息
在本申请的实施例中,通过获取目标球在进入高速检测腔之前依次经过至少第一触发传感器和第二触发传感器的检测信号,依据所述检测信号确定目标球进入高速检测腔前的运动速度;依据所述运动速度和高速检测腔沿目标球运动方向的检测长度确定目标球在高速检测腔内的停留时间,并依据所述停留时间确定光源的脉冲持续时间,以及图像采集装置和色标传感器阵列的采样持续时间,其中,所述脉冲持续时间和所述采样持续时间均小于所述停留时间;在脉冲持续时间内通过光源照射目标球,在采样持续时间内通过图像采集装置采集目标球表面的多帧图像数据、以及通过色标传感器阵列采集目标球表面的多帧颜色强度数据,并从每帧图像数据中提取条纹特征数据和编号特征数据,从每帧颜色强度数据中提取颜色特征数据;分别从多帧的颜色特征数据、条纹特征数据和编号特征数据中得到目标颜色特征向量、目标条纹特征向量和目标编号特征向量,并将由目标颜色特征向量、目标条纹特征向量和目标编号特征向量组成的目标特征向量集合与每一候选球标识对应的预设标准特征向量集合进行匹配,将分别匹配后匹配分值最大的候选球标识确定为目标球标识。上述通过前置触发传感器获取目标球运动速度,并依据停留时间设定光源脉冲和采样持续时间,在高速检测腔内同步采集多帧图像数据和颜色强度数据,从图像数据和颜色强度数据中提取条纹、编号和颜色特征,并按多帧统计融合,与候选球标识的标准特征匹配后输出综合匹配分值,从而在目标球高速通过时实现快速、稳定、准确的标识判定,有效克服单一图像或单一颜色传感器在运动模糊、反光、遮挡及编号识别置信度不足时的误判问题,并无需改造球体或截停球体,能对入袋后的台球标识实现快速识别,并为后续计分、分拣、球路记录或其他控制动作提供可靠输入。
Smart Images

Figure CN123015932A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent inspection equipment and intelligent sensor technology in high-end equipment manufacturing, specifically to a method and device for identifying pocketed billiard ball markings based on multi-source data. Background Technology
[0002] In the field of automatic ball recognition technology after a billiard ball is pocketed, there are already solutions that can identify the target and shape features of the billiard ball through image recognition. The advantage of this type of solution is that it is non-contact and can acquire more visual information. However, its recognition usually relies on computational processes such as image acquisition, target detection, image segmentation, model inference, or template recognition. In scenarios where the ball passes through the channel at high speed after being pocketed, it is easily affected by motion blur, occlusion, reflection, changes in rotation posture, and computational delay, which is not conducive to quickly outputting reliable identification during the "scanning" process of the ball. Another type of solution uses a color mark sensor or a single color sensor to identify the color of the billiard ball. For example, CN108096820B discloses a billiard ball pattern recognition device and method based on a single color sensor. It collects the color distribution characteristics of the billiard ball collection area through a light shield, sensor, light-emitting element, and processor, and can obtain color data of different collection areas by rolling the billiard ball through a motion mechanism. This solution focuses on color distribution recognition but doesn't address the scenario where the billiard ball passes through the channel at high speed after being pocketed. It also fails to weight and fuse the image features of the number, stripe boundary features, and color intensity features of the color mark. A single-point color mark sensor struggles to simultaneously acquire color, stripe, and number information within a very short time. Another solution uses RFID or other pre-embedded tags to identify the billiard ball, requiring modification of the ball itself and the deployment of reading and writing equipment, increasing both ball manufacturing and system deployment costs, making it unsuitable for ordinary unlabeled billiard balls. None of the above solutions can achieve rapid and accurate ball identification in scenarios where the billiard ball passes through the channel at high speed after being pocketed. There is an urgent need for a method that can quickly output the target ball's identifier within a limited timeframe without altering the ball's structure. Summary of the Invention
[0003] In view of the aforementioned problems, this application is proposed to provide a method and apparatus for identifying pocketed billiard ball markers based on multi-source data to overcome or at least partially solve the aforementioned problems, comprising: A method for identifying pocketed billiard ball markers based on multi-source data includes: The detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence are obtained, and the velocity of the target ball before entering the high-speed detection cavity is determined based on the detection signals. The dwell time of the target ball in the high-speed detection cavity is determined based on the motion speed and the detection length of the high-speed detection cavity along the motion direction of the target ball. The pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array are determined based on the dwell time. The pulse duration and the sampling duration are both less than the dwell time. During the pulse duration, the target sphere is illuminated by a light source. During the sampling duration, multiple frames of image data of the target sphere surface are acquired by an image acquisition device, and multiple frames of color intensity data of the target sphere surface are acquired by a color mark sensor array. Stripe feature data and number feature data are extracted from each frame of image data, and color feature data is extracted from each frame of color intensity data. The target color feature vector, target stripe feature vector, and target number feature vector are obtained from the color feature data, stripe feature data, and number feature data of multiple frames, respectively. The target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector is matched with the preset standard feature vector set corresponding to each candidate ball identifier. The candidate ball identifier with the highest matching score after matching is determined as the target ball identifier.
[0004] Preferably, determining the velocity of the target ball before it enters the high-speed detection cavity based on the detection signal includes: Based on the recorded detection signals, the first time node of the target ball passing through the first trigger sensor and the second time node of the second trigger sensor are determined. The velocity of the target ball before entering the high-speed detection cavity is determined based on the first time node, the second time node, and the distance between the first trigger sensor and the second trigger sensor.
[0005] Preferably, determining the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time includes: The duration coefficient is determined based on the dwell time, where all duration coefficients are greater than 0 and less than 1. The pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array are determined based on the duration coefficient and the dwell time.
[0006] Preferably, color feature data is extracted from the color intensity data of each frame, including: The color intensity data obtained by the color mark sensor array at multiple sampling points is converted into HSV color space data, and the color of each sampling point is classified according to the hue, saturation and brightness in the HSV color space data; the proportion of each color category in the multiple sampling points is counted to obtain the color feature data of each frame.
[0007] Preferably, stripe feature data and number feature data are extracted from each frame of image data, including: Edge detection is performed on each frame of image data to extract edge line segments within the contour of the target sphere image; When there are at least two edge segments, a local image coordinate system is constructed with the center of the target sphere image outline as the origin, and the tilt angle of each edge segment in the local image coordinate system is determined. Each edge segment is combined in pairs, and edge segment groups with a tilt angle difference less than or equal to a preset angle threshold are selected as candidate groups for parallel boundary lines. Calculate the edge spacing between two edge segments in each candidate group of parallel boundary lines, and determine the candidate groups of parallel boundary lines whose edge spacing is within the preset spacing range as stripe feature data.
[0008] Preferably, extracting stripe feature data and number feature data from each frame of image data further includes: Each frame of image data is segmented using a preset digital background color based on a color threshold to obtain multiple connected regions; Calculate the area of each connected region and identify connected regions whose area meets a preset area threshold as digital candidate regions. Based on the position of the digital candidate region in the current frame image data, and based on the pre-calibrated spatial mapping relationship between the image field of view and the sampling points of the color mark sensor array, the target sampling point in the color mark sensor array corresponding to the digital candidate region is determined; The background color verification result of the digital candidate region is determined based on the color intensity data corresponding to the target sampling point and the current frame image data. When the background color verification result meets the preset background color conditions, the candidate region image corresponding to the digital candidate region is extracted from the image data. The candidate region image is compared with a preset digital template library for correlation, and the digital symbol and correlation score corresponding to the digital template with the highest correlation are determined as the number feature data.
[0009] Preferably, the target color feature vector, target stripe feature vector, and target number feature vector are obtained from multiple frames of color feature data, stripe feature data, and number feature data, respectively. The target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector is then matched with a preset standard feature vector set corresponding to each candidate ball identifier. The candidate ball identifier with the highest matching score after each matching is determined as the target ball identifier, including: The proportion of each color category in multi-frame color feature data is statistically analyzed to obtain the target color feature vector; The presence of stripes in multi-frame stripe feature data is statistically analyzed, and the spacing between stripe boundaries is averaged to obtain the target stripe feature vector. For multi-frame numbering feature data, accumulate correlation scores according to the numerical symbols, and determine the numerical symbol with the largest accumulated correlation score and its accumulated correlation score as the target numbering feature vector; The target color feature vector, the target stripe feature vector, and the target number feature vector are combined to form a target feature vector set; The target feature vector set is matched with the preset standard feature vector set corresponding to each candidate ball identifier to obtain the color matching score, stripe matching score and number matching score corresponding to each candidate ball identifier; The color matching score, stripe matching score, and number matching score are weighted and fused according to preset weights to obtain the comprehensive matching score corresponding to each candidate ball identifier, and the candidate ball identifier with the largest comprehensive matching score is determined as the target ball identifier.
[0010] A device for identifying pocketed billiard ball markers based on multi-source data, comprising: The acquisition module is used to acquire the detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence before entering the high-speed detection cavity, and to determine the speed of the target ball before entering the high-speed detection cavity based on the detection signals. The calculation module is used to determine the dwell time of the target ball in the high-speed detection cavity based on the motion speed and the detection length of the high-speed detection cavity along the motion direction of the target ball, and to determine the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time; The extraction module is used to illuminate the target ball with a light source during the pulse duration, acquire multiple frames of image data of the target ball surface through an image acquisition device during the sampling duration, and acquire multiple frames of color intensity data of the target ball surface through a color mark sensor array, and extract stripe feature data and number feature data from each frame of image data, and extract color feature data from each frame of color intensity data; The fusion module is used to obtain the target color feature vector, target stripe feature vector, and target number feature vector from the color feature data, stripe feature data, and number feature data of multiple frames, respectively. The target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector is matched with the preset standard feature vector set corresponding to each candidate ball identifier. The candidate ball identifier with the highest matching score after matching is determined as the target ball identifier.
[0011] A computer electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for identifying pocketed billiard ball identifiers based on multi-source data as described above.
[0012] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method for identifying pocketed billiard ball identifiers based on multi-source data as described above.
[0013] This application has the following advantages: In the embodiments of this application, by acquiring the detection signals of the target ball passing through at least a first trigger sensor and a second trigger sensor sequentially before entering the high-speed detection cavity, the movement speed of the target ball before entering the high-speed detection cavity is determined based on the detection signals; the dwell time of the target ball in the high-speed detection cavity is determined based on the movement speed and the detection length of the high-speed detection cavity along the movement direction of the target ball; and the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array are determined based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time; the target ball is illuminated by the light source during the pulse duration, and the target ball is illuminated by the image acquisition device during the sampling duration. Multiple frames of image data of the target sphere's surface are collected, as well as multiple frames of color intensity data of the target sphere's surface are collected through a color mark sensor array. Stripe feature data and number feature data are extracted from each frame of image data, and color feature data is extracted from each frame of color intensity data. Target color feature vector, target stripe feature vector, and target number feature vector are obtained from the multiple frames of color feature data, stripe feature data, and number feature data, respectively. The target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector is matched with the preset standard feature vector set corresponding to each candidate sphere identifier. The candidate sphere identifier with the highest matching score after matching is determined as the target sphere identifier. The aforementioned method acquires the target ball's speed via a pre-triggered sensor and sets the light source pulse and sampling duration based on the dwell time. Simultaneously, multiple frames of image data and color intensity data are acquired within the high-speed detection chamber. Stripes, numbers, and color features are extracted from the image and color intensity data, and statistically fused across multiple frames. A comprehensive matching score is output after matching the standard features of the candidate ball's identifier. This enables rapid, stable, and accurate identification of the ball as it passes at high speed, effectively overcoming the misjudgment problems caused by motion blur, reflection, occlusion, and insufficient confidence in number recognition when using a single image or color sensor. Furthermore, it eliminates the need to modify or stop the ball, enabling rapid identification of billiard ball identifiers after they have been pocketed, and providing reliable input for subsequent scoring, sorting, ball path recording, or other control actions. Attached Figure Description
[0014] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating the steps of a method for identifying pocketed billiard ball identifiers based on multi-source data, according to an embodiment of this application. Figure 2 This is a structural block diagram of a device for identifying pocketed billiard ball markers based on multi-source data, according to an embodiment of this application. Figure 3 This is a schematic diagram of the structure of a computer electronic device provided in an embodiment of the present invention; 1. Computer electronic device; 2. External device; 3. Processing unit; 4. Bus; 5. Network adapter; 6. I / O interface; 7. Display; 8. Memory; 9. Random access memory; 10. Cache memory; 11. Storage system; 12. Program / utility; 13. Program module. Detailed Implementation
[0016] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0017] It should be noted that, in any embodiment of the present invention, the billiard table is typically provided with six pockets, each of which is connected to a billiard ball collection chamber. In this embodiment, a first ball guiding channel, a high-speed detection chamber, and a second ball guiding channel are provided between the pockets and the billiard ball collection chamber. The pockets are connected to the high-speed detection chamber through the first ball guiding channel, and the high-speed detection chamber is connected to the billiard ball collection chamber through the second ball guiding channel.
[0018] In order to intelligently and accurately identify the logo of a pocketed billiard ball, and then control the response of other devices by matching the corresponding rules according to the logo of the pocketed billiard ball, the present invention provides a method and apparatus for identifying the logo of a pocketed billiard ball based on multi-source data.
[0019] Reference Figure 1 The diagram illustrates a flowchart of a method for identifying pocketed billiard ball identifiers based on multi-source data, according to an embodiment of this application. The method includes: S110. Obtain the detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence before entering the high-speed detection cavity, and determine the speed of the target ball before entering the high-speed detection cavity based on the detection signals. S120. The dwell time of the target ball in the high-speed detection cavity is determined based on the motion speed and the detection length of the high-speed detection cavity along the motion direction of the target ball. The pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array are determined based on the dwell time. The pulse duration and the sampling duration are both less than the dwell time. S130. Illuminate the target ball with a light source during the pulse duration, acquire multiple frames of image data of the target ball surface through an image acquisition device during the sampling duration, and acquire multiple frames of color intensity data of the target ball surface through a color mark sensor array, and extract stripe feature data and number feature data from each frame of image data, and extract color feature data from each frame of color intensity data. S140. Obtain the target color feature vector, target stripe feature vector, and target number feature vector from the color feature data, stripe feature data, and number feature data of multiple frames respectively. Match the target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector with the preset standard feature vector set corresponding to each candidate ball identifier. Determine the candidate ball identifier with the largest matching score after matching as the target ball identifier.
[0020] In the embodiments of this application, by acquiring the detection signals of the target ball passing through at least a first trigger sensor and a second trigger sensor sequentially before entering the high-speed detection cavity, the movement speed of the target ball before entering the high-speed detection cavity is determined based on the detection signals; the dwell time of the target ball in the high-speed detection cavity is determined based on the movement speed and the detection length of the high-speed detection cavity along the movement direction of the target ball; and the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array are determined based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time; the target ball is illuminated by the light source during the pulse duration, and the target ball is illuminated by the image acquisition device during the sampling duration. Multiple frames of image data of the target sphere's surface are collected, as well as multiple frames of color intensity data of the target sphere's surface are collected through a color mark sensor array. Stripe feature data and number feature data are extracted from each frame of image data, and color feature data is extracted from each frame of color intensity data. Target color feature vector, target stripe feature vector, and target number feature vector are obtained from the multiple frames of color feature data, stripe feature data, and number feature data, respectively. The target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector is matched with the preset standard feature vector set corresponding to each candidate sphere identifier. The candidate sphere identifier with the highest matching score after matching is determined as the target sphere identifier. The aforementioned method acquires the target ball's speed via a pre-triggered sensor and sets the light source pulse and sampling duration based on the dwell time. Simultaneously, multiple frames of image data and color intensity data are acquired within the high-speed detection chamber. Stripes, numbers, and color features are extracted from the image and color intensity data, and statistically fused across multiple frames. A comprehensive matching score is output after matching the standard features of the candidate ball's identifier. This enables rapid, stable, and accurate identification of the ball as it passes at high speed, effectively overcoming the misjudgment problems caused by motion blur, reflection, occlusion, and insufficient confidence in number recognition when using a single image or color sensor. Furthermore, it eliminates the need to modify or stop the ball, enabling rapid identification of billiard ball identifiers after they have been pocketed, and providing reliable input for subsequent scoring, sorting, ball path recording, or other control actions.
[0021] The method for identifying pocketed billiard ball identifiers based on multi-source data in this exemplary embodiment will be further described below.
[0022] In one embodiment of the present invention, the specific process of step S110, "obtaining the detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence before entering the high-speed detection cavity, and determining the speed of the target ball before entering the high-speed detection cavity based on the detection signals," can be further explained in conjunction with the following description.
[0023] In this embodiment, determining the velocity of the target ball before it enters the high-speed detection cavity based on the detection signal includes: Based on the recorded detection signals, the first time node of the target ball passing through the first trigger sensor and the second time node of the second trigger sensor are determined. The velocity of the target ball before entering the high-speed detection cavity is determined based on the first time node, the second time node, and the distance between the first trigger sensor and the second trigger sensor.
[0024] In one specific implementation, at least a first trigger sensor and a second trigger sensor are arranged in the first ball guide channel. The trigger sensors can be infrared sensors; the specific configuration is not detailed here. The first time points when the target ball passes through and triggers the trigger are recorded. Second time node Given that the distance between the two sensors is L, the expression for the velocity v of the target ball is:
[0025] It should be noted that in this embodiment, the first ball guide channel and the high-speed detection cavity actually belong to the same constraint path. The width and guidance of the first ball guide channel can ensure that the ball moves along the expected trajectory, and the friction or resistance on the surface of the first ball guide channel is stable. The entrance of the high-speed detection cavity is continuous with the first ball guide channel without severe obstruction or sudden turning, thereby ensuring that the motion speed of the target ball measured in the first ball guide channel is consistent with or similar to the motion speed entering the high-speed detection cavity.
[0026] In one embodiment of the present invention, the specific process of step S120, which involves "determining the dwell time of the target ball in the high-speed detection cavity based on the motion speed and the detection length of the high-speed detection cavity along the direction of the target ball's motion, and determining the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time", can be further explained in conjunction with the following description.
[0027] In this embodiment, determining the dwell time of the target ball within the high-speed detection cavity based on the motion speed and the detection length of the high-speed detection cavity along the direction of the target ball's motion includes: The dwell time is determined based on the movement speed and the length of the high-speed detection cavity.
[0028] The expression for the dwell time is:
[0029] in, The length of the high-speed detection cavity, This refers to the length of stay.
[0030] The dwell time of the target ball in the acquisition area of the high-speed detection cavity can be approximately estimated by using the length and speed of the high-speed detection cavity. For example, if the length of the high-speed detection cavity is 10cm and the speed of the target ball is 2m / s, the dwell time can be calculated to be 0.05s by the formula, which can be used to determine the duration of subsequent sampling and pulse duration.
[0031] The aforementioned dwell time refers to the time required for the target ball to move from entering to leaving the high-speed detection cavity, including the entry time node, the exit time node, and the intermediate dwell time. The time nodes can be calculated by combining the first or second time node with the distance from the trigger sensor to the high-speed detection cavity and the movement speed. To ensure the reliability of the acquisition process, both the pulse duration and the sampling duration are designed to be less than the dwell time, thereby avoiding the problem of some information not being collected during the ball's movement.
[0032] In this embodiment, determining the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time includes: The duration coefficient is determined based on the dwell time, where all duration coefficients are greater than 0 and less than 1. The pulse duration of the light source, as well as the sampling duration of the image acquisition device and the color mark sensor array, are determined based on the duration coefficient and the dwell time; the expression is as follows: , ,
[0033] in, The duration of the pulse. The sampling duration of the image acquisition device. The sampling duration of the color mark sensor array is equal to the dwell time. Multiply by a corresponding duration coefficient , , , .
[0034] In the above embodiments, short-pulse high-brightness LEDs or pulsed lasers are used as the light source, and the pulse duration is controlled. Ensure that the illumination time is much shorter than the dwell time. The target sphere moves very little under illumination. By freezing the position of the high-speed moving sphere with short-term illumination, motion blur is reduced, the synchronization of multi-source data in image acquisition and color mark acquisition is improved, and recognition accuracy is further improved.
[0035] In practice, due to factors such as varying lengths and movement speeds of the high-speed detection cavity, the dwell time of the target ball varies each time it enters the bag. Since the pulse duration of the light source, the sampling time of the image acquisition device, and the color mark sensor array all need to be synchronized with the movement of the target ball within the high-speed detection cavity, corresponding duration coefficients can be matched for different dwell times. This ensures that multi-source data acquisition fully covers the movement time of the target ball within the high-speed detection cavity, avoiding motion blur and information loss caused by excessively short pulse light or acquisition time, and guaranteeing complete acquisition of color, stripes, or labels. It should be noted that the duration coefficient can be determined through the common experience or experiments of those skilled in the art. More preferably, it can be configured according to different target ball sizes, movement speeds, and high-speed detection cavity lengths. For example, the pulse duration and sampling duration can be configured to be between 0.4 and 0.9 times the target ball's dwell time, based on the actual dwell time.
[0036] Specifically, a velocity-parameter mapping table can be pre-established, storing the mapping relationships between multiple preset velocity ranges and their corresponding standard pulse durations and standard sampling durations. The standard pulse duration and standard sampling duration are pre-calculated and fixed based on experimentally determined duration coefficients and the dwell time within the corresponding velocity range. During target ball detection, after acquiring the target ball's velocity, a direct match is performed in the velocity-parameter mapping table using this velocity as an index. The corresponding standard pulse duration and standard sampling duration are read, and corresponding hardware control signals are generated and sent to the light source and image acquisition device. Since the lookup process is a memory read operation, its response time is in the microsecond or even nanosecond range, ensuring that parameter configuration is completed within the extremely short gap before the target ball enters the high-speed detection cavity, achieving precise synchronization of light source pulses, image acquisition, and color mark acquisition.
[0037] In one implementation, more preferably, the duration coefficient corresponding to the pulse duration is smaller than the duration coefficient corresponding to the acquisition duration, and the pulse duration covers the effective sampling window of the image acquisition device and the color mark sensor array. This is more conducive to freezing high-speed motion with short-term irradiation while ensuring acquisition coverage.
[0038] In terms of structural design, color mark sensors are typically arranged in an array inside the detection cavity or on its sidewalls, covering different surfaces that may appear when the sphere rotates, to acquire color information from multiple angles. Image acquisition devices (high-speed cameras or line-scan cameras) are generally positioned at the top or side, maintaining optical overlap or an adjacent field of view with the color mark sensor array, ensuring that the image data and color mark sensor data are synchronized when the same sphere passes through the detection cavity. The light source is positioned inside or above the detection cavity, and the direction of the light beam is controlled by lenses or reflectors to ensure uniform light coverage of the sphere's surface, guaranteeing that the high-speed moving target sphere can be fully captured at every moment without any blind spots.
[0039] In one embodiment of the present invention, the specific process of step S130, which involves illuminating the target sphere with a light source during the pulse duration, acquiring multiple frames of image data of the target sphere surface through an image acquisition device during the sampling duration, acquiring multiple frames of color intensity data of the target sphere surface through a color mark sensor array, extracting stripe feature data and number feature data from each frame of image data, and extracting color feature data from each frame of color intensity data, can be further explained in conjunction with the following description.
[0040] In this embodiment, the target sphere is first illuminated by a light source during a pulse duration, making the sphere optically visible during its high-speed motion. Simultaneously, image data and color intensity data of the sphere's surface are acquired by an image acquisition device and a color mark sensor array during a sampling duration. The image data consists of two-dimensional image frames acquired by a high-speed camera or a line scan camera, reflecting the sphere's surface numbering and stripes. The color intensity data consists of color information of various regions sampled by the color mark sensor array along multiple points on the sphere's surface, including RGB components or HSV parameters. Subsequently, the above data is processed to generate surface feature data of the target sphere, used to describe the sphere's color, stripes, and numbering.
[0041] In the feature extraction process, the image data is first preprocessed, including image denoising, brightness normalization, and local contrast enhancement to ensure the clarity of images acquired under high-speed motion. Then, the sphere's outline and stripe regions are determined through image segmentation or edge detection. Combined with color intensity data, each stripe region is matched with its corresponding color value to obtain the color and positional features of the stripes. Numbering labels can be obtained through template matching or digit region recognition, such as identifying the numbers 1 to 15 on a billiard ball and the white area of the cue ball. Finally, the feature data generated by combining image data and color intensity data can be used as input for subsequent fusion judgment and label recognition.
[0042] In the process of acquiring color feature data, color feature data is extracted from the color intensity data of each frame, including: The color intensity data obtained by the color mark sensor array at multiple sampling points is converted into HSV color space data, and the color of each sampling point is classified according to the hue, saturation and brightness in the HSV color space data; the proportion of each color category in the multiple sampling points is counted to obtain the color feature data of each frame.
[0043] A color mark sensor array is arranged around the detection cavity, collecting light reflection or transmission intensity along the surface of the sphere. Hue and brightness are separated via HSV conversion, making color judgment more robust. Threshold classification can distinguish the white area of the cue ball, the solid-color ball, and the different colored stripes of the striped balls. For example, HSV hue can be used to identify the colors of solid-color balls 1-7 and the corresponding striped balls 9-15; brightness distinguishes the white area of the cue ball and the black ball number 8.
[0044] Further explanation will be given using Chinese billiards as an example. Chinese billiards includes: a cue ball (white ball), solid-colored balls 1 to 7 (yellow, blue, red, purple, orange, green, and brown respectively), ball 8 (black), and striped balls 9 to 15, whose stripe colors correspond to the colors of balls 1–7. The goal is to obtain color intensity information by sampling along the surface of the balls using a color mark sensor array, and to generate color feature data for each ball. Specifically, the color mark sensor array is arranged near the path of the ball in the high-speed detection cavity, sampling the light reflection intensity from the ball surface at multiple points. The sampled data consists of RGB components: Where i is the sampling point index. Subsequently, the acquired RGB data is converted to the HSV color space to separate luminance and hue information, facilitating color classification of different spheres. The conversion formula is: , in, This refers to the hue angle, with a value range of 0-360°. For saturation, For brightness.
[0045] Next, the sampling points are classified according to hue and saturation to obtain the color category of each sampling point. : , In the process of acquiring stripe feature data, stripe feature data and number feature data are extracted from each frame of image data, including: Edge detection is performed on each frame of image data to extract edge line segments within the contour of the target sphere image; When there are at least two edge segments, a local image coordinate system is constructed with the center of the target sphere image outline as the origin, and the tilt angle of each edge segment in the local image coordinate system is determined. Each edge segment is combined in pairs, and edge segment groups with a tilt angle difference less than or equal to a preset angle threshold are selected as candidate groups for parallel boundary lines. Calculate the edge spacing between two edge segments in each candidate group of parallel boundary lines, and determine the candidate groups of parallel boundary lines whose edge spacing is within the preset spacing range as stripe feature data.
[0046] In this embodiment, continuing with the Chinese black eight as an example, the actual difference between a striped ball and other balls lies in the presence of stripes (boundaries) resembling "latitude lines." Distinguishing whether a ball is striped only requires identifying whether the target ball has two parallel stripes. In practice, edge segments are extracted through edge detection. Due to factors such as potential stains, deep scratches, and uneven lighting causing multiple alternating bright and dark lines, multiple edge segments may be extracted. Furthermore, the high-speed rotation of the ball can cause fluctuations in edge pixel positions during image acquisition, resulting in multiple segments for a single line. To simplify the calculation process, this embodiment only considers whether two line segments satisfy a preset spacing threshold. If they do, the target ball is considered a striped ball. By using a preset angle threshold and a preset spacing range for double screening of edge segments, the possibility of non-striped line segments formed by stains, scratches, or reflective edges being identified as striped feature data can be reduced.
[0047] Specifically, the acquired image data undergoes preprocessing, including noise reduction, brightness normalization, and contrast enhancement, to improve the recognizability of the stripes. Then, an edge detection algorithm such as Canny is used to extract all obvious edge segments and the sphere's surface contour. Next, a local image coordinate system is constructed with the center of the sphere's surface contour as the origin. Using the coordinates of each point on the edge segment in this local coordinate system, the tilt angle of each segment is quickly calculated. These segments are then paired with other segments, and two segments with similar tilt angles (i.e., meeting a preset difference threshold, such as -5° to 5°) are selected as candidate parallel boundary lines. Since the spacing between the two stripes on the striped sphere is constant, the spacing between each group of segments can be calculated. The edge spacing d can be expressed as:
[0048] in, and These represent the positions of the first and second line segments projected onto the vertical direction by the pixels in the k-th column, respectively, where N is the total number of image columns or sampling points. This formula obtains the average spacing between the two boundary lines on the sphere image by averaging the differences in the ordinates of each column of pixels.
[0049] The process of acquiring the numbering feature data includes extracting stripe feature data and numbering feature data from each frame of image data, and also includes: Each frame of image data is segmented using a preset digital background color based on a color threshold to obtain multiple connected regions; Calculate the area of each connected region and identify connected regions whose area meets a preset area threshold as digital candidate regions. Based on the position of the digital candidate region in the current frame image data, and based on the pre-calibrated spatial mapping relationship between the image field of view and the sampling points of the color mark sensor array, the target sampling point in the color mark sensor array corresponding to the digital candidate region is determined; The background color verification result of the digital candidate region is determined based on the color intensity data corresponding to the target sampling point and the current frame image data. When the background color verification result meets the preset background color conditions, the candidate region image corresponding to the digital candidate region is extracted from the image data. The candidate region image is compared with a preset digital template library for correlation, and the digital symbol and correlation score corresponding to the digital template with the highest correlation are determined as the number feature data.
[0050] In this embodiment, the extraction of numbered feature data uses image data as the source of candidate region images and color intensity data as the basis for verifying the background color of the candidate regions. Specifically, after the image acquisition device acquires multiple frames of image data of the target ball surface during the sampling duration, it first performs color threshold segmentation on each frame of image data. The preset digital background color can be the background color of the area where the numbers of the Chinese billiard ball are located, such as white or a light-colored background. After obtaining multiple connected regions through color threshold segmentation, the area of each connected region is calculated, and connected regions with an area smaller than the preset area threshold are removed to reduce small-area interference areas formed by reflective points, stains, scratches, or noise. The area can be expressed as:
[0051] in, Let i be the set of pixels in the i-th connected region. These are the pixel coordinates within the connected region. Let be the number of pixels in the i-th connected region. If so, then the connected region is considered as a candidate region for numbers. This is a preset area threshold.
[0052] After obtaining the digital candidate regions, the corresponding sampling positions of the color mark sensor array are determined based on their positions in the image coordinate system. Since the image acquisition device and the color mark sensor array are located within the high-speed detection cavity, and their acquisition times are constrained by the same sampling duration, the digital candidate regions in the image data can be mapped to one or more target sampling points of the color mark sensor array through a pre-defined spatial mapping relationship. This spatial mapping relationship can be pre-determined based on the detection cavity structure dimensions, the image field of view, and the installation position of the color mark sensor array.
[0053] Subsequently, the background color of the candidate digital region is verified based on the color intensity data of the target sampling points. Specifically, the color intensity data of the target sampling points is converted to the HSV color space, and it is determined whether its hue, saturation, and brightness meet the preset background color conditions. For example, if the background of the digital region is white, the background color condition can be set to a saturation less than a preset saturation threshold and a brightness greater than a preset brightness threshold. If the target sampling point meets the background color conditions, the candidate digital region is determined to have passed the background color verification; otherwise, the candidate digital region is eliminated.
[0054] After background color verification, a candidate region image corresponding to the candidate digit region is extracted from the original image data. The candidate region image contains shape information of the digit symbol, which can be used for subsequent template matching. The candidate region image is compared with each digit template in the preset digit template library to obtain the correlation score between the candidate region image and each digit template. The digit symbol corresponding to the digit template with the highest correlation is used as the identification number, and the highest correlation score is used as the similarity feature in the number feature data.
[0055] In one embodiment of the present invention, the specific process of step S140, which involves obtaining the target color feature vector, target stripe feature vector, and target number feature vector from multiple frames of color feature data, stripe feature data, and number feature data respectively, and matching the target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector with the preset standard feature vector set corresponding to each candidate ball identifier, and determining the candidate ball identifier with the largest matching score after matching as the target ball identifier, can be further explained in conjunction with the following description.
[0056] In this embodiment, since the target sphere is in motion within the high-speed detection cavity, the image acquisition device and the color mark sensor array acquire multiple frames of data during the sampling period. The color feature data, stripe feature data, and number feature data in different frames may differ due to sphere rotation, light reflection, partial occlusion, or image blurring. To avoid misjudgment caused by single-frame data, this embodiment performs statistical processing on the color feature data, stripe feature data, and number feature data from multiple frames, and matches the statistically processed target feature vector set with a preset standard feature vector set of candidate sphere identifiers.
[0057] The process involves obtaining target color feature vectors, target stripe feature vectors, and target number feature vectors from multiple frames of color feature data, stripe feature data, and number feature data, respectively. Then, the target feature vector set, composed of the target color feature vector, target stripe feature vector, and target number feature vector, is matched against a preset standard feature vector set corresponding to each candidate ball identifier. The candidate ball identifier with the highest matching score after each matching is determined as the target ball identifier. This includes: The proportion of each color category in multi-frame color feature data is statistically analyzed to obtain the target color feature vector; The presence of stripes in multi-frame stripe feature data is statistically analyzed, and the spacing between stripe boundaries is averaged to obtain the target stripe feature vector. For multi-frame numbering feature data, accumulate correlation scores according to the numerical symbols, and determine the numerical symbol with the largest accumulated correlation score and its accumulated correlation score as the target numbering feature vector; The target color feature vector, the target stripe feature vector, and the target number feature vector are combined to form a target feature vector set; The target feature vector set is matched with the preset standard feature vector set corresponding to each candidate ball identifier to obtain the color matching score, stripe matching score and number matching score corresponding to each candidate ball identifier; The color matching score, stripe matching score, and number matching score are weighted and fused according to preset weights to obtain the comprehensive matching score corresponding to each candidate ball identifier, and the candidate ball identifier with the largest comprehensive matching score is determined as the target ball identifier.
[0058] In this embodiment, when performing statistical processing on the color feature data, each frame of color feature data can be represented as a color feature vector. The color feature vector of the k-th frame is represented as:
[0059] in, This represents the color feature vector of the k-th frame. This represents the percentage of the i-th color category among the sampling points on the target ball's surface in the k-th frame, where n represents the number of color categories. Color categories can include white, yellow, blue, red, purple, orange, green, brown, and black, which correspond to the colors in Chinese billiards.
[0060] The target color feature vector is obtained by averaging the proportions of the same color category in the color feature vectors of N frames:
[0061] in,
[0062] in, Represents the target color feature vector. This represents the average color percentage of the i-th color category in N frames of color feature data, where N represents the number of sampling frames. The calculation process is as follows: for the same color category, sum the color percentages of that color category in N frames and divide by the number of frames N to obtain the average percentage of that color category on the surface of the target sphere. This processing can reduce errors caused by reflections, stains, or changes in sampling angle in single-frame color data.
[0063] In this embodiment, when performing statistical processing on the stripe feature data, each frame of stripe feature data can be represented as a stripe feature vector. The stripe feature vector of the k-th frame is represented as:
[0064] in, This represents the stripe feature vector of the k-th frame. This indicates whether two parallel boundary lines satisfying preset angle thresholds and preset spacing thresholds are detected in the k-th frame; when these two parallel boundary lines are detected in the k-th frame, =1, otherwise =0. This represents the edge spacing between two parallel boundary lines in the k-th frame. =0, then It is 0.
[0065] By statistically analyzing the presence markers of stripes in N frames, the presence markers of the target stripes are obtained:
[0066] in, The formula indicates the presence of stripes, where M represents a preset frame count threshold. This means that in N frames of data, if the number of frames in which stripe boundaries are detected reaches the preset frame count threshold M, then the target sphere is determined to have stripe characteristics; if the number of frames in which stripe boundaries are detected does not reach the preset frame count threshold M, then the target sphere is determined not to have stripe characteristics. This processing method avoids misclassifying a panchromatic sphere as a striped sphere solely due to noise edges, reflective edges, or scratch edges in a single frame.
[0067] when When =1, the edge spacing in the frames where stripe boundaries are detected is averaged to obtain the target edge spacing:
[0068] in, This represents the target edge spacing. In this formula, only when... When =1, the edge spacing of the k-th frame Only then does it have computational significance. When = 0, this frame does not participate in the edge spacing averaging. Thus, the target stripe feature vector is obtained:
[0069] in, This represents the feature vector of the target stripe.
[0070] In this embodiment, when performing statistical processing on the numbering feature data, each frame of numbering feature data can be represented as a numbering feature vector. The numbering feature vector of the k-th frame is represented as:
[0071] in, This represents the feature vector of the k-th frame number. This represents the numerical symbol obtained by template matching in the k-th frame. This represents the relevance score or similarity corresponding to the numerical symbol. It should be noted that numerical symbols belong to discrete category data, and an arithmetic average cannot be performed on numerical symbols from different frames. Therefore, this embodiment accumulates the relevance score for each numerical symbol separately to determine the target number feature vector.
[0072] Assuming the candidate number symbol is r, the cumulative relevance score of the candidate number symbol r is expressed as:
[0073] in, This represents the cumulative correlation score of the candidate digit symbol r in the N frame numbering feature data. For the indicator function, when the digital symbol is recognized in the k-th frame When equal to the candidate number symbol r, ,otherwise =0. In other words, only frames whose identification result is the candidate digit symbol r will have their relevance scores accumulated.
[0074] The candidate number with the highest cumulative correlation score is selected as the target number.
[0075] in, State the target number. This indicates that the cumulative correlation score is... The largest candidate digit symbol r.
[0076] Simultaneously, the maximum cumulative relevance score is determined as the similarity to the target ID:
[0077] in, Indicates the similarity of target IDs. This represents the maximum cumulative correlation score among all candidate digit symbols. This yields the target number feature vector:
[0078] in, This represents the target number feature vector. Using the above method, the number feature is not averaged across the numerical symbols, but rather the relevance scores corresponding to the same numerical symbols are accumulated. For example, if the recognition results of three frames are 9, 9, and 10, with corresponding relevance scores of 0.92, 0.88, and 0.61 respectively, then the cumulative relevance score for the number 9 is 1.80, and the cumulative relevance score for the number 10 is 0.61. Therefore, the target number is 9, and the target number similarity is 1.80.
[0079] Furthermore, after obtaining the target color feature vector, target stripe feature vector, and target number feature vector, these three are combined into a target feature vector set:
[0080] in, This represents the set of target feature vectors.
[0081] When performing weighted ball fusion, first establish a set of candidate ball identifiers. For example, in Chinese billiards, the candidate ball identifier set can be established as follows:
[0082] Where L represents the set of candidate ball identifiers. Each candidate ball identifier corresponds to a predefined set of standard feature vectors:
[0083] Where 'l' represents the candidate ball identifier. This represents the set of preset standard feature vectors corresponding to the candidate ball identifier l. These correspond to the preset color feature vector, preset stripe feature vector, and preset number feature vector of the candidate ball identifier l, respectively.
[0084] Next, the feature vectors of the target ball are matched with the preset feature vectors corresponding to each candidate ball identifier according to the category, so as to obtain the matching scores of color, stripes and number.
[0085] In one implementation, the preset color feature vector corresponding to the candidate ball identifier l is represented as:
[0086] in, This represents the percentage of the i-th color standard corresponding to candidate ball identifier l. The color matching score is expressed as:
[0087] in, This represents the color matching score corresponding to the candidate ball identifier l. The calculation process of this formula is as follows: first calculate the average proportion of the i-th color class in the target color feature vector. The absolute value of the difference between the target ball and the candidate ball identifier l is calculated by summing the absolute values of the differences across all color categories. Since the color proportion vector has been normalized, this difference value can be converted to a normalized difference by multiplying it by one-half. Subtracting this normalized difference from 1 yields the color matching score. The closer the colors are, the better the color matching score. The closer it is to 1.
[0088] In one embodiment, the preset stripe feature vector corresponding to the candidate ball identifier l can be represented as:
[0089] in, This indicates the presence of a standard stripe corresponding to the candidate ball identifier 'l'. For striped balls, =1; For solid colored balls, ball number 8, and white ball... =0. This indicates the standard stripe boundary spacing corresponding to the candidate sphere identifier l; for non-striped spheres, It can be set to 0.
[0090] In one embodiment, the stripe matching score is expressed as:
[0091] in, This represents the stripe matching score corresponding to the candidate ball identifier l. This indicates the preset range of stripe boundary spacing. The calculation process of this formula is as follows: if the target sphere is counted as having stripes, the candidate sphere identifier l also belongs to the striped sphere, and the target edge spacing... If the target sphere is within the preset stripe boundary spacing range, the stripe matching score is 1; if the target sphere is counted as having no stripes and the candidate sphere identifier l is also a non-striped sphere, the stripe matching score is 1; otherwise, the stripe matching score is 0.
[0092] In one implementation, the preset number feature vector corresponding to the candidate ball identifier l can be represented as:
[0093] in, This represents the standard number corresponding to the candidate ball identifier 'l'. For unnumbered targets such as the white ball, their standard number can be set to the unnumbered identifier. The resulting number matching score is expressed as:
[0094] in, This represents the matching score for the candidate ball identifier l. The calculation process of this formula is as follows: if the target number... Standard number corresponding to candidate ball identifier l Then the similarity of the target number will be... The score is used to match the number; if the two do not match, the score is 0.
[0095] In summary, after obtaining the color matching score, stripe matching score, and number matching score corresponding to the candidate ball identifier l, a weighted fusion is performed according to preset weights to obtain the comprehensive matching score corresponding to the candidate ball identifier l:
[0096] in, This represents the overall matching score corresponding to candidate ball identifier l. , and These represent color weight, stripe weight, and number weight, respectively. .
[0097] Finally, the candidate label with the highest overall matching score is output as the target ball identifier:
[0098] in, This represents the final identified target ball identifier. From the candidate ball identifier set L, the one that maximizes the overall matching score is selected. The largest candidate ball identifier is used as the target ball identifier.
[0099] It should be noted that, through the above fusion process, the color features, stripe features, and number features are not simply added together. Instead, they are first matched with the preset standard features corresponding to the candidate ball identifiers to obtain color matching scores, stripe matching scores, and number matching scores. Then, they are weighted and fused according to preset weights. This can reduce the impact of single-frame image blur, local reflection, or short-term occlusion on the recognition results by utilizing multi-frame data.
[0100] Once the target ball is identified, automatic scoring, automatic sorting, ball path statistics, or subsequent control can be performed based on the target ball's identification, which will not be elaborated here.
[0101] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0102] Reference Figure 2 The diagram shows a structural block diagram of a device for identifying pocketed billiard ball identifiers based on multi-source data according to an embodiment of this application, specifically including the following modules: The acquisition module 110 is used to acquire the detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence before entering the high-speed detection cavity, and to determine the speed of the target ball before entering the high-speed detection cavity based on the detection signals. The calculation module 120 is used to determine the dwell time of the target ball in the high-speed detection cavity based on the motion speed and the detection length of the high-speed detection cavity along the motion direction of the target ball, and to determine the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time; The extraction module 130 is used to illuminate the target ball with a light source during the pulse duration, acquire multiple frames of image data of the target ball surface through an image acquisition device during the sampling duration, and acquire multiple frames of color intensity data of the target ball surface through a color mark sensor array, and extract stripe feature data and number feature data from each frame of image data, and extract color feature data from each frame of color intensity data. The fusion module 140 is used to obtain the target color feature vector, target stripe feature vector, and target number feature vector from the color feature data, stripe feature data, and number feature data of multiple frames, respectively, and to match the target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector with the preset standard feature vector set corresponding to each candidate ball identifier, and to determine the candidate ball identifier with the largest matching score after matching as the target ball identifier.
[0103] Reference Figure 3 The illustration shows a computer electronic device for implementing a method for identifying pocketed billiard markers based on multi-source data, which may specifically include the following: The aforementioned computer electronic device 1 is manifested in the form of a general-purpose computing device. The components of the computer electronic device 1 may include, but are not limited to: one or more processors or processing units 3, memory 8, and a bus 4 connecting different system components (including memory 8 and processing unit 3).
[0104] Bus 4 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Audio / Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0105] Computer electronic device 1 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer electronic device 1, including volatile and non-volatile media, removable and non-removable media.
[0106] Memory 8 may include computer system readable media in the form of volatile memory, such as random access memory 9 and / or cache memory 10. Computer electronic device 1 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Although Figure 3 As not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 4 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 13 configured to perform the functions of the embodiments of this application.
[0107] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in memory. Such program modules 13 include—but are not limited to—an operating system, one or more application programs, other program modules 13, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of this application.
[0108] The computer electronic device 1 can also communicate with one or more external devices 2 (e.g., keyboard, pointing device, display 7, camera, etc.), and with one or more devices that enable an operator to interact with the computer electronic device 1, and / or with any device that enables the computer electronic device 1 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through the I / O interface 6. Furthermore, the computer electronic device 1 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) through the network adapter 5. Figure 3 As shown, network adapter 5 communicates with other modules of computer electronic device 1 via bus 4. It should be understood that, although... Figure 3Not shown, it may be combined with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 3, external disk drive array, RAID system, tape drive and data backup storage system 11, etc.
[0109] The processing unit 3 executes various functional applications and data processing by running programs stored in memory 8, such as implementing a method for identifying pocketed billiard ball identifiers based on multi-source data provided in the embodiments of this application.
[0110] That is, when the processing unit 3 executes the above program, it achieves the following: acquiring the detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence before entering the high-speed detection cavity; determining the speed of the target ball before entering the high-speed detection cavity based on the detection signals; determining the dwell time of the target ball in the high-speed detection cavity based on the speed and the detection length of the high-speed detection cavity along the direction of the target ball's movement; and determining the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time; illuminating the target ball with the light source during the pulse duration, and illuminating the target ball with the image during the sampling duration. The acquisition device acquires multiple frames of image data of the target sphere's surface and multiple frames of color intensity data of the target sphere's surface through a color mark sensor array. It extracts stripe feature data and number feature data from each frame of image data and color feature data from each frame of color intensity data. It obtains target color feature vector, target stripe feature vector, and target number feature vector from the multiple frames of color feature data, stripe feature data, and number feature data, respectively. It then matches the target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector with the preset standard feature vector set corresponding to each candidate sphere identifier. The candidate sphere identifier with the highest matching score after matching is determined as the target sphere identifier.
[0111] In this application embodiment, the application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for identifying pocketed billiard ball identifiers based on multi-source data as provided in all embodiments of the application.
[0112] That is, when the program is executed by the processor, it implements the following: acquiring the detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor sequentially before entering the high-speed detection cavity; determining the target ball's velocity before entering the high-speed detection cavity based on the detection signals; determining the target ball's dwell time in the high-speed detection cavity based on the velocity and the detection length of the high-speed detection cavity along the target ball's direction of motion; determining the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time; illuminating the target ball with the light source during the pulse duration, and acquiring the image during the sampling duration. The device acquires multiple frames of image data of the target sphere's surface and multiple frames of color intensity data of the target sphere's surface through a color mark sensor array. It extracts stripe feature data and number feature data from each frame of image data and color feature data from each frame of color intensity data. It obtains target color feature vector, target stripe feature vector, and target number feature vector from the multiple frames of color feature data, stripe feature data, and number feature data, respectively. It then matches the target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector with the preset standard feature vector set corresponding to each candidate sphere identifier. The candidate sphere identifier with the highest matching score after matching is determined as the target sphere identifier.
[0113] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0114] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0115] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.
[0116] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0117] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0118] The above provides a detailed description of the method and apparatus for identifying pocketed billiard ball markers based on multi-source data provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for identifying pocketed billiard ball markers based on multi-source data, characterized in that, include: The detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence before entering the high-speed detection cavity are obtained, and the speed of the target ball before entering the high-speed detection cavity is determined based on the detection signals. The dwell time of the target ball in the high-speed detection cavity is determined based on the motion speed and the detection length of the high-speed detection cavity along the motion direction of the target ball. The pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array are determined based on the dwell time. The pulse duration and the sampling duration are both less than the dwell time. During the pulse duration, the target sphere is illuminated by a light source. During the sampling duration, multiple frames of image data of the target sphere surface are acquired by an image acquisition device, and multiple frames of color intensity data of the target sphere surface are acquired by a color mark sensor array. Stripe feature data and number feature data are extracted from each frame of image data, and color feature data is extracted from each frame of color intensity data. The target color feature vector, target stripe feature vector, and target number feature vector are obtained from the color feature data, stripe feature data, and number feature data of multiple frames, respectively. The target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector is matched with the preset standard feature vector set corresponding to each candidate ball identifier. The candidate ball identifier with the highest matching score after matching is determined as the target ball identifier.
2. The method according to claim 1, characterized in that, Determining the velocity of the target ball before it enters the high-speed detection cavity based on the detection signal includes: Based on the recorded detection signals, the first time node of the target ball passing through the first trigger sensor and the second time node of the second trigger sensor are determined. The velocity of the target ball before entering the high-speed detection cavity is determined based on the first time node, the second time node, and the distance between the first trigger sensor and the second trigger sensor.
3. The method according to claim 1, characterized in that, Determining the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time includes: The duration coefficient is determined based on the stay time, where all duration coefficients are greater than 0 and less than 1; The pulse duration of the light source, as well as the sampling duration of the image acquisition device and the color mark sensor array, are determined based on the duration coefficient and dwell time.
4. The method according to claim 1, characterized in that, Color feature data is extracted from the color intensity data of each frame, including: The color intensity data obtained by the color mark sensor array at multiple sampling points is converted into HSV color space data, and the color of each sampling point is classified according to the hue, saturation and brightness in the HSV color space data. The proportion of each color category in the multiple sampling points is counted to obtain the color feature data for each frame.
5. The method according to claim 1, characterized in that, Extract stripe feature data and number feature data from each frame of image data, including: Edge detection is performed on each frame of image data to extract edge line segments within the contour of the target sphere image; When there are at least two edge segments, a local image coordinate system is constructed with the center of the target sphere image outline as the origin, and the tilt angle of each edge segment in the local image coordinate system is determined. Each edge segment is paired up, and edge segment groups with tilt angle differences less than or equal to a preset angle threshold are selected as candidate parallel boundary lines. Calculate the edge spacing between two edge segments in each candidate group of parallel boundary lines, and determine the candidate groups of parallel boundary lines whose edge spacing is within the preset spacing range as stripe feature data.
6. The method according to claim 1, characterized in that, Extracting stripe feature data and number feature data from each frame of image data also includes: Each frame of image data is segmented using a preset digital background color based on a color threshold to obtain multiple connected regions; Calculate the area of each connected region and identify connected regions whose area meets a preset area threshold as digital candidate regions. Based on the position of the digital candidate region in the current frame image data, and based on the pre-calibrated spatial mapping relationship between the image field of view and the sampling points of the color mark sensor array, the target sampling point in the color mark sensor array corresponding to the digital candidate region is determined; The background color verification result of the digital candidate region is determined based on the color intensity data corresponding to the target sampling point and the current frame image data. When the background color verification result meets the preset background color conditions, the candidate region image corresponding to the digital candidate region is extracted from the image data. The candidate region image is compared with a preset digital template library for correlation, and the digital symbol and correlation score corresponding to the digital template with the highest correlation are determined as the number feature data.
7. The method according to claim 1, characterized in that, Target color feature vector, target stripe feature vector, and target number feature vector are obtained from multiple frames of color feature data, stripe feature data, and number feature data, respectively. The target feature vector set, composed of these three vectors, is then matched against a preset standard feature vector set corresponding to each candidate ball identifier. The candidate ball identifier with the highest matching score after each matching is determined as the target ball identifier, including: The proportion of each color category in multi-frame color feature data is statistically analyzed to obtain the target color feature vector; The presence of stripes in multi-frame stripe feature data is statistically analyzed, and the spacing between stripe boundaries is averaged to obtain the target stripe feature vector. For multi-frame numbering feature data, accumulate correlation scores according to the numerical symbols, and determine the numerical symbol with the largest accumulated correlation score and its accumulated correlation score as the target numbering feature vector; The target color feature vector, the target stripe feature vector, and the target number feature vector are combined to form a target feature vector set; The target feature vector set is matched with the preset standard feature vector set corresponding to each candidate ball identifier to obtain the color matching score, stripe matching score and number matching score corresponding to each candidate ball identifier; The color matching score, stripe matching score, and number matching score are weighted and fused according to preset weights to obtain the comprehensive matching score corresponding to each candidate ball identifier, and the candidate ball identifier with the largest comprehensive matching score is determined as the target ball identifier.
8. A device for identifying pocketed billiard ball markers based on multi-source data, characterized in that, include: The acquisition module is used to acquire the detection signals of the target ball passing through at least the first trigger sensor and the second trigger sensor in sequence before entering the high-speed detection cavity, and to determine the speed of the target ball before entering the high-speed detection cavity based on the detection signals. The calculation module is used to determine the dwell time of the target ball in the high-speed detection cavity based on the motion speed and the detection length of the high-speed detection cavity along the motion direction of the target ball, and to determine the pulse duration of the light source and the sampling duration of the image acquisition device and the color mark sensor array based on the dwell time, wherein the pulse duration and the sampling duration are both less than the dwell time; The extraction module is used to illuminate the target ball with a light source during the pulse duration, acquire multiple frames of image data of the target ball surface through an image acquisition device during the sampling duration, and acquire multiple frames of color intensity data of the target ball surface through a color mark sensor array, and extract stripe feature data and number feature data from each frame of image data, and extract color feature data from each frame of color intensity data; The fusion module is used to obtain the target color feature vector, target stripe feature vector, and target number feature vector from the color feature data, stripe feature data, and number feature data of multiple frames, respectively. The target feature vector set composed of the target color feature vector, target stripe feature vector, and target number feature vector is matched with the preset standard feature vector set corresponding to each candidate ball identifier. The candidate ball identifier with the highest matching score after matching is determined as the target ball identifier.
9. A computer electronic device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for identifying pocketed billiard ball identifiers based on multi-source data as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the method for identifying pocketed billiard ball identifiers based on multi-source data as described in any one of claims 1 to 7.
Citation Information
Patent Citations
A billiard ball suit recognition device and method based on a single color sensor
CN108096820B
