Board game method and system based on artificial intelligence algorithm

By introducing learning parameters of rotation angle, image distortion correction, image overexposure and image fill light into artificial intelligence algorithms, the problems of chessboard tilt, inversion and poor image quality in the prior art affecting the recognition accuracy, and achieving higher recognition accuracy and stronger application capabilities.

CN113546398BActive Publication Date: 2025-04-25GUANGZHOU XINWEIDA INTELLIGENT TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110874521.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2025-04-25
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

When existing artificial intelligence algorithms identify chess boards and chess pieces in chess and card games, they are affected by factors such as chess board tilt, inversion, image distortion, overexposure and insufficient exposure, resulting in low recognition accuracy.

Method used

By collecting game desktop and chess and card images, the target features are extracted, and learning parameters of rotation angle, image distortion correction, image overexposure and image fill light are used during the training process to obtain correction compensation information, and chessboard and chess pieces are corrected and classified.

Benefits of technology

It improves the recognition accuracy of chessboards and chess pieces, can effectively deal with tilts, inversions and poor image quality, and enhances the recognition, analysis and processing capabilities of artificial intelligence models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113546398B_ABST
    Figure CN113546398B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence algorithm technology, and specifically to a chess and card game method and system based on artificial intelligence algorithm, wherein the method comprises: collecting a game desktop image, extracting a first target feature of the game desktop image; collecting chess and card images of different forms, extracting a second target feature of the chess and card image; marking the game desktop image and the chess and card image, marking the names of the first target feature and the second target feature; inputting the marked desktop image and the chess and card image into an artificial intelligence model for training, and during the training, obtaining correction compensation information of the second target feature in the chess and card image through learning parameters of rotation angle, image distortion correction, image overexposure and image fill light, correcting the second target feature using the correction compensation information, and classifying the corrected chess and card image using a classification algorithm; after the training is completed, the artificial intelligence model recognizes the game desktop image and the chess and card image, and the method can improve the recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence algorithm technology, and specifically to a chess and card game method and system based on artificial intelligence algorithm. Background Art

[0002] Board games with a wide range of application scenarios and a large user base include mahjong, poker, Chinese chess, chess, go, gobang, checkers, international checkers, military chess, four-country military chess, and beast chess. At present, board games are divided into formal competitions or informal play, and also divided into actual combat games and online games. When board games adopt actual combat game methods, manual referees are generally arranged to supervise and guide the game in formal competitions. In informal play, there are no referees, and there are no technical measures such as privacy protection, intelligent settlement, account management, and anti-cheating. The game has no security protection and no technical assistance, which is not conducive to guiding and regulating folk games and competitions. It is very important to standardize and improve the relevant system.

[0003] At the same time, artificial intelligence has developed rapidly in recent years. Artificial intelligence is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial intelligence is a branch of computer science that hopes to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. Using artificial intelligence algorithms to identify chess and card games is an extension of artificial intelligence algorithms in the field of chess and card games, and is the technical support for realizing the virtual referee function. However, the existing artificial intelligence recognition model recognition is simply to recognize the chess and card surface, and the recognition accuracy will be affected by the tilt or inversion of the chess and card surface, as well as image distortion, overexposure and underexposure of the collected chess and card images. Summary of the invention

[0004] One of the purposes of the present invention is to provide a chess and card game method based on artificial intelligence algorithm to improve recognition accuracy.

[0005] The first basic solution provided by the present invention is a chess and card game method based on artificial intelligence algorithm, which includes the following contents:

[0006] Collecting a game desktop image and extracting a first target feature of the game desktop image;

[0007] Collect chess and card images of different forms and extract the second target features of the chess and card images;

[0008] Annotate the game desktop image and the chess and card image, and annotate the names of the first target feature and the second target feature;

[0009] Input the labeled desktop image and chess and card image into the artificial intelligence model for training, and during the training, obtain the correction compensation information of the second target feature in the chess and card image through the learning parameters of the rotation angle, image distortion correction, image overexposure and image fill light, correct the second target feature using the correction compensation information, and classify the corrected chess and card image using a classification algorithm;

[0010] The trained artificial intelligence model is used to recognize game desktop images and chess and card images.

[0011] The beneficial effects of Basic Scheme 1 are as follows: the game desktop image is collected, and the first target feature of the game desktop image is extracted; chess and card images of different forms are collected, and the second target feature of the chess and card image is extracted; thereby all images in the chess and card game are collected, and then the game desktop image and the chess and card image are annotated, and the first target feature and the second target feature are annotated. When the artificial intelligence model is trained, the first target feature and the second target feature can be distinguished, and the annotated desktop image and chess and card image are input into the artificial intelligence model for training. Because the second feature in the chess and card image is mainly the specific content of the chess and card, and the tilt and inversion of the chess and card surface and the image distortion, overexposure and underexposure of the collected chess and card image will affect the recognition accuracy, so during training, the correction compensation information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle, image distortion correction, image overexposure and image fill light, and the second target feature in the chess and card image is corrected. The second target feature is corrected using the correction compensation information, and the corrected chess and card images are classified using a classification algorithm; the artificial intelligence model after training is used to identify game desktop images and chess and card images. During identification, it can accurately identify tilted and inverted chess and cards, and accurately identify image distortion, overexposure and underexposure in the collected chess and card images, thereby improving the recognition accuracy. As the number of game desktop images and chess and card images increases, the artificial intelligence model will continuously improve its recognition, analysis, processing and judgment capabilities, continuously cover more application scenarios, continuously improve accuracy and adaptability, computing power will continue to increase, and the cost of use will continue to decrease, which will greatly promote informal play games, and have a great driving effect on standardizing the development of educational chess and card games and promoting the development of national fitness. It also has a great supplementary effect on formal competitions.

