Physical interactive chess device and interactive method based on spatial augmented reality
By combining spatial augmented reality technology with physical chess devices and using projectors and industrial cameras to identify ArUco tags, the virtual and real fusion in chess interaction is realized, which solves the problems of single interaction mode and lack of tactile experience in the existing technology, and improves the naturalness of chess interaction. Sex and immersion.
Patent Information
- Application Number
- CN202210523204.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-05-13
AI Technical Summary
The existing chess interaction method requires both parties to master the rules of chess in physical interaction, and lacks a tactile interactive experience. Digital games lack a virtual-real integration experience and cannot improve the naturalness and immersion of interaction.
Using a physical interaction device based on spatial augmented reality, combined with a projector, industrial camera, infrared filter, infrared lamp, translucent projection table and 3D printed chess pieces, through ArUco tag recognition and virtual coordinate system conversion, the physical chess pieces are placed on the virtual chessboard Precise movement and virtual and real fusion effect.
It enhances the immersion and authenticity of chess interaction. Players can complete all interactive operations through physical chess pieces without wearing equipment. The interaction method is natural and efficient, in line with the trend of human-computer interaction, and allows players to experience the immersive feeling of combining virtuality and reality.
Smart Images

Figure CN114840088B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of spatial augmented reality and physical object interaction technology, and more specifically, to a physical object interactive chess device and an interactive method based on spatial augmented reality. Background Art
[0002] Chinese chess is a national intangible cultural heritage and a cultural treasure of the Chinese nation. Therefore, we use spatial augmented reality technology to create a chess interactive device that integrates virtuality and reality and combines education with entertainment, bringing players a gaming experience based on reality and beyond reality, enhancing the fun of playing chess, and protecting and inheriting intangible cultural heritage.
[0003] There are two main ways of interacting with chess on the market. The first is that in daily life, players directly use actual chess to interact with each other. Two players play chess against each other, and both the red and black players must master the chess techniques and rules. The second is a digital computer chess game. Players can choose to play against the computer or connect to the Internet to play against other players. Players pick up chess pieces by clicking on the chess pieces on the display with the mouse, and click on the chessboard again to achieve the effect of dropping the pieces. The computer will calculate and determine whether the player's chess operation complies with the rules of the chess game, and then give a chess response or an illegal response.
[0004] The existing chess interaction has the following shortcomings: in daily life, chess interaction requires two people to complete the game operation, and both players need to master the chess playing methods and rules. In addition to picking up and placing chess pieces, there is no other interactive channel feedback, the form is relatively simple, and the interactive experience is poor. In the digital computer chess game interaction, the player's interactive operation of the chess is purely virtual, and the operation is achieved only by moving and clicking the mouse. The hand-feel interactive experience of picking up and placing chess pieces in the chess game is missing, and the interactive input and visual output are inconsistent in space.
[0005] Therefore, the existing chess interaction needs a device that improves the naturalness and experience of the interaction, while retaining the original physical chess piece interaction and experiencing the virtual-real fusion experience based on reality and beyond reality. We invented a physical interactive chess device based on spatial augmented reality, hoping to improve the interactive mode of chess through this chess interactive device. At the same time, based on our investigation and research, there are no similar chess product devices on the market.
[0006] Spatial augmented reality is one of the three major forms of augmented reality. It uses projection and other methods to enhance the display of virtual content in physical space. In a spatial augmented reality system, users can interact with virtual content in physical space, have good environmental perception, spatial perception and collaborative perception, and have low cognitive load during the execution of interactive tasks. Physical interaction technology connects digital information to everyday physical objects or environments to enhance the physical world, so that digital information can be manipulated directly by the user's hands.
[0007] However, applying the above technology to the field of chess interaction cannot achieve a very perfect effect, and the accuracy of computer tag recognition will be affected when projecting enhanced display and moving physical chess pieces. Summary of the invention
[0008] In view of the defects of the prior art, the present invention proposes a physical interactive chess device based on spatial augmented reality, which supports physical chess interaction and virtual-real fusion spatial augmented projection reality.
[0009] The specific technical solutions are as follows:
[0010] A physical interactive chess device based on spatial augmented reality, the interactive device comprising: a projector, an industrial camera, a computer, an infrared filter, an infrared lamp, a physical interactive object, a semi-transparent projection table, and a mirror.
[0011] The projector is used to project a projection image, and the projection image projected by the projector is reflected onto the semi-transparent projection table through the mirror surface at the bottom of the projection table;
[0012] The industrial camera is used to capture the label information and position information images of all chess pieces on the projection table in real time. The industrial camera takes images from the bottom of the translucent glass projection table through mirror reflection and transmits the obtained images to the computer;
[0013] The computer is used to construct a virtual chessboard and an interactive interface, create a virtual coordinate system, obtain all physical chess piece information on the projection desktop based on image information detection by an industrial camera, convert it into position information in the virtual coordinate system after coordinate transformation, and perform generation processing of the projection interactive effect image by changing the virtual object model;
[0014] The infrared filter is fixed in front of the industrial camera lens to filter the visible light image projected by the projector during the virtual-real fusion presentation, thereby improving the accuracy of the computer's recognition and detection of labels in the image;
[0015] The infrared light is used to illuminate the physical interactive object and cooperate with the infrared filter to complete the image capture process of the industrial camera;
[0016] The physical interactive objects in question are 3D printed chess pieces, which are used by players to directly interact with the projection system using the physical pieces. ArUco tags for identification and detection are attached to the bottom of the physical pieces.
[0017] The translucent projection table in question is composed of 3D-printed table legs and a translucent glass plane, which is used for players to place physical interactive chess pieces and for projecting interactive images by a projector;
[0018] The mirror is placed at the bottom of the translucent projection table to reflect the bottom of the real chess pieces and the projected image.
[0019] Based on the above solution, the industrial camera is Vision Datum LEO 1440S-166um.
[0020] Based on the above solution, the projector model is Optoma DM3307.
[0021] Based on the above scheme, the starting and ending positions of the physical chess pieces moved by the player's interactive operation are captured by an industrial camera to produce the corresponding chess piece movement effect, and are accurately projected to the corresponding position of the physical chess piece on the projection table.
[0022] The method for performing physical interaction using a physical interaction chess device based on spatial augmented reality comprises the following steps:
[0023] S1. Design the chess interaction process according to the content and rules of Chinese chess, use computers to build a virtual chess board interaction interface, create a virtual coordinate system, and build a spatial augmented reality projection environment device;
[0024] S2, calibrating the coordinate system in the physical interactive chess device based on spatial augmented reality;
[0025] S3, using an industrial camera to capture all the physical chess pieces on the projection desktop in real time, obtaining images of each frame of the physical object, and extracting the ID information of the physical interactive chess pieces and the two-dimensional coordinate information of the four corner points of the ArUco tag based on the ArUco tag information in the image, and obtaining the coordinate information of the center point based on the coordinates of the four corner points;
[0026] S4, handle the flickering problem of ArUco tag recognition when the physical chess piece moves, and filter invalid coordinate information;
[0027] S5. Establish a virtual coordinate system consistent with the projection desktop in the virtual scene, multiply the obtained coordinate points by the calibrated homography matrix, obtain the normalized coordinates of the ArUco tag on the chessboard in the virtual world, and then calculate the actual coordinates in the virtual world according to the actual size of the chessboard to obtain the final coordinate information;
[0028] S6. Putting the coordinate position of the movement of the physical chess piece into the virtual coordinate system generates an interactive effect of the movement of the physical chess piece, and projecting the generated interactive effect picture onto a semi-transparent projection table through a projector after mirror reflection, so as to achieve an effect of virtual-real fusion.
[0029] Preferably, in the aforementioned S1, building a spatial augmented reality projection environment device specifically includes the following steps:
[0030] S11, place the mirror at an angle under the translucent table, with the projector and camera facing the mirror;
[0031] S12, adjusting the projector and the camera so that the projector image can be projected onto the translucent desktop after being reflected by the mirror, and the camera can capture the complete translucent desktop image through the mirror;
[0032] S13, installing an infrared filter in front of the camera lens to filter the visible light image of the projector in the captured image, thereby improving the accuracy of the computer's recognition and detection of labels in the image;
[0033] S14. Use infrared light to illuminate the bottom of the translucent table so that the camera can capture images of the physical interactive objects.
[0034] Preferably, in said S2, the following steps are specifically included:
[0035] S21, calibrating the camera coordinate system and the projector coordinate system using a homography matrix camera calibration method;
[0036] S22. Select four groups of points, normalize the coordinates of the projector, calculate the homography matrix through the normalized coordinates of the projector and the camera coordinates of the virtual chessboard, and calibrate the projector coordinate system and the industrial camera coordinate system.
[0037] Preferably, in S3, the computer obtains the coordinates of the physical object based on the ArUco Marker according to the industrial camera image data, specifically including the following steps:
[0038] S31, predefine a 4×4_100 dictionary, and generate a unique ArUco Marker and ID for each physical object according to the markers contained in the dictionary;
[0039] S32, converting the image data of the physical object captured by the camera into Mat format data, and performing grayscale processing to obtain pre-processed image data;
[0040] S33, detecting the ID of each ArUco Marker in the image and the coordinates of its four corresponding corner points based on ArUco recognition;
[0041] S34. Obtain the two-dimensional coordinates of the physical object in the camera coordinate system by taking the average value of the coordinates of the four corner points.
[0042] Preferably, in S4, processing the flickering problem of tag recognition and filtering invalid coordinate information specifically includes the following steps:
[0043] S41, predefine a two-dimensional array to store all tag IDs in the previous frame image, and start timing;
[0044] S42, compare the real-time coordinate data with the previous frame; if the data changes, but the stabilization time does not exceed 0.3s, it is determined that the tag recognition is flickering, the invalid data is discarded, and the timing is restarted;
[0045] S43, if the data changes, but the stabilization time exceeds 0.3s, it is considered that the tag position change is caused by normal chess piece movement, the data is valid, the real-time tag data is stored in the two-dimensional array, and the timing is reset.
[0046] Preferably, in said S5, the following steps are specifically included:
[0047] S51, multiplying the two-dimensional coordinates of the physical object in the camera coordinate system by a pre-calibrated homography matrix to obtain a normalized two-dimensional coordinate in the projector coordinate system;
[0048] S52, multiplying the normalized two-dimensional coordinates by the size of the chessboard in the virtual world, assuming that the chess piece can only move within a plane, fixing the axis of the physical chess piece in the vertical direction of the chessboard, and obtaining the final three-dimensional world coordinates in the virtual world.
[0049] The physical interactive chess device based on spatial augmented reality of the present invention can more vividly experience the effect of chess game interaction, while retaining the original physical chess piece interaction, it can also experience the virtual-real fusion effect based on reality beyond reality.
[0050] Compared with the prior art, the advantages and positive effects of the present invention are:
[0051] 1. Combination of virtual and real. The present invention runs on a spatial augmented reality platform. Players use real chess pieces to play chess, and virtual dynamic effects will be dynamically superimposed during the process. Compared with purely virtual traditional PC games, it is more immersive and realistic.
[0052] 2. Natural interaction. Players can use physical chess pieces to complete all interactive operations in the game without wearing equipment and without interactive load. The interactive channel is completely consistent with the presentation channel. The interactive method is natural and efficient, which conforms to the development trend of human-computer interaction.
[0053] 3. Real experience. Players interact through physical chess pieces instead of third-party controllers, making the operation experience more realistic and immersive. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a hardware device diagram of a physical interactive chess device based on spatial augmented reality.
[0055] Figure 2 It is a software function flow chart of a physical interactive chess device based on spatial augmented reality.
[0056] Figure 3 It is a flow chart of the tag recognition interactive judgment algorithm of the present invention.
[0057] Figure 4 It is a flow chart of the physical interaction algorithm of the physical interaction chess device based on spatial augmented reality.
[0058] Figure 5 It is a chess interaction flow chart of the present invention.
[0059] Figure 6 It is a schematic diagram of the interaction effect of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods.
[0061] Step 1: Figure 1 The figure shows the overall hardware structure of the physical interactive chess device based on spatial augmented reality. The chess device of the present invention includes a projector 1, an industrial camera 2, a computer 3, physical chess pieces 4, a translucent projection table 5, a mirror 6, an infrared filter 7, and an infrared lamp 8. The mirror 6 is tilted and placed at the bottom of the translucent projection table 5. The industrial camera 2 and the projector 1 are connected to the computer 3. The viewing angles of the industrial camera 2 and the projector 1 are both facing the mirror 6. The projection area of the projector 1 is reflected by the mirror 6 and the complete projection image is projected onto the translucent projection table 5. The viewing angle of the industrial camera 2 can cover the entire bottom image of the translucent projection table 5 through the reflection of the mirror 6. The infrared filter 7 is installed in front of the lens of the industrial camera 2 to filter the visible light of the projector 1, and the infrared lamp 8 is placed at the bottom of the translucent projection table 5 to illuminate the industrial camera 2.
[0062] The physical chess piece 4 is a Chinese chess piece designed and produced by a 3D printer. An ArUco label with a unique identification function is attached to the bottom of the physical chess piece 4 and placed on the translucent projection table 5; the industrial camera 2 captures the label images of all the physical chess pieces 4 on the translucent projection table 5 in real time through the reflection of the mirror 6, and transmits the image to the computer 3; the computer 3 converts the position coordinate information of the physical chess piece 4 into the position on the chessboard in the virtual coordinate system through recognition detection and coordinate transformation, and generates an interactive effect according to the movement of the physical chess piece 4, and transmits the interactive effect to the projector 1, which projects the picture to the mirror 6 in real time, and then the mirror 6 reflects the projected picture to the back of the translucent projection table 5, so as to achieve a precisely aligned virtual-real fusion effect.
[0063] Step 2: Calibrate the coordinate system in the physical interactive chess device based on spatial augmented reality, and transform the coordinate system using homography. The present invention calibrates the camera coordinate system and the projector coordinate system. The projected virtual chessboard coordinates are normalized, and the default length and width are 1. The four corner coordinates of the chessboard are abstracted as (0,0)(0,1)(1,0)(1,1). The findHomography function and the actual target coordinates are used to calculate the Homography matrix using the coordinate points of the four corners, and then the actual coordinates in the virtual world are calculated according to the actual size of the virtual chessboard, and affine changes are performed.
[0064] Step 3: Identify the ID information and coordinates of physical chess pieces based on ArUco. Use an industrial camera to capture all the physical chess piece information on the projection desktop in real time and obtain the image of each frame of the physical object. Predefine a 4×4_100 ArUco dictionary, then use the predefined dictionary in the ArUco library to create a new Dictionary dictionary object, and use the getPredefinedDictionary function to specify the size and encoding content information of the ArUco Marker in the created dictionary object. The computer extracts the ID information of the physical interactive chess pieces and the image two-dimensional coordinate information of the four corner points of the ArUco tag based on the ArUco tag information in the image data, and uses the detectMarkers function to detect the ArUco Marker to obtain an array storing the four corner points of each detected ArUco tag and an array storing the ID corresponding to each tag. The coordinates of the four corner points are averaged to obtain the coordinates of the center point as the two-dimensional coordinates of the physical chess piece in the camera coordinate system.
[0065] Step 4: Figure 3The interactive judgment algorithm flow chart is shown in the figure. When the program is running, a global two-dimensional array is predefined to store all the label position information in the first frame image, and the time is recorded as start. When the label data of the next frame arrives, it is compared with the label data in the array. If the data changes, the time is obtained as end, and it is judged whether end-start is greater than 0.3s. If it is less than 0.3s, it is considered that the label recognition flickering is caused by moving the chess piece, and the coordinate data is invalid and not stored in the two-dimensional array; if it is greater than 0.3s, it is considered that the chess piece movement operation has been completed, the chessboard state has stabilized, the coordinate data is valid, and the stable chessboard position data is saved in the two-dimensional array, and the start time is re-acquired.
[0066] Step 5: According to the detection results, the data of the physical chess pieces on the entire virtual chessboard are obtained, and the obtained coordinate points are multiplied by the calibrated homography matrix to obtain the normalized coordinates of the physical chess pieces on the chessboard in the virtual world. It is assumed that the chess pieces can only move within the plane, and the axis of the physical chess pieces in the vertical direction of the chessboard is fixed to obtain the final three-dimensional world coordinates in the virtual world. At the same time, the virtual chessboard is divided into 10 rows and 9 columns, and the normalized coordinates are multiplied by the number of rows and columns to obtain the row and column information of each physical chess piece. All physical chess piece coordinates are stored in the corresponding subscript position in the two-dimensional array according to the converted row and column data.
[0067] Step 6: Based on all the real chess piece data received in real time, the chess piece data on the virtual chessboard stored in the virtual world is compared, and the information and position of the moving chess pieces are obtained through comparative analysis. According to the chess piece data and the starting and ending positions, interactive animation effects are generated, and finally projected through a projector, reflected by a mirror, and superimposed on the actual scene to achieve a virtual-real fusion effect.
[0068] like Figure 2 As shown, the software function flow of the physical interactive chess device based on spatial augmented reality is as follows:
[0069] S0, offline calibration of the homography relationship between the projector, industrial camera, and semi-transparent projection desktop to obtain the homography transformation matrix;
[0070] S1. Use an industrial camera to capture images of all physical chess pieces on the semi-transparent projection table in real time;
[0071] S2, performing image recognition through computer algorithms to extract physical chess piece information and coordinates;
[0072] S3, the computer changes the chess game status of the chessboard in the virtual world according to the extracted physical chess piece information and coordinates, thereby achieving the generation of interactive effects;
[0073] S4. Finally, use a projector to project the interactive effect onto a translucent projection table for display.
[0074] like Figure 4 As shown, the algorithm flow of the physical interaction chess device based on spatial augmented reality is as follows:
[0075] S1. Identify the ID information and coordinates of physical chess pieces based on ArUco. Use the predefined dictionary in the ArUco library to create a new Dictionary object, use the getPredefinedDictionary function to specify the size and encoding content information of the ArUco Marker in the created dictionary object, use the detectMarkers function to detect the ArUcoMarker, and get an array storing the four corner points of each detected ArUco tag and an array storing the ID corresponding to each tag. The coordinates of the four corner points are averaged to get the center point coordinates as the coordinates of the physical chess piece.
[0076] S2. Use homography to transform the coordinate system. The present invention calibrates the entire projection area and the virtual chessboard in the projection area respectively. The entire projection area and the chessboard are normalized, and the default length and width are 1. The four corner coordinates of the chessboard are abstracted as (0,0)(0,1)(1,0)(1,1). The coordinate points of these four corners are used to calculate the Homography matrix using the findHomography function and the actual target coordinates. Then, according to the actual size of the virtual chessboard and the resolution of the projection image, the actual coordinates in the virtual world are calculated and affine transformation is performed.
[0077] S3, virtual-real fusion presentation. The computer compares the real-world chess piece coordinates with the chess piece data on the virtual chessboard in the virtual world, analyzes the chess piece data moved by the user, generates the corresponding chess piece model animation in Unity, and finally uses a projector to accurately project the virtual effect onto the translucent projection desktop to achieve a virtual-real fusion presentation effect.
[0078] like Figure 5 As shown, the interactive process of chess is judged as follows:
[0079] First, determine whether the game of chess is still in progress. If so, compare the real-time physical chess piece data with the virtual chessboard data stored in the virtual world to determine whether the chess pieces on the chessboard have changed. If the chessboard data has changed, determine whether the opponent has performed a chess-playing operation when it is our turn to play. If so, an error animation is prompted. If not, compare whether there are two differences between the virtual and actual chess piece data. If not, it means that other chess pieces were accidentally touched during the move, and an error animation is prompted. If so, determine whether two chess pieces of the same side are picked up at the same time. If so, an error animation is prompted. If not, determine whether the chess piece movement is legal based on the starting and end positions of the chess piece movement. If legal, a moving interactive animation is generated. If illegal, an error animation is prompted.
[0080] In addition, as described above, this embodiment is described in detail, but a large number of modifications without substantially departing from the new matters and effects of the present invention can be performed, which is easy to understand for those skilled in the art. Therefore, such modifications are all included in the scope of the present invention. In addition, the method of the present invention can be applied to various game devices.
Claims
1. A physical interactive chess device based on spatial augmented reality, characterized in that: Projector, industrial camera, computer, infrared filter, physical interactive objects, semi-transparent projection table and mirror; The projector is used to project a projection image, and the projection image projected by the projector is reflected onto the translucent projection table through the mirror surface at the bottom of the translucent projection table; The industrial camera is used to capture the label information and position information images of all chess pieces on the projection table in real time. The industrial camera takes images from the bottom of the translucent glass projection table through mirror reflection and transmits the obtained images to the computer; The computer is used to construct a virtual chessboard and an interactive interface, create a virtual coordinate system, obtain all physical chess piece information on the semi-transparent projection desktop based on image information detection by an industrial camera, convert it into position information in the virtual coordinate system after coordinate transformation, and perform generation processing of the projection interactive effect image by changing the virtual object model; The infrared filter is fixed in front of the industrial camera lens to filter the visible light image projected by the projector during virtual-real fusion presentation, thereby improving the accuracy of the computer's recognition and detection of labels in the image; The physical interactive object is a 3D printed chess piece, which is used by players to directly interact with the projection system using the physical chess piece. An ArUco tag for identification and detection is attached to the bottom of the physical chess piece; The translucent projection table is used for players to place physical interactive chess pieces and for the projector to project interactive images; The mirror is placed at the bottom of the translucent projection table and is used to reflect the bottom picture of the real chess piece and the projected image.
2. The physical interactive chess device based on spatial augmented reality according to claim 1, characterized in that: It also includes an infrared lamp, which is used to illuminate the physical interactive object and cooperate with the infrared filter to complete the image shooting process of the industrial camera.
3. The physical interactive chess device based on spatial augmented reality according to claim 1, characterized in that: The translucent projection table is composed of table legs made by 3D printing and a translucent glass plane.
4. The physical interactive chess device based on spatial augmented reality according to claim 1, characterized in that: The industrial camera is Vision Datum LEO 1440S-166um; the projector model is Optoma DM3307.
5. The interactive method of the physical interactive chess device based on spatial augmented reality according to claim 1, characterized in that: The following steps are involved: S1. Design the chess interaction process according to the content and rules of Chinese chess, use computers to build a virtual chess board interaction interface, create a virtual coordinate system, and build a spatial augmented reality projection environment device; S2, calibrating the coordinate system in the physical interactive chess device based on spatial augmented reality; S3, using an industrial camera to capture all the physical chess pieces on the projection desktop in real time, obtaining images of each frame of the physical object, and extracting the ID information of the physical interactive chess pieces and the two-dimensional coordinate information of the four corner points of the ArUco tag based on the ArUco tag information in the image, and obtaining the coordinate information of the center point based on the coordinates of the four corner points; S4, handle the flickering problem of ArUco tag recognition when the physical chess piece moves, and filter invalid coordinate information; S5. Establish a virtual coordinate system consistent with the projection desktop in the virtual scene, multiply the obtained coordinate points by the calibrated homography matrix, obtain the normalized coordinates of the ArUco tag on the chessboard in the virtual world, and then calculate the actual coordinates in the virtual world according to the actual size of the chessboard to obtain the final coordinate information; S6. Putting the coordinate position of the movement of the physical chess piece into the virtual coordinate system generates an interactive effect of the movement of the physical chess piece, and projecting the generated interactive effect picture onto a semi-transparent projection table through a projector after mirror reflection, so as to achieve an effect of virtual-real fusion.
6. The interactive method of the physical interactive chess device based on spatial augmented reality according to claim 5, characterized in that: The device for constructing a spatial augmented reality projection environment specifically includes the following steps: S11, place the mirror at an angle under the translucent table, with the projector and camera facing the mirror; S12, adjusting the projector and the camera so that the projector image can be projected onto the translucent desktop after being reflected by the mirror, and the camera can capture the complete translucent desktop image through the mirror; S13, installing an infrared filter in front of the camera lens to filter the visible light image of the projector in the captured image, thereby improving the accuracy of the computer's recognition and detection of labels in the image; S14. Use infrared light to illuminate the bottom of the translucent table so that the camera can capture images of the physical interactive objects.
7. The interactive method of the physical interactive chess device based on spatial augmented reality according to claim 5, characterized in that: The method of calibrating the coordinate system in the physical interactive chess device based on spatial augmented reality specifically comprises the following steps: S21, calibrating the camera coordinate system and the projector coordinate system using a homography matrix camera calibration method; S22. Select four groups of points, normalize the coordinates of the projector, calculate the homography matrix through the normalized coordinates of the projector and the camera coordinates of the virtual chessboard, and calibrate the projector coordinate system and the industrial camera coordinate system.
8. The interactive method of the physical interactive chess device based on spatial augmented reality according to claim 5, characterized in that: The step of obtaining the coordinate information of the center point in S3 specifically includes the following steps: S31, predefine a 4×4_100 dictionary, and generate a unique ArUco Marker and ID for each physical object according to the markers contained in the dictionary; S32, converting the image data of the physical object captured by the camera into Mat format data, and performing grayscale processing to obtain pre-processed image data; S33, detecting the ID of each ArUco Marker in the image and the coordinates of its four corresponding corner points based on ArUco recognition; S34. Obtain the two-dimensional coordinates of the physical object in the camera coordinate system by taking the average value of the coordinates of the four corner points.
9. The interactive method of the physical interactive chess device based on spatial augmented reality according to claim 5, characterized in that: Deal with the flickering problem of ArUco tag recognition when the physical chess piece moves, and filter out invalid coordinate information; specifically include the following steps: S41, predefine a two-dimensional array to store all tag IDs in the previous frame image, and start timing; S42, compare the real-time coordinate data with the previous frame; if the data changes, but the stabilization time does not exceed 0.3s, it is determined that the tag recognition is flickering, the invalid data is discarded, and the timing is restarted; S43, if the data changes, but the stabilization time exceeds 0.3s, it is considered that the tag position change is caused by normal chess piece movement, the data is valid, the real-time tag data is stored in the two-dimensional array, and the time is reset.
10. The interactive method of the physical interactive chess device based on spatial augmented reality according to claim 5, characterized in that: A virtual coordinate system consistent with the projection desktop is established in the virtual scene, and the obtained coordinate points are multiplied by the calibrated homography matrix to obtain the normalized coordinates of the ArUco tag on the chessboard in the virtual world, and then the actual coordinates in the virtual world are calculated according to the actual size of the chessboard to obtain the final coordinate information; in said S5, the following steps are specifically included: S51, multiplying the two-dimensional coordinates of the physical object in the camera coordinate system by a pre-calibrated homography matrix to obtain a normalized two-dimensional coordinate in the projector coordinate system; S52, multiplying the normalized two-dimensional coordinates by the size of the chessboard in the virtual world, assuming that the chess piece can only move within a plane, fixing the axis of the physical chess piece in the vertical direction of the chessboard, and obtaining the final three-dimensional world coordinates in the virtual world.
