Method and system for controlling dealing drop point position range of automatic dealing machine
By using multimodal sensors and dynamic path planning technology in the automatic card dealing machine, the card dealing strategy can be adjusted in real time, solving the problem of unstable card dealing in existing automatic card dealing machines in different desktop environments, and achieving higher adaptability and accuracy.
Patent Information
- Application Number
- CN202511058690.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-09-09
AI Technical Summary
Existing automatic card dealing machines cannot flexibly adjust their dealing strategies when dealing with different table shapes and sizes, resulting in problems such as cards falling and inaccurate landing.
Multimodal sensors are used to perceive the shape and size of the table in real time. Combined with dynamic path planning and adaptive adjustment technology, safe area data is generated and the card-dealing path is adjusted through PLC electronic control to ensure that the cards land within the safe area.
The automatic card dealing machine's adaptability to different desktop environments has been significantly improved, the card drop rate has been reduced, and the stability and accuracy of card dealing have been improved.
Smart Images

Figure CN120605496A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of entertainment equipment, and in particular to a method and system for controlling the range of card drop points of an automatic card dealing machine. Background Art
[0002] The core principle of an automatic card dealing machine is to achieve automatic shuffling, sorting, and precise distribution of playing cards through the coordinated work of mechanical structures, sensors, and program control systems. Its technical route can be divided into three core modules: electromechanical transmission, photoelectric detection, and intelligent control. However, existing automatic card dealing machines generally have the following defects:
[0003] Poor environmental adaptability: The card dealing path is fixed, and the card dealing strategy cannot be dynamically adjusted according to the actual shape (such as round, rectangular) and size of the table, resulting in cards being easily dropped;
[0004] Lack of table size recognition: The table size detection function is not integrated. When the table length or width is insufficient, the card dealing machine still deals cards according to the preset trajectory, causing cards to slip;
[0005] Insufficient fault tolerance: Interference factors such as the flatness of the table edge and the tilt angle are not taken into account, and the consistency of the landing point of the cards cannot be guaranteed.
[0006] In existing technologies, some card-dealing machines use mechanical limits or fixed brackets to constrain the card-dealing range, but this lacks the flexibility to adapt to different usage scenarios. Therefore, we propose a method and system for controlling the card-dealing position range of an automatic card-dealing machine to address this issue. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to overcome the defects of the existing technology. The present invention proposes a control method and system for the landing position range of cards dealt by an automatic card dealing machine. Through real-time perception of the shape and size of the table surface by a multimodal sensor, combined with dynamic path planning and adaptive adjustment technology, the adaptability of the card dealing machine to different table surface environments is significantly improved, and the problem of cards falling or inaccurate landing points caused by the table surface being too small or the shape not matching is effectively solved.
[0008] To solve the above technical problems, the present invention adopts a technical solution: a method for controlling the range of the card placement position of an automatic card dealing machine, comprising the following steps:
[0009] S1. Using a camera, collect images of the landing points of cards after continuous card dealing by a card dealing machine, unify them into point data after preprocessing, and simultaneously construct a detection model to perform position detection on the point data set corresponding to each landing point to obtain a set of coordinate points corresponding to all card landing points;
[0010] S2. Use a multimodal sensor to detect the shape, size, and edge position of the tabletop, and simultaneously determine the coordinates of the boundary points corresponding to the multiple boundary areas where the cards are currently placed. After traversing all the boundary point coordinates, construct multiple corresponding virtual fences, and use the edge intersection method to determine whether the coordinate point of each card's placement is within the virtual fence of the current boundary area.
[0011] S3. For the set of landing point coordinate points determined to be within the virtual fence, use the detection model to perform association matching, calculate the BIOU mean of the corresponding card dealing trajectory of the coordinate points in the set frame by frame, identify two consecutive trajectories with a BIOU mean greater than a set threshold as the same landing point and retain them, eliminate the coordinate points with a BIOU mean lower than the set threshold, traverse all retained landing point coordinate points, and generate the corresponding safe area;
[0012] S4. Based on the safety area data and combined with the PLC electronic control of the card dealing machine robot arm, a corresponding card dealing path is generated.
[0013] Furthermore, in step S1, the pre-processing steps for the landing position image are as follows:
[0014] Perform data cleaning on all landing position images;
[0015] Correction, filtering, image enhancement and edge processing are performed on the cleaned position image;
[0016] Convert the pixel points of the corresponding card area in each position image into a set of corresponding coordinate points in the camera coordinate system.
[0017] Furthermore, in step S2, the specific judgment steps of the edge intersection method are as follows: corresponding rays are emitted from the current landing coordinate point to be judged in different horizontal directions, and then each boundary of the current corresponding virtual fence is traversed to determine whether there is an intersection. If a corresponding intersection exists, the count is increased accordingly, and the landing coordinate point with an odd count is determined to be inside the current virtual fence.
[0018] Furthermore, the landing point coordinate points with an even count are determined to be outside the current virtual fence and are removed, and the current landing point coordinate point set is updated synchronously and in real time.
[0019] Furthermore, in step S2, the current desktop boundary area is determined as follows:
[0020] The laser radar scans the coordinates of the desktop edge and calculates the length and width of the rectangular desktop using the least squares method to fit the desktop shape;
[0021] For a rectangular desktop, deduct the edge reserved distance and calculate the maximum inscribed rectangular area of each boundary area;
[0022] For irregular desktops, the boundary area of each valid card dealing is proposed through the convex hull algorithm.
[0023] Furthermore, in step S3, the BIOU mean calculation step is:
[0024]
[0025] Where w and h are the distances from the previous landing point to the length and width of the current virtual fence boundary, respectively; b_w and b_h are the distances from the next landing point to the length and width of the current virtual fence boundary.
[0026] Furthermore, the specific steps for generating the card-dealing path in step S4 are as follows: first, an infrared rangefinder is used to measure the height of the card-dealing machine from the table, and the table material is identified in combination with the camera image to obtain the corresponding friction coefficient. Based on the current friction coefficient, the card-dealing path required for the current boundary area is determined, and finally, the card-dealing angle and height are adjusted accordingly in combination with the safe area data to ensure that the card landing position is within the safe area.
[0027] A system constructed according to the above-mentioned method for controlling the card drop position range of an automatic card dealing machine includes:
[0028] The image acquisition unit captures the images of the card landing positions after the card dealer continuously deals cards, and unifies them into point data after pre-processing.
[0029] The detection unit has a built-in detection model to perform position detection on the point data set corresponding to each landing point to obtain the coordinate point set corresponding to all card landing points. The coordinate points in the set are then matched with the card dealing trajectories on a frame-by-frame basis to eliminate trajectory data outside the safe area.
[0030] The feedback electronic control unit generates PLC electronic control data electrical signals according to the safety area data, and feedback adjusts the corresponding card dealing angle and height parameters of the card dealing machine to achieve a fixed card dealing point within the safety area.
[0031] An electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein when the processor executes the program, the steps of the method for controlling the position range of the cards dealt by the automatic card dealing machine are implemented.
[0032] A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: when the computer program is executed by a processor, it is used to implement the steps of the above-mentioned method for controlling the position range of the card landing point of the automatic card dealing machine.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] 1. Improved environmental adaptability: Supports a variety of desktop shapes such as rectangle, circle, and oval, and the range of desktop sizes has been expanded by more than 30%;
[0035] 2. Enhanced card dealing stability: The card drop rate is reduced to below 0.5%, far superior to traditional card dealing machines;
[0036] 3. Intelligent operation: No manual intervention is required, and the table environment recognition and parameter adjustment are automatically completed to ensure the center and accuracy of the placement of each card. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The disclosure of the present invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. In the accompanying drawings, the same reference numerals are used to refer to the same components. Among them:
[0038] Figure 1 The specific flow chart of the control method proposed according to one embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0039] It is easy to understand that according to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical solution of the present invention and should not be regarded as the entire invention or as a limitation or restriction of the technical solution of the present invention.
[0040] According to one embodiment of the present invention, Figure 1 Shown.
[0041] In this embodiment, a control process is implemented, and a method for controlling the range of card placement positions of an automatic card dealing machine includes the following steps:
[0042] S1. Using a camera, collect images of the landing points of cards after continuous card dealing by a card dealing machine, unify them into point data after preprocessing, and simultaneously construct a detection model to perform position detection on the point data set corresponding to each landing point to obtain a set of coordinate points corresponding to all card landing points;
[0043] S2. Use a multimodal sensor to detect the shape, size, and edge position of the tabletop, and simultaneously determine the coordinates of the boundary points corresponding to the multiple boundary areas where the cards are currently placed. After traversing all the boundary point coordinates, construct multiple corresponding virtual fences, and use the edge intersection method to determine whether the coordinate point of each card's placement is within the virtual fence of the current boundary area.
[0044] S3. For the set of landing point coordinate points determined to be within the virtual fence, use the detection model to perform association matching, calculate the BIOU mean of the corresponding card dealing trajectory of the coordinate points in the set frame by frame, identify two consecutive trajectories with a BIOU mean greater than a set threshold as the same landing point and retain them, eliminate the coordinate points with a BIOU mean lower than the set threshold, traverse all retained landing point coordinate points, and generate the corresponding safe area;
[0045] S4. Based on the safety area data and combined with the PLC electronic control of the card dealing machine robot arm, a corresponding card dealing path is generated.
[0046] Through the above steps, in the present invention, in order to avoid the problems of existing card dealing equipment being unsuitable for usage scenarios and easy errors in the card dealing position, the present invention first uses a multimodal sensor to perceive the shape and size of the table in real time, and combines dynamic path planning and adaptive adjustment technology to significantly improve the adaptability of the card dealing machine to different table environments, effectively solving the problem of cards falling or inaccurate landing due to the table being too small or the shape not matching.
[0047] More specifically, in step S1, the pre-processing steps for the landing point position image are as follows:
[0048] Perform data cleaning on all landing position images;
[0049] Correction, filtering, image enhancement and edge processing are performed on the cleaned position image;
[0050] Convert the pixel points of the corresponding card area in each position image into a set of corresponding coordinate points in the camera coordinate system.
[0051] In step S2, the specific judgment steps of the edge intersection method are as follows: corresponding rays are emitted from the current landing coordinate point to be judged in different horizontal directions, and then each boundary of the current corresponding virtual fence is traversed to determine whether there is an intersection. If a corresponding intersection exists, the count is increased accordingly, and the landing coordinate point with an odd count is determined to be inside the current virtual fence.
[0052] Furthermore, the landing point coordinate points with an even count are determined to be outside the current virtual fence and are removed, and the current landing point coordinate point set is updated synchronously and in real time.
[0053] Similarly, the steps for determining the current desktop boundary area are as follows:
[0054] The laser radar scans the coordinates of the desktop edge and calculates the length and width of the rectangular desktop using the least squares method to fit the desktop shape;
[0055] For a rectangular desktop, deduct the edge reserved distance and calculate the maximum inscribed rectangular area of each boundary area;
[0056] For irregular desktops, the boundary area of each valid card dealing is proposed through the convex hull algorithm.
[0057] Furthermore, in step S3, the BIOU mean calculation step is:
[0058]
[0059] Where w and h are the distances from the previous landing point to the length and width of the current virtual fence boundary, respectively; b_w and b_h are the distances from the next landing point to the length and width of the current virtual fence boundary.
[0060] In the actual association process, 30 frames of images are reserved for each trajectory:
[0061] For each drop point coordinate set, it contains the drop point coordinates successfully tracked in the previous frame, and the track images are recorded for no more than 30 frames. Starting from the second frame, the card image corresponding to the image frame in the current frame is used to calculate the bounding box of the drop point coordinate set using the VKF prediction. The cost matrix is obtained and matched using the Hungarian algorithm. The track corresponding to the drop point coordinates in the current frame that is successfully matched is used.
[0062] The unmatched landing points in the aforementioned set are combined with the previous landing point, and the BIOU is calculated and matched using the Hungarian algorithm. Successful matches are updated and added to the trajectory's corresponding coordinate set, while unmatched ones are deleted. A check is performed to see if any of the remaining landing points are above a set threshold. If so, a new trajectory is assigned to them; if below, they are ignored. Two related trajectories that are greater than the BIOU threshold are considered the same trajectory and their landing points are simultaneously determined to be consistent.
[0063] During the actual path generation process, the infrared rangefinder can first measure the height of the card dealing machine from the table, and the camera image can be used to identify the table material to obtain the corresponding friction coefficient. Based on the current friction coefficient, the required card-playing path in the current boundary area is determined. Finally, the card-playing angle and height are adjusted accordingly based on the safe area data to ensure that the card landing position is within the safe area.
[0064] Similarly, a system constructed based on the above-mentioned method for controlling the card drop position range of an automatic card dealing machine also falls within the scope of protection of the present invention, and its composition includes:
[0065] The image acquisition unit captures the images of the card landing positions after the card dealer continuously deals cards, and unifies them into point data after pre-processing.
[0066] The detection unit has a built-in detection model to perform position detection on the point data set corresponding to each landing point to obtain the coordinate point set corresponding to all card landing points. The coordinate points in the set are then matched with the card dealing trajectories on a frame-by-frame basis to eliminate trajectory data outside the safe area.
[0067] The feedback electronic control unit generates PLC electronic control data electrical signals according to the safety area data, and feedback adjusts the corresponding card dealing angle and height parameters of the card dealing machine to achieve a fixed card dealing point within the safety area.
[0068] In addition, the above-mentioned method steps and system can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0069] The technical scope of the present invention is not limited to the contents of the above description. Those skilled in the art can make various deformations and modifications to the above embodiments without departing from the technical idea of the present invention, and these deformations and modifications should all fall within the protection scope of the present invention.
Claims
1. A method for controlling the range of card placement points of an automatic card dealing machine, characterized in that: The steps include: S1. Using a camera, collect images of the landing points of cards after continuous card dealing by a card dealing machine, unify them into point data after preprocessing, and simultaneously construct a detection model to perform position detection on the point data set corresponding to each landing point to obtain a set of coordinate points corresponding to all card landing points; S2. Use a multimodal sensor to detect the shape, size, and edge position of the tabletop, and simultaneously determine the coordinates of the boundary points corresponding to the multiple boundary areas where the cards are currently placed. After traversing all the boundary point coordinates, construct multiple corresponding virtual fences, and use the edge intersection method to determine whether the coordinate point of each card's placement is within the virtual fence of the current boundary area. S3. For the set of landing point coordinate points determined to be within the virtual fence, use the detection model to perform association matching, calculate the BIOU mean of the corresponding card dealing trajectory of the coordinate points in the set frame by frame, identify two consecutive trajectories with a BIOU mean greater than a set threshold as the same landing point and retain them, eliminate the coordinate points with a BIOU mean lower than the set threshold, traverse all retained landing point coordinate points, and generate the corresponding safe area; S4. Based on the safety area data and combined with the PLC electronic control of the card dealing machine robot arm, a corresponding card dealing path is generated.
2. A method for controlling the range of card placement points of an automatic card dealing machine according to claim 1, characterized in that: In step S1, the pre-processing steps for the landing position image are as follows: Perform data cleaning on all landing position images; Correction, filtering, image enhancement and edge processing are performed on the cleaned position image; Convert the pixel points of the corresponding card area in each position image into a set of corresponding coordinate points in the camera coordinate system.
3. The method for controlling the card drop position range of an automatic card dealing machine according to claim 1, characterized in that: In step S2, the specific judgment steps of the edge intersection method are as follows: corresponding rays are emitted from the current landing coordinate point to be judged in different horizontal directions, and then each boundary of the current corresponding virtual fence is traversed to determine whether there is an intersection. If a corresponding intersection exists, the count is increased accordingly, and the landing coordinate point with an odd count is determined to be inside the current virtual fence.
4. A method for controlling the card drop position range of an automatic card dealing machine according to claim 3, characterized in that: The landing point coordinate points with an even count are determined to be outside the current virtual fence and are removed, and the current landing point coordinate point set is updated synchronously and in real time.
5. The method for controlling the card drop position range of an automatic card dealing machine according to claim 1, characterized in that: In step S2, the current desktop boundary area is determined as follows: The laser radar scans the coordinates of the desktop edge and calculates the length and width of the rectangular desktop using the least squares method to fit the desktop shape; For a rectangular desktop, deduct the edge reserved distance and calculate the maximum inscribed rectangular area of each boundary area; For irregular desktops, the boundary area of each valid card dealing is proposed through the convex hull algorithm.
6. The method for controlling the card drop position range of an automatic card dealing machine according to claim 1, characterized in that: In step S3, the BIOU mean calculation step is: Where w and h are the distances from the previous landing point to the length and width of the current virtual fence boundary, respectively; b_w and b_h are the distances from the next landing point to the length and width of the current virtual fence boundary.
7. The method for controlling the card drop position range of an automatic card dealing machine according to claim 1, characterized in that: The specific steps for generating the card-dealing path in step S4 are as follows: first, an infrared rangefinder is used to measure the height of the card-dealing machine from the table, and the table material is identified in combination with the camera image to obtain the corresponding friction coefficient. Based on the current friction coefficient, the card-dealing path required for the current boundary area is determined. Finally, the card-dealing angle and height are adjusted accordingly in combination with the safe area data to ensure that the card landing position is within the safe area.
8. A system constructed according to the method for controlling the range of the card placement position of an automatic card dealing machine as described in any one of claims 1 to 7, characterized in that: include: The image acquisition unit captures the images of the card landing positions after the card dealer continuously deals cards, and unifies them into point data after pre-processing. The detection unit has a built-in detection model to perform position detection on the point data set corresponding to each landing point to obtain the coordinate point set corresponding to all card landing points. The coordinate points in the set are then matched with the card dealing trajectories on a frame-by-frame basis to eliminate trajectory data outside the safe area. The feedback electronic control unit generates PLC electronic control data electrical signals according to the safety area data, and feedback adjusts the corresponding card dealing angle and height parameters of the card dealing machine to achieve a fixed card dealing point within the safety area.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein : When the processor executes the program, the steps of the method for controlling the card landing position range of the automatic card dealing machine as described in any one of claims 1 to 7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is used to implement the steps of the method for controlling the card landing position range of the automatic card dealing machine as described in any one of claims 1 to 7.