[0012] Furthermore, the game desktop images and chess and card images are collected, including: public perspective and player perspective.

[0013] Beneficial effects: The public perspective and the player perspective can capture the chess and card situations in the chess and card game from all angles, ensuring the comprehensiveness of image collection.

[0014] Furthermore, if the collected game desktop image and chess and card image are video images, the video images are converted into frame-sampling images.

[0015] Beneficial effect: The collected game desktop images and chess and card images can be collected continuously as video images without shooting one by one. It is only necessary to convert the video images into frame-by-frame images. The frame-by-frame images are video images extracted frame by frame.

[0016] Furthermore, during the training, correction compensation information of the second target feature in the chess and card image is obtained through learning parameters of rotation angle, image distortion correction, image overexposure and image fill light, including:

[0017] If the chess and card image is tilted, the rotation angle information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle during training;

[0018] If the chess and card image is distorted, the correction distortion information of the second target feature in the chess and card image is obtained through the learning parameters of the image distortion correction during training;

[0019] If the chess and card image is overexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image overexposure during training;

[0020] If the chess and card image is underexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image fill light during training.

[0021] Beneficial effects: Different learning parameters can cover more situations where chess and card image acquisition is not ideal for different situations, and collect correction compensation information.

[0022] Furthermore, the first target feature contained in the game desktop image and the second target feature contained in the chess and card image are different according to different types of chess and card games;

[0023] If the board game is mahjong, the first target feature includes: the color of the tablecloth, the texture of the tablecloth and the border of the tablecloth; and if mahjong is machine mahjong, the first target feature also includes: the shape of the operating panel, the color of the operating panel, the border of the operating panel, the text marked on the operating panel, the shape of the lifting port and the border of the lifting port; the second target feature includes: the name of the card face, the shape of the standing card, the shape of the back of the card and the number of points on the top of the dice when it is stable;

[0024] If the board game is poker, the first target features include: the color of the tablecloth, the texture of the tablecloth, and the border of the tablecloth; the second target features include: the name of the card, the shape of the back of the card, and the number of points on the top of the dice when it is stable;

[0025] If the board game is Chinese chess, the first target features include: board shape, board color, board texture, board border and board layout; the second target features include: chess piece name and card back shape;

[0026] If the board game is chess, the first target feature includes: board shape, board color, board texture, board border, board layout, and layout line name; the second target feature includes: chess piece name;

[0027] If the board game is Go, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the second target feature includes: chess piece name;

[0028] If the board game is Gobang, the first target features include: board shape, board color, board texture, board border, board layout, star position and layout line name; the second target features include: chess piece name;

[0029] If the board game is Chinese checkers, the first target features include: board shape, board color, board border, board layout, and diagonal lines connecting chess positions; the second target features include: chess piece names;

[0030] If the board game is international checkers, the first target features include: board shape, board color, board texture, board border, board layout, and layout line name; the second target features include: chess piece name;

[0031] If the chess and card game is military chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess back shape and chess standing shape;

[0032] If the chess and card game is Four Kingdoms Military Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess back shape and chess standing shape;

[0033] If the chess and card game is Beast Battle Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and river boundary; the second target features include: chess piece name.

[0034] Beneficial effect: The first target features contained in the game desktop image and the second target features contained in the chess and card image are different according to the types of chess and card games, so different chess and card games can be accurately identified.

[0035] A second object of the present invention is to provide a chess and card game system based on an artificial intelligence algorithm to improve recognition accuracy.

[0036] The present invention provides a second basic solution: a chess and card game system based on an artificial intelligence algorithm, comprising: a collection module, an extraction module, a labeling module, a processing module and a storage module;

[0037] The acquisition module is used to acquire game desktop images and images of chess and card games in different forms;

[0038] Extraction module: used to extract the first target feature of the game desktop image and the second target feature of the chess and card image;

[0039] A labeling module, used to label the game desktop image and the chess and card image, and label the first target feature and the second target feature name;

[0040] The processing module is used to input the labeled desktop image and chess and card image into the artificial intelligence model for training, and during the training, the correction compensation information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle, image distortion correction, image overexposure and image fill light, the second target feature is corrected by using the correction compensation information, and the corrected chess and card image is classified by using the classification algorithm;

[0041] The storage module is used for the artificial intelligence model after training. The artificial intelligence model is used to recognize game desktop images and chess and card images.

[0042] The beneficial effects of Basic Scheme 2 are as follows: the acquisition module acquires game desktop images and chess and card images of different forms, the extraction module extracts the first target features of the game desktop images and the second target features of the chess and card images, thereby acquiring all images in the chess and card game, and then annotates the game desktop images and chess and card images through the annotation module, annotating the first target features and the second target features. The first target features and the second target features can be distinguished during artificial intelligence model training, and the annotated desktop images and chess and card images are input into the processing module to train the artificial intelligence model. Because the second feature in the chess and card image is mainly the specific content of the chess and card, and the tilt and inversion of the chess and card surface and the image distortion, overexposure and underexposure of the acquired chess and card images will affect the recognition accuracy, so during training, the correction compensation information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle, image distortion correction, image overexposure and image fill light. , the second target feature is corrected using the correction compensation information, and the corrected chess and card images are classified using the classification algorithm; the artificial intelligence model after training is stored in the storage module for future call-up, and the game desktop image and chess and card image are identified. During the identification, the tilted and inverted chess and cards can be accurately identified, and the collected chess and card images with image distortion, image overexposure and image underexposure can be accurately identified to improve the recognition accuracy. As the number of game desktop images and chess and card images increases, the artificial intelligence model will continuously improve its recognition, analysis, processing and judgment capabilities, continuously cover more application scenarios, continuously improve accuracy and adaptability, and its computing power will continue to increase, and the cost of use will continue to decrease, which will greatly promote informal play games, standardize the development of educational chess and card games, and promote the development of national fitness. It will also have a great supplementary effect on formal competitions.

[0043] Further, the acquisition module includes: a public perspective acquisition submodule and a player perspective acquisition submodule;

[0044] The public viewing angle acquisition submodule uses the viewing angle above the game desktop to acquire images;

[0045] The player perspective acquisition submodule acquires images from the player's perspective.

[0046] Beneficial effects: The public perspective and the player perspective can capture the chess and card situations in the chess and card game from all angles, ensuring the comprehensiveness of image collection.

[0047] Furthermore, if the collected game desktop image and chess and card image are video images, the video images are converted into frame-sampling images.

[0048] Beneficial effect: The collected game desktop images and chess and card images can be collected continuously as video images without shooting one by one. It is only necessary to convert the video images into frame-by-frame images. The frame-by-frame images are video images extracted frame by frame.

[0049] Furthermore, during the training, correction compensation information of the second target feature in the chess and card image is obtained through learning parameters of rotation angle, image distortion, image overexposure and image underexposure, including:

[0050] If the chess and card image is tilted, the rotation angle information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle during training;

[0051] If the chess and card image is distorted, the correction distortion information of the second target feature in the chess and card image is obtained through the learning parameters of the image distortion correction during training;

[0052] If the chess and card image is overexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image overexposure during training;

[0053] If the chess and card image is underexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image fill light during training.

[0054] Beneficial effects: Different learning parameters can cover more situations where chess and card image acquisition is not ideal for different situations, and collect correction compensation information.

[0055] Furthermore, the first target feature contained in the game desktop image and the second target feature contained in the chess and card image are different according to different types of chess and card games;

[0056] If the board game is mahjong, the first target feature includes: the color of the tablecloth, the texture of the tablecloth and the border of the tablecloth; and if mahjong is machine mahjong, the first target feature also includes: the shape of the operating panel, the color of the operating panel, the border of the operating panel, the text marked on the operating panel, the shape of the lifting port and the border of the lifting port; the second target feature includes: the name of the card face, the shape of the standing card, the shape of the back of the card and the number of points on the top of the dice when it is stable;

[0057] If the board game is poker, the first target features include: the color of the tablecloth, the texture of the tablecloth, and the border of the tablecloth; the second target features include: the name of the card, the shape of the back of the card, and the number of points on the top of the dice when it is stable;

[0058] If the board game is Chinese chess, the first target features include: board shape, board color, board texture, board border and board layout; the second target features include: chess piece name and card back shape;

[0059] If the board game is chess, the first target feature includes: board shape, board color, board texture, board border, board layout, and layout line name; the second target feature includes: chess piece name;

[0060] If the board game is Go, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the second target feature includes: chess piece name;

[0061] If the board game is Gobang, the first target features include: board shape, board color, board texture, board border, board layout, star position and layout line name; the second target features include: chess piece name;

[0062] If the board game is Chinese checkers, the first target features include: board shape, board color, board border, board layout, and diagonal lines connecting chess positions; the second target features include: chess piece names;

[0063] If the board game is international checkers, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the second target feature includes: chess piece name;

[0064] If the chess and card game is military chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess back shape and chess standing shape;

[0065] If the chess and card game is Four Kingdoms Military Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess piece back shape and chess piece standing shape;

[0066] If the chess and card game is Beast Battle Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and river boundary; the second target features include: chess piece name.

[0067] Beneficial effect: The first target features contained in the game desktop image and the second target features contained in the chess and card image are different according to the types of chess and card games, so that different chess and card games can be accurately identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 This is a flow chart of Embodiment 1 of the chess and card game method based on artificial intelligence algorithm of the present invention;

[0069] Figure 2 This is a logical block diagram of Embodiment 3 of the chess and card game system based on artificial intelligence algorithm of the present invention. DETAILED DESCRIPTION

[0070] The following is further described in detail through specific implementation methods:

[0071] Embodiment 1

[0072] This embodiment is basically as shown in the attached Figure 1 As shown: A chess and card game method based on artificial intelligence algorithm includes the following contents:

[0073] Collecting a game desktop image and extracting a first target feature of the game desktop image;

[0074] Collect chess and card images of different forms and extract the second target features of chess and card images; collect game desktop images and chess and card images, both of which include: public perspective and player perspective. The public perspective is the image taken from the top of the game desktop, and the player perspective is the image taken from the player's position to the game desktop. Whether collecting game desktop images or chess and card images, they must be shot from these two perspectives to ensure the comprehensiveness and accuracy of image collection. And if the collected game desktop images and chess and card images are video images, the video images are converted into frame-drawing images. Frame-drawing images are images that extract video images frame by frame, and the number of frames extracted can be customized.

[0075] The game desktop image and the chess and card image are annotated with the names of the first target feature and the second target feature. Specifically, the first target feature included in the game desktop image and the second target feature included in the chess and card image are different according to different types of chess and card games.

[0076] If the chess and card game is mahjong, the first target feature includes: the color of the tablecloth, the texture of the tablecloth and the boundary of the tablecloth; and if mahjong is machine mahjong, the first target feature also includes: the shape of the operating panel, the color of the operating panel, the boundary of the operating panel, the text marked on the operating panel, the shape of the lifting port and the boundary of the lifting port; the text marked on the operating panel includes: the four directions of southeast, northwest and northeast; the second target feature includes: the name of the card face, the shape of the standing card, the shape of the back of the card and the number of points on the top when the dice is stable; the names of the card face include: 10,000 to 90,000, 1 tube to 9 tubes, 1 to 9 strips, east wind, west wind, south wind, north wind, middle, hair, white, spring, summer, autumn, winter, plum, orchid, chrysanthemum, bamboo, etc.; the shape of the standing card is divided into vertical and horizontal; the back of the card is the state when the card face is facing down; the dice is a cube with a total of six faces, and each face is engraved with different round holes from 1 to 6 in sequence, that is, the number of points.

[0077] If the board game is poker, the first target features include: the color of the tablecloth, the texture of the tablecloth and the border of the tablecloth; the second target features include: the name of the card, the shape of the back of the card and the number of points on the top of the dice when it is stable; the card name includes: 1 to 10, J, Q, K, small king, big king and other 15 character categories (where 1 represents A), and 0 represents a blank card, which can be used as a substitute or alternative. The card name also has four different suits: spades, hearts, clubs and diamonds;

[0078] If the chess and card game is Chinese chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border and chessboard layout; the chessboard layout includes: horizontal lines, vertical lines, diagonal lines, chess positions and river boundaries; the second target features include: chess piece names and card back shapes; the chess piece names include: general, chariot, horse, cannon, bishop, scholar, soldier of the red chess side and general, chariot, horse, cannon, elephant, scholar, soldier of the black chess side;

[0079] If the board game is chess, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the board layout includes: horizontal lines, vertical lines and chess positions; the second target feature includes: chess piece names; the chess piece names include: king, queen, rook, bishop, horse and pawn, and the corresponding English original meanings are king, queen, chariot, bishop, knight and guard.

[0080] If the board game is Go, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the board layout includes: horizontal line, vertical line, chess position and star position; the second target feature includes: chess piece name; the chess piece name includes: black chess and white chess;

[0081] If the board game is Gobang, the first target feature includes: board shape, board color, board texture, board border, board layout, star position and layout line name; the board layout includes: horizontal line, vertical line, chess position and star position; the second target feature includes: chess piece name; the chess piece name includes: black chess and white chess;

[0082] If the board game is Chinese checkers, the first target features include: board shape, board color, board border, board layout, and diagonal lines connecting chess positions; wherein the board layout includes: chess positions; the second target features include: chess piece names;

[0083] If the board game is international checkers, the first target features include: board shape, board color, board texture, board border, board layout and layout line name; among which the board layout includes horizontal lines, vertical lines and chess positions; the second target features include: chess piece names;

[0084] If the chess and card game is military chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the chessboard layout includes horizontal railway lines, horizontal highway lines, vertical railway lines, vertical highway lines, diagonal highway lines and chess positions, and the chess positions include: base camp, military station and camp; the second target features include: chess piece name, chess back shape and standing chess shape; the chess piece names include: military flag, commander, army commander, division commander, brigade commander, regiment commander, battalion commander, bomb, company commander, platoon leader, engineer, mine, and are divided into red and black;

[0085] If the chess and card game is Four Kingdoms Military Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the chessboard layout includes railway lines, highway lines and chess positions, and the chess positions include base camps, military stations and camps; the second target features include: chess piece names, chess back shapes and standing chess pieces; the chess piece names include: red, purple, blue and green military flags, commanders, army commanders, division commanders, brigade commanders, regiment commanders, battalion commanders, bombs, company commanders, platoon leaders, engineers and mines;

[0086] If the chess and card game is beast chess, the first target feature includes: chessboard shape, chessboard color, chessboard texture, chessboard boundary, chessboard layout and river boundary; wherein the chessboard layout includes: horizontal lines, vertical lines and chess positions; the second target feature includes: chess piece names; wherein the chess piece names include elephants, lions, tigers, leopards, wolves, dogs, cats and mice. The labeled desktop image and chess and card image are input into the artificial intelligence model for training, and during the training, the correction compensation information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle, image distortion correction, image overexposure and image fill light, which in this embodiment are the learning parameters of the rotation angle, image distortion correction, image overexposure and image fill light, the second target feature is corrected using the correction compensation information, and the corrected chess and card image is classified using a classification algorithm; wherein if the chess and card image is tilted, the rotation angle information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle during training;

[0087] If the chess and card image is distorted, the correction distortion information of the second target feature in the chess and card image is obtained through the learning parameters of image distortion correction during training; the lens of the camera that collects the image will introduce distortion due to the manufacturing accuracy and assembly process deviation, resulting in distortion of the original image. Therefore, the learning parameters of image distortion correction are mainly based on the mapping relationship between the real image and the distorted image, using the coordinate position of the real image to find the coordinate position in the distorted image, and taking out the corresponding pixel value, which is also the pixel value of the normal image, so as to correct the distortion of the chess and card image;

[0088] If the chess and card image is overexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the overexposed image during training; wherein the learning parameters of the overexposed image are the learning parameters for reducing the light;

[0089] If the chess and card image is underexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image fill light during training;

[0090] The artificial intelligence model is YOLO V5, in which learning parameters of rotation angle, image distortion, image overexposure and image underexposure are added. The classification algorithm uses CBAM and attention neural network;

[0091] The trained artificial intelligence model is used to recognize game desktop images and chess and card images.

[0092] This method can accurately identify tilted or inverted chess and cards, and as the number of game desktop images and chess and card images increases, the artificial intelligence model will continuously improve its recognition, analysis, processing and judgment capabilities, continuously cover more application scenarios, continuously improve accuracy and adaptability, and its computing power will continue to increase, while its cost of use will continue to decrease. This will greatly promote informal play, standardize the development of educational chess and card games, and promote the development of national fitness, and will also greatly supplement formal competitions.

[0093] Embodiment 2

[0094] This embodiment is basically the same as the first embodiment, except that: this method further includes:

[0095] When identifying a game desktop image captured from a public perspective, the game desktop image captured from a player's perspective corresponding to the boundary portion is retrieved according to the boundary portion of the game desktop image captured from a public perspective, and the first target feature in the game desktop image captured from the player's perspective is identified, and the first target feature recognition result of the boundary portion of the game desktop image captured from a public perspective is verified and corrected; this is mainly for the case where the boundary portion of the game desktop image captured from a public perspective may be unclear. Taking the chess and card game Go as an example, when the boundary portion of the game desktop image captured from a public perspective is unclear, the boundary portion on the game desktop image captured from a public perspective can be preset first, and then edge detection can be used to detect whether the boundary portion meets the preset clarity. If the value does not meet the requirement, it is determined to be unclear; because the boundary part is unclear, the first target feature cannot be accurately identified, for example: the chessboard boundary and chessboard layout, but the middle part of the game desktop image collected from the public perspective is clear, and the chessboard layout in the middle part can be clearly identified. At this time, the game desktop image collected from the player's perspective corresponding to the unclear boundary part is retrieved to identify the chessboard boundary and chessboard layout, and the interval distance between the horizontal lines and the interval distance between the vertical lines of the chessboard layout are obtained according to the middle part. Then, according to the number of horizontal and vertical lines in the game desktop image collected from the player's perspective, the horizontal and vertical lines of the boundary part of the game desktop image collected from the public perspective are supplemented, and then the chessboard boundary can also be supplemented. This can improve the accuracy of recognition.

[0096] When identifying the chess and card images captured from the player's perspective, the chess and card images captured from the public perspective are retrieved, and the second target feature in the player's image captured from the public perspective is identified, and the second target feature identified in the chess and card images captured from the player's perspective is verified and corrected; when the chess and card game is mahjong, the number of upright mahjongs with recognized card names identified in the chess and card images captured from the player's perspective is verified based on the number of upright mahjongs identified in the chess and card images captured from the public perspective, and it is determined whether the numbers identified in the two perspectives are inconsistent. If so, both perspectives are collected and identified again, and a warning is issued, and then the verification is performed again; if not, the verification is terminated.

[0097] Embodiment 3

[0098] This embodiment is basically as shown in the attached Figure 2 As shown: A chess and card game system based on artificial intelligence algorithm includes: a collection module, an extraction module, a labeling module, a processing module and a storage module;

[0099] The acquisition module is used to acquire game desktop images and chess and card images of different forms; the acquisition module includes: a public perspective acquisition submodule and a player perspective acquisition submodule;

[0100] The public perspective acquisition submodule uses the perspective above the game desktop to acquire images;

[0101] The player perspective acquisition submodule uses the player's perspective to acquire images.

[0102] If the collected game desktop image and chess and card image are video images, the video images are converted into frame-sampling images.

[0103] Extraction module: used to extract the first target feature of the game desktop image and the second target feature of the chess and card image;

[0104] A labeling module is used to label the game desktop image and the chess and card image, and label the names of the first target feature and the second target feature; specifically, the first target feature contained in the game desktop image and the second target feature contained in the chess and card image are different according to different types of chess and card games;

[0105] If the chess and card game is mahjong, the first target feature includes: the color of the tablecloth, the texture of the tablecloth and the boundary of the tablecloth; and if mahjong is machine mahjong, the first target feature also includes: the shape of the operating panel, the color of the operating panel, the boundary of the operating panel, the text marked on the operating panel, the shape of the lifting port and the boundary of the lifting port; the text marked on the operating panel includes: the four directions of southeast, northwest and northeast; the second target feature includes: the name of the card face, the shape of the standing card, the shape of the back of the card and the number of points on the top when the dice is stable; the names of the card face include: 10,000 to 90,000, 1 tube to 9 tubes, 1 to 9 strips, east wind, west wind, south wind, north wind, middle, hair, white, spring, summer, autumn, winter, plum, orchid, chrysanthemum, bamboo, etc.; the shape of the standing card is divided into vertical and horizontal; the back of the card is the state when the card face is facing down; the dice is a cube with a total of six faces, and each face is engraved with different round holes from 1 to 6 in sequence, that is, the number of points.

[0106] If the board game is poker, the first target features include: the color of the tablecloth, the texture of the tablecloth and the border of the tablecloth; the second target features include: the name of the card, the shape of the back of the card and the number of points on the top of the dice when it is stable; the card name includes: 1 to 10, J, Q, K, small king, big king and other 15 character categories (where 1 represents A), and 0 represents a blank card, which can be used as a substitute or alternative. The card name also has four different suits: spades, hearts, clubs and diamonds;

[0107] If the chess and card game is Chinese chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border and chessboard layout; the chessboard layout includes: horizontal lines, vertical lines, diagonal lines, chess positions and river boundaries; the second target features include: chess piece names and card back shapes; the chess piece names include: general, chariot, horse, cannon, bishop, scholar, soldier of the red chess side and general, chariot, horse, cannon, elephant, scholar, soldier of the black chess side;

[0108] If the board game is chess, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the board layout includes: horizontal lines, vertical lines and chess positions; the second target feature includes: chess piece names; the chess piece names include: king, queen, rook, bishop, horse and pawn, and the corresponding English original meanings are king, queen, chariot, bishop, knight and guard.

[0109] If the board game is Go, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the board layout includes: horizontal line, vertical line, chess position and star position; the second target feature includes: chess piece name; the chess piece name includes: black chess and white chess;

[0110] If the board game is Gobang, the first target feature includes: board shape, board color, board texture, board border, board layout, star position and layout line name; the board layout includes: horizontal line, vertical line, chess position and star position; the second target feature includes: chess piece name; the chess piece name includes: black chess and white chess;

[0111] If the board game is Chinese checkers, the first target features include: board shape, board color, board border, board layout, and diagonal lines connecting chess positions; wherein the board layout includes: chess positions; the second target features include: chess piece names;

[0112] If the board game is international checkers, the first target features include: board shape, board color, board texture, board border, board layout and layout line name; among which the board layout includes horizontal lines, vertical lines and chess positions; the second target features include: chess piece names;

[0113] If the chess and card game is military chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the chessboard layout includes horizontal railway lines, horizontal highway lines, vertical railway lines, vertical highway lines, diagonal highway lines and chess positions, and the chess positions include: base camp, military station and camp; the second target features include: chess piece name, chess back shape and standing chess shape; the chess piece names include: military flag, commander, army commander, division commander, brigade commander, regiment commander, battalion commander, bomb, company commander, platoon leader, engineer, mine, and are divided into red and black;

[0114] If the chess and card game is Four Kingdoms Military Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the chessboard layout includes railway lines, highway lines and chess positions, and the chess positions include base camps, military stations and camps; the second target features include: chess piece names, chess back shapes and standing chess pieces; the chess piece names include: red, purple, blue and green military flags, commanders, army commanders, division commanders, brigade commanders, regiment commanders, battalion commanders, bombs, company commanders, platoon leaders, engineers and mines;

[0115] If the chess and card game is Beast Battle Chess, the first target feature includes: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and river boundary; the chessboard layout includes: horizontal lines, vertical lines and chess positions; the second target feature includes: chess piece names; the chess piece names include elephant, lion, tiger, leopard, wolf, dog, cat and mouse.

[0116] A processing module is used to train an artificial intelligence model for the input of the labeled desktop image and the chess and card image, and during the training, through the learning parameters such as rotation angle, image distortion correction, image overexposure and image fill light, in this embodiment, the learning parameters of rotation angle, image distortion correction, image overexposure and image fill light are used to obtain the correction compensation information of the second target feature in the chess and card image, correct the second target feature using the correction compensation information, and classify the corrected chess and card image using a classification algorithm; wherein if the chess and card image is tilted, the rotation angle information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle during training;

[0117] If the chess and card image is distorted, the correction distortion information of the second target feature in the chess and card image is obtained through the learning parameters of the image distortion correction during training;

[0118] If the chess and card image is overexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the overexposed image during training; wherein the learning parameters of the overexposed image are the learning parameters for reducing the light;

[0119] If the chess and card image is underexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image fill light during training;

[0120] The artificial intelligence model is YOLO V5, in which learning parameters of rotation angle, image distortion, image overexposure and image underexposure are added. The classification algorithm uses CBAM and attention neural network;

[0121] The storage module is used for the artificial intelligence model after training. The artificial intelligence model is used to recognize game desktop images and chess and card images.

[0122] Embodiment 4

[0123] This embodiment is basically the same as the third embodiment, except that: this system further includes: a verification module;

[0124] The verification module is used for, when the artificial intelligence module recognizes the game desktop image collected from the public perspective, to retrieve the game desktop image collected from the player perspective corresponding to the boundary portion of the game desktop image collected from the public perspective, and to extract the first target feature in the game desktop image collected from the player perspective recognized by the artificial intelligence module, and to verify and correct the recognition result of the first target feature of the boundary portion of the game desktop image collected from the public perspective;

[0125] The main purpose is to solve the problem that the boundary part of the game desktop image collected from the public perspective may be unclear. Taking the chess and card game as Go as an example, when the boundary part of the game desktop image collected from the public perspective is unclear, the verification module can first preset the boundary part on the game desktop image collected from the public perspective, and then use edge detection to detect whether the boundary part meets the preset clarity value. If it does not meet the requirement, it is determined to be unclear. Because the boundary part is unclear, the first target feature cannot be accurately identified, such as the chessboard boundary and chessboard layout, but the middle part of the game desktop image collected from the public perspective is clear, and the chessboard layout in the middle part can be clearly identified. At this time, the verification module retrieves the game desktop image collected from the player's perspective corresponding to the unclear boundary part, identifies the chessboard boundary and chessboard layout, obtains the interval distance between the horizontal lines and the interval distance between the vertical lines of the chessboard layout according to the middle part, and then identifies the number of horizontal and vertical lines in the game desktop image collected from the player's perspective, supplements the horizontal and vertical lines of the boundary part of the game desktop image collected from the public perspective, and then supplements the chessboard boundary. Thus, the accuracy of recognition can be improved.

[0126] The verification module is also used to retrieve the chess and card images collected from the public perspective when using the artificial intelligence model to identify the chess and card images collected from the player's perspective, and obtain the second target feature in the player image collected from the public perspective identified by the artificial intelligence algorithm, and verify and correct the second target feature identified in the chess and card image collected from the player's perspective;

[0127] When the chess and card game is mahjong, the number of upright mahjongs identified in the chess and card image captured from the public perspective and the number of upright mahjongs with card names recognized in the chess and card image captured from the player perspective are verified to determine whether the numbers recognized in the two perspectives are inconsistent. If so, both perspectives are collected and identified again, and a warning is issued, and then the verification is performed again; if not, the verification is terminated.

[0128] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. A chess and card game method based on artificial intelligence algorithm, characterized in that: It includes the following: Collecting a game desktop image and extracting a first target feature of the game desktop image; Collect chess and card images of different forms and extract the second target features of the chess and card images; Collect game desktop images and chess and card images, including: public perspective and player perspective. The public perspective is the image taken from the top of the game desktop, and the player perspective is the image taken from the player's position to the game desktop. When identifying the game desktop image collected from the public perspective, according to the boundary portion of the game desktop image collected from the public perspective, the game desktop image collected from the player perspective corresponding to the boundary portion is retrieved, and the first target feature in the game desktop image collected from the player perspective is identified, and the recognition result of the first target feature of the boundary portion of the game desktop image collected from the public perspective is verified and corrected; When identifying the chess and card image collected from the player's perspective, the chess and card image collected from the public perspective is retrieved, and the second target feature in the player image collected from the public perspective is identified, and the second target feature identified in the chess and card image collected from the player's perspective is verified and corrected; Annotate the game desktop image and the chess and card image, and annotate the names of the first target feature and the second target feature; Input the labeled desktop image and chess and card image into the artificial intelligence model for training, and during the training, obtain the correction compensation information of the second target feature in the chess and card image through the learning parameters of the rotation angle, image distortion correction, image overexposure and image fill light, correct the second target feature using the correction compensation information, and classify the corrected chess and card image using a classification algorithm; The trained artificial intelligence model is used to recognize game desktop images and chess and card images.

2. The chess and card game method based on artificial intelligence algorithm according to claim 1, characterized in that: If the collected game desktop image and chess and card image are video images, the video images are converted into frame-sampling images.

3. The chess and card game method based on artificial intelligence algorithm according to claim 1, characterized in that: During the training, correction compensation information of the second target feature in the chess and card image is obtained through learning parameters of rotation angle, image distortion correction, image overexposure and image fill light, including: If the chess and card image is tilted, the rotation angle information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle during training; If the chess and card image is distorted, the correction distortion information of the second target feature in the chess and card image is obtained through the learning parameters of the image distortion correction during training; If the chess and card image is overexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image overexposure during training; If the chess and card image is underexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image fill light during training.

4. The chess and card game method based on artificial intelligence algorithm according to claim 1, characterized in that: The first target feature contained in the game desktop image and the second target feature contained in the chess and card image are different according to the type of chess and card game; If the board game is mahjong, the first target feature includes: the color of the tablecloth, the texture of the tablecloth and the border of the tablecloth; and if mahjong is machine mahjong, the first target feature also includes: the shape of the operating panel, the color of the operating panel, the border of the operating panel, the text marked on the operating panel, the shape of the lifting port and the border of the lifting port; the second target feature includes: the name of the card face, the shape of the standing card, the shape of the back of the card and the number of points on the top of the dice when it is stable; If the board game is poker, the first target features include: the color of the tablecloth, the texture of the tablecloth, and the border of the tablecloth; the second target features include: the name of the card, the shape of the back of the card, and the number of points on the top of the dice when it is stable; If the board game is Chinese chess, the first target features include: board shape, board color, board texture, board border and board layout; the second target features include: chess piece name and card back shape; If the board game is chess, the first target feature includes: board shape, board color, board texture, board border, board layout, and layout line name; the second target feature includes: chess piece name; If the board game is Go, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the second target feature includes: chess piece name; If the board game is Gobang, the first target features include: board shape, board color, board texture, board border, board layout, star position and layout line name; the second target features include: chess piece name; If the board game is Chinese checkers, the first target features include: board shape, board color, board border, board layout, and diagonal lines connecting chess positions; the second target features include: chess piece names; If the board game is international checkers, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the second target feature includes: chess piece name; If the chess and card game is military chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess back shape and chess standing shape; If the chess and card game is Four Kingdoms Military Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess piece back shape and chess piece standing shape; If the chess and card game is Beast Battle Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and river boundary; the second target features include: chess piece name.

5. A chess and card game system based on artificial intelligence algorithm, characterized by: include: Acquisition module, extraction module, verification module, annotation module, processing module and storage module; The acquisition module is used to acquire game desktop images and images of chess and card games in different forms; The acquisition module includes: a public perspective acquisition submodule and a player perspective acquisition submodule; the public perspective acquisition submodule uses the perspective above the game desktop to acquire images; the player perspective acquisition submodule uses the player perspective to acquire images; Extraction module: used to extract the first target feature of the game desktop image and the second target feature of the chess and card image; A verification module, which is used for, when the artificial intelligence module recognizes the game desktop image collected from the public perspective, to retrieve the game desktop image collected from the player perspective corresponding to the boundary portion of the game desktop image collected from the public perspective, and to extract the first target feature in the game desktop image collected from the player perspective recognized by the artificial intelligence module, and to verify and correct the recognition result of the first target feature of the boundary portion of the game desktop image collected from the public perspective; The verification module is also used to retrieve the chess and card images collected from the public perspective when using the artificial intelligence model to identify the chess and card images collected from the player's perspective, and obtain the second target feature in the player image collected from the public perspective identified by the artificial intelligence algorithm, and verify and correct the second target feature identified in the chess and card image collected from the player's perspective; A labeling module, used to label the game desktop image and the chess and card image, and label the first target feature and the second target feature name; The processing module is used to input the labeled desktop image and chess and card image into the artificial intelligence model for training, and during the training, the correction compensation information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle, image distortion, image overexposure and image underexposure, the second target feature is corrected by using the correction compensation information, and the corrected chess and card image is classified by using the classification algorithm; The storage module is used for the artificial intelligence model after training. The artificial intelligence model is used to recognize game desktop images and chess and card images.

6. The chess and card game system based on artificial intelligence algorithm according to claim 5, characterized in that: If the collected game desktop image and chess and card image are video images, the video images are converted into frame-sampling images.

7. The chess and card game system based on artificial intelligence algorithm according to claim 5, characterized in that: During the training, correction compensation information of the second target feature in the chess and card image is obtained through learning parameters of rotation angle, image distortion, image overexposure and image underexposure, including: If the chess and card image is tilted, the rotation angle information of the second target feature in the chess and card image is obtained through the learning parameters of the rotation angle during training; If the chess and card image is distorted, the correction distortion information of the second target feature in the chess and card image is obtained through the learning parameters of the image distortion during training; If the chess and card image is overexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the image overexposure during training; If the chess and card image is underexposed, the correction light information of the second target feature in the chess and card image is obtained through the learning parameters of the underexposed image during training.

8. The chess and card game system based on artificial intelligence algorithm according to claim 5, characterized in that: The first target feature contained in the game desktop image and the second target feature contained in the chess and card image are different according to the type of chess and card game; If the board game is mahjong, the first target feature includes: the color of the tablecloth, the texture of the tablecloth and the border of the tablecloth; and if mahjong is machine mahjong, the first target feature also includes: the shape of the operating panel, the color of the operating panel, the border of the operating panel, the text marked on the operating panel, the shape of the lifting port and the border of the lifting port; the second target feature includes: the name of the card face, the shape of the standing card, the shape of the back of the card and the number of points on the top of the dice when it is stable; If the board game is poker, the first target features include: the color of the tablecloth, the texture of the tablecloth, and the border of the tablecloth; the second target features include: the name of the card, the shape of the back of the card, and the number of points on the top of the dice when it is stable; If the board game is Chinese chess, the first target features include: board shape, board color, board texture, board border and board layout; the second target features include: chess piece name and card back shape; If the board game is chess, the first target feature includes: board shape, board color, board texture, board border, board layout, and layout line name; the second target feature includes: chess piece name; If the board game is Go, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the second target feature includes: chess piece name; If the board game is Gobang, the first target features include: board shape, board color, board texture, board border, board layout, star position and layout line name; the second target features include: chess piece name; If the board game is Chinese checkers, the first target features include: board shape, board color, board border, board layout, and diagonal lines connecting chess positions; the second target features include: chess piece names; If the board game is international checkers, the first target feature includes: board shape, board color, board texture, board border, board layout and layout line name; the second target feature includes: chess piece name; If the chess and card game is military chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess back shape and chess standing shape; If the chess and card game is Four Kingdoms Military Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and mountain boundary; the second target features include: chess piece name, chess piece back shape and chess piece standing shape; If the chess and card game is Beast Battle Chess, the first target features include: chessboard shape, chessboard color, chessboard texture, chessboard border, chessboard layout and river boundary; the second target features include: chess piece name.

Citation Information

Patent Citations

  • Text detection and recognition method and system and computer equipment

    CN111401371A

  • Game plug-in identification method and device, storage medium and computer equipment

    CN112206541A

  • Chess and card game strategy updating method and system based on model, medium and device

    CN112704882A