WO2023142555A1 - Data processing method and apparatus, computer device, storage medium, and computer program product - Google Patents

Data processing method and apparatus, computer device, storage medium, and computer program product Download PDF

Info

Publication number
WO2023142555A1
WO2023142555A1 PCT/CN2022/127674 CN2022127674W WO2023142555A1 WO 2023142555 A1 WO2023142555 A1 WO 2023142555A1 CN 2022127674 W CN2022127674 W CN 2022127674W WO 2023142555 A1 WO2023142555 A1 WO 2023142555A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
position information
target operation
coordinate system
sub
Prior art date
Application number
PCT/CN2022/127674
Other languages
French (fr)
Chinese (zh)
Inventor
周茗岩
杨阳
刘锦金
唐明勇
李若岱
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023142555A1 publication Critical patent/WO2023142555A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F3/00Board games; Raffle games
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J11/00Manipulators not otherwise provided for
    • B25J11/0005Manipulators having means for high-level communication with users, e.g. speech generator, face recognition means
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J11/00Manipulators not otherwise provided for
    • B25J11/003Manipulators for entertainment

Definitions

  • the embodiment of the present disclosure is based on the Chinese patent application with the application number 202210094470.3, the application date is January 26, 2022, and the application name is "data processing method and device, computer equipment and computer storage medium", and requires the Chinese patent application Priority, the entire content of the Chinese patent application is hereby incorporated by reference into this disclosure.
  • the present disclosure relates to but not limited to the field of human-computer interaction, and in particular relates to a data processing method and device, computer equipment, storage media and computer program products.
  • Embodiments of the present disclosure provide a data processing method and device, computer equipment, storage media, and computer program products.
  • An embodiment of the present disclosure provides a data processing method, the method including:
  • target operation information based on the second position information and preset operation rules of each of the objects, the target operation information including target operation objects, target operation instructions and target position information in the second coordinate system;
  • the target operation instruction is executed based on the target operation object and the target position information.
  • An embodiment of the present disclosure provides a data processing device, and the device includes:
  • a first acquisition part configured to acquire first position information of at least one object in the first coordinate system
  • a first conversion part configured to convert the first position information of each of the objects in the first coordinate system into second position information in a second coordinate system based on a first conversion parameter
  • the first determination part is configured to determine target operation information based on the second position information of each of the objects and preset operation rules, the target operation information including target operation objects, target operation instructions and Target location information in the system;
  • the first execution part is configured to execute the target operation instruction based on the target operation object and the target position information.
  • An embodiment of the present disclosure provides a computer device, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the above data processing method when executing the computer program.
  • An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the foregoing data processing method is implemented.
  • An embodiment of the present disclosure provides a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program.
  • the computer program is read and executed by a computer device, the above data processing method is realized.
  • the first position information of at least one object in the first coordinate system by acquiring the first position information of at least one object in the first coordinate system; based on the first conversion parameter, the first position of each object in the first coordinate system is The information is converted into second position information in the second coordinate system; based on the second position information of each of the objects and the preset operation rules, target operation information is determined, the target operation information includes target operation objects, target operation instructions and target position information in the second coordinate system; based on the target operation object and the target position information, execute the target operation instruction.
  • the position in the first coordinate system can be converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate target operation objects, target operation instructions and Target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience.
  • FIG. 1 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of an implementation flow of a data processing method provided by an embodiment of the present disclosure
  • FIG. 4A is a schematic diagram of a data processing system provided by an embodiment of the present disclosure.
  • FIG. 4B is a schematic diagram of electrical connections between components of a playing robot provided by an embodiment of the present disclosure.
  • FIG. 4C is a top view of a playing robot provided by an embodiment of the present disclosure.
  • FIG. 4D is a schematic diagram of an observation screen of a camera when there is a user in front of a playing robot provided by an embodiment of the present disclosure
  • FIG. 4E is a schematic flow diagram of a chess playing robot provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of the composition and structure of a data processing device provided by an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present disclosure.
  • first ⁇ second ⁇ third are used to distinguish similar objects, and do not represent a specific ordering of objects. Understandably, “first ⁇ second ⁇ third” is allowed The specific order or sequence may be interchanged under certain circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein.
  • the embodiment of the present disclosure provides a data processing method, which converts the position in the first coordinate system into the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate Target operation objects, target operation instructions, and target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience.
  • the data processing method provided by the embodiments of the present disclosure may be executed by a computer device. Exemplary applications of the computer equipment proposed by the embodiments of the present disclosure are described below.
  • the computer equipment proposed in the embodiments of the present disclosure can be implemented as a mobile phone terminal, a notebook computer, a tablet computer, an interactive robot (for example, a game robot, a drawing robot, etc.), other online game platforms, a server, a desktop computer, a smart TV, a vehicle-mounted device, and industrial equipment, etc.
  • the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, intermediate Cloud servers for basic cloud computing services such as mail service, domain name service, security service, content delivery network (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
  • Fig. 1 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure. As shown in Fig. 1, the method includes steps S11 to S14, wherein:
  • Step S11 Obtain first position information of at least one object in the first coordinate system.
  • the object may be an object of any suitable scene.
  • the object in a game playing scene, the object may be a Gomoku piece, a Xiangqi piece, a Go piece, etc.
  • the object in a drawing scene, the object may be a paintbrush, a graphic, an eraser, and the like.
  • the first coordinate system may include, but not limited to, a pixel coordinate system, an image coordinate system, a camera coordinate system, a world coordinate system, and the like.
  • the pixel coordinate system can take the upper left corner of the image as the origin, and the u-axis and v-axis are parallel to the coordinate system on both sides of the image, and (u, v) represent its coordinate value, u represents the row where the image is located, and v represents the position of the image column.
  • the image coordinate system can take the center of the image as the coordinate origin, and the X axis and the Y axis are parallel to both sides of the image, and (x, y) can be used to represent the coordinate value of the object.
  • the camera coordinate system is centered on the optical center of the camera, and the optical axis of the camera is perpendicular to the image plane.
  • the world coordinate system is introduced to describe the position of the camera, and the rotation in any dimension can be expressed as the product of the coordinate vector and the appropriate square matrix.
  • those skilled in the art may select an appropriate first coordinate system according to actual conditions, which is not limited by the embodiments of the present disclosure.
  • the first coordinate system may be a camera coordinate system.
  • the first position information of each object can be acquired through a camera module, a sensor, an infrared sensor, and the like.
  • the robot acquires the first location information after receiving the operation instruction.
  • the operation instruction is used to indicate that the robot is currently operating.
  • the operation instruction may be that the user presses a first button, and the first button may be a physical button or a virtual button.
  • the first key may be any suitable key, for example, a start key, a start key, a finish key, a chess key, and the like.
  • the operation instruction may also be a gesture operation, a voice operation, a somatosensory operation, etc. performed by the user.
  • Step S12 Based on the first transformation parameters, transform the first position information of each object in the first coordinate system into the second position information in the second coordinate system.
  • the first conversion parameter may be preset, or may be calculated by means of calibration, comparison, and the like.
  • the second coordinate system may include, but not limited to, an image coordinate system, a pixel coordinate system, and the like.
  • an image coordinate system a pixel coordinate system
  • those skilled in the art can select an appropriate second coordinate system according to the actual situation, which is not limited by the embodiments of the present disclosure.
  • the second coordinate system may be a chessboard image coordinate system.
  • the first conversion parameter may be pre-stored in the computer device, or stored in the cloud or other terminals.
  • the computer device converts the first position information into the second position information according to the first conversion parameter.
  • the computer device sends the first location information to other terminals, so that other terminals convert the first location information into second location information according to the first conversion parameter, and convert the first location information to the second location information. The second location information is returned to the computer device.
  • Step S13 Determine target operation information based on the second position information of each object and preset operation rules, where the target operation information includes target operation objects, target operation instructions, and target position information in the second coordinate system.
  • the preset operating rules may include but not limited to game rules, drawing rules, and the like.
  • the preset operation rule may be determined according to an actual interaction scenario, which is not limited in this embodiment of the present disclosure.
  • the scene information may be determined based on the first location information. For example, in a case where the first position information includes the position information of backgammon, it may be determined that the scene is a backgammon scene. For another example, in a case where the first position information includes a graphic position, it may be determined that the scene is a drawing scene.
  • a mapping table of the corresponding relationship between the scene information and the preset operation rules may be established in advance, and the mapping table may be stored in a computer device or other terminals.
  • the computer device determines in the mapping table a preset operation rule matching the scene information according to the scene information.
  • the computer device sends the scene information to other terminals, so that other terminals determine the preset operation rules matching the scene information in the mapping table according to the scene information, and send the preset operation rules Return to the computer device.
  • the computer device searches the mapping table for the preset operation rules matching the backgammon scene to be the backgammon game rules according to the backgammon scene.
  • the computer device searches the mapping table for a preset operation rule matching the drawing scene as a drawing rule according to the drawing scene.
  • the target operand can be any suitable scene object.
  • the target operation object may be a chess piece or the like.
  • the target operation object may be a paintbrush, a graphic, an eraser, and the like.
  • Target operation instructions may include, but are not limited to, instructions to play chess, to capture chess, to draw, to move, to erase, and so on.
  • the target operation instruction may be determined according to an actual interaction scenario, which is not limited in this embodiment of the present disclosure.
  • step 13 when the preset operating rules include game rules, the object includes chess pieces, and the target operation object includes target chess pieces, the above-mentioned step 13 includes step S131, wherein:
  • Step S131 based on the second position information of each chess piece and the rules of the game, determine the target chess piece, the target operation instruction and the target position information in the second coordinate system.
  • the computer device may be a playing robot.
  • the target operation instruction may include, but not limited to, an instruction to play chess, an instruction to capture chess, and the like.
  • step 13 when the preset operation rules include drawing rules, the object includes graphics, and the target operation object includes target graphics, the above step 13 includes step S132, wherein:
  • Step S132 based on the second position information and drawing rules of each figure, determine the target figure, the target operation instruction and the target position information in the second coordinate system.
  • the computer device includes a drawing robot.
  • Target operation instructions may include, but are not limited to, drawing operations, moving operations, erasing operations, and the like.
  • Step S14 based on the target operation object and the target position information, execute the target operation instruction.
  • the computer device controls a corresponding hardware device such as a robotic arm or a manipulator to execute the target operation instruction.
  • the target operation object includes the target chess piece, and the computer device controls the mechanical arm to place the target chess piece at the target position.
  • the target operation object includes the first chess piece and the second chess piece, and the computer device controls the mechanical arm to move the first chess piece to the position of the second chess piece.
  • the target operation object includes a target figure, and the computer device controls the mechanical arm to draw the target figure starting from the target position.
  • the first position information of at least one object in the first coordinate system by obtaining the first position information of at least one object in the first coordinate system; based on the first conversion parameter, the first position information of each object in the first coordinate system is converted into the second coordinate system
  • the second position information in the system based on the second position information of each object and the preset operation rules, determine the target operation information, the target operation information includes the target operation object, the target operation instruction and the target position information in the second coordinate system ; Execute the target operation instruction based on the target operation object and the target position information.
  • the position in the first coordinate system can be converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate target operation objects, target operation instructions and Target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience.
  • Fig. 2 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure. As shown in Fig. 2, the data processing method includes steps S21 to S25, wherein:
  • Step S21 acquiring image information collected by the camera module.
  • the computer device may have a built-in camera module or an external camera module.
  • the camera module is used to collect image information of the target area.
  • the target area may include, but is not limited to, a playing area on a virtual chessboard, a playing area on a physical chessboard, a virtual drawing area, a physical drawing area, and the like.
  • the camera module can be any suitable device capable of capturing images.
  • the camera module may be a common camera or video camera, or a wide-angle module with extreme wide-angle shooting.
  • the image information may be an unprocessed image directly collected by the camera module, or an image collected by the camera module and processed by a computer device.
  • Step S22 Based on the image information, first position information of each object in the first coordinate system is acquired.
  • a suitable recognition algorithm may be used to recognize the image information, so as to obtain the first position information of each object.
  • a suitable recognition algorithm may be used to recognize the image information, so as to obtain the first position information of each object.
  • OCR Optical Character Recognition
  • object detection algorithm based on deep learning, etc.
  • those skilled in the art can select an appropriate recognition algorithm according to actual conditions, which is not limited by the embodiments of the present disclosure.
  • Step S23 Based on the first transformation parameters, transform the first position information of each object in the first coordinate system into the second position information in the second coordinate system.
  • Step S24 Determine target operation information based on the second position information of each object and preset operation rules, where the target operation information includes target operation objects, target operation instructions, and target position information in the second coordinate system.
  • Step S25 based on the target operation object and the target position information, execute the target operation instruction.
  • steps S23 to S25 correspond to the above-mentioned steps S12 to S14, and for implementation, reference may be made to the specific implementation manners of the above-mentioned steps S12 to S14.
  • the method also includes step S26, wherein:
  • Step S26 calibrate the camera module, and determine the first conversion parameter.
  • the first conversion parameters may include but not limited to internal parameters, distortion parameters, external parameters, or other conversion matrices of the camera module.
  • the internal reference of the camera module is an inherent parameter of the camera module, and the inherent parameter can be obtained from the manufacturer, or can be obtained by calibrating the camera module.
  • the distortion parameter is used to correct the image distortion caused by the characteristics of the camera module itself. For example, lens distortion, which is caused by the irregular refraction of the lens of the camera module due to the passage of light.
  • the camera module can be calibrated using a linear calibration method, a nonlinear optimization calibration method, a Zhang Zhengyou calibration method, a checkerboard calibration method, a corner point calibration method, a camera calibration method, or other calibration methods to obtain the first A transformation parameter.
  • the embodiment of the present disclosure does not limit the calibration method, as long as the first conversion parameter can be acquired.
  • the image information collected by the camera module is obtained; based on the image information, the first position information of each object in the first coordinate system is obtained; The first position information in the coordinate system is converted into the second position information in the second coordinate system; based on the second position information of each object and preset operation rules, target operation information is determined, and the target operation information includes the target operation object, A target operation instruction and target position information in the second coordinate system; based on the target operation object and the target position information, execute the target operation instruction.
  • the position in the first coordinate system is converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the position of the object in different coordinate systems,
  • target operation instruction and target position information In order to obtain more accurate target operation object, target operation instruction and target position information, thereby further improving the accuracy of target operation instruction execution.
  • Fig. 3 is a schematic flow diagram of a data processing method provided by an embodiment of the present disclosure. As shown in Fig. 3, the method includes steps S31 to S35, wherein:
  • Step S31 acquiring first position information of at least one object in the first coordinate system.
  • Step S32 Based on the first transformation parameters, transform the first position information of each object in the first coordinate system into the second position information in the second coordinate system.
  • Step S33 Determine target operation information based on the second position information of each object and preset operation rules, where the target operation information includes target operation objects, target operation instructions, and target position information in the second coordinate system.
  • the above-mentioned steps S31 to S33 correspond to the above-mentioned steps S11 to S13, and for implementation, reference may be made to the specific implementation manners of the above-mentioned steps S11 to S13.
  • Step S34 based on the second transformation parameters, transform the target position information into third position information in the third coordinate system.
  • the second conversion parameter may be preset, or may be calculated by means of calibration, comparison, and the like.
  • the second conversion parameter may include but not limited to a conversion matrix and the like.
  • a hand-eye calibration method may be used for calibration to obtain the second conversion parameter.
  • the embodiment of the present disclosure does not limit the calibration method, as long as the second conversion parameter can be acquired.
  • the third coordinate system may include but not limited to a space coordinate system, an image coordinate system, and the like.
  • the third coordinate system may be a mechanical arm coordinate system.
  • Step S35 based on the target operation object and the third position information, execute the target operation instruction.
  • the target operation instruction may include, but not limited to, a chess-playing instruction, a chess-capture instruction, a drawing instruction, an erasing instruction, a moving instruction, and the like.
  • step S35 when the target operation instruction includes a chess playing instruction, the third position information includes the third sub-position of the target chess piece, and the above step S35 includes step S351, wherein:
  • Step S351 controlling the mechanical arm of the playing robot to place the target chess piece at the third sub-position.
  • the computer device may be a playing robot, and the playing robot includes at least a mechanical arm.
  • the playing robot controls the mechanical arm to grab the target chess piece, it moves to the third position information and releases the target chess piece, so as to place the target chess piece at the third position.
  • the playing robot can control the movement of the mechanical arm, grab a black chess from the box containing the black chess, and move to the third sub-position for release.
  • the target operation instruction includes a capture chess instruction
  • the target chess piece includes a first chess piece and a second chess piece
  • the third position information includes the first piece position of the first chess piece and the second piece of the second chess piece.
  • Step S361 based on the position of the first piece, control the mechanical arm to take away the first chess piece.
  • the computer device may be a playing robot, and the playing robot includes at least a mechanical arm.
  • the first pawn may be an opponent's pawn.
  • Step S362 based on the second sub-position, controlling the mechanical arm to grab the second chess piece and move the second chess piece to the first sub-position.
  • the second chess piece may be one's own chess piece.
  • the playing robot can take the opponent's pieces first and then put its own pieces, or put its own pieces first and then take the opponent's pieces, which is not limited in the embodiments of the present disclosure.
  • the playing robot can control the movement of the mechanical arm, first take away the “cannon” (the first chess piece) from the opponent's first sub-position, and then grab the “horse” (the second pawn) from the second sub-position. Chess piece), and this "horse” (second chess piece) is moved to the first piece position.
  • step S35 includes at least one of step S371 to step S373:
  • Step S371 if the target operation instruction includes a drawing instruction, control the mechanical arm of the drawing robot to draw the target figure according to the target position information.
  • the computer device may be a drawing robot, and the drawing robot includes at least a mechanical arm.
  • the drawing instruction may include, but not limited to, drawing a circle, drawing a line segment, drawing a curve, drawing a point, and the like.
  • the target location information may include but not limited to at least one of a start location, a center location, an end location, and the like.
  • the drawing robot controls the mechanical arm to draw a circle at the initial position.
  • the drawing robot controls the mechanical arm to draw a line segment from the start position to the end position.
  • Step S372 if the target operation instruction includes an erase instruction, control the mechanical arm of the drawing robot to erase the target figure at the target position.
  • the erasing instruction may include, but not limited to, erasing a circle, erasing a line segment, erasing a curve, erasing a point, and the like.
  • the target location information may include but not limited to at least one of a start location, a center location, an end location, and the like.
  • the drawing robot controls the mechanical arm to erase the curve from the start position to the end position.
  • Step S373 if the target operation instruction includes a movement instruction, obtain the fourth sub-position and the fifth sub-position in the target position information, and control the mechanical arm of the drawing robot to move the target figure at the fourth sub-position to the fifth sub-position. sublocation.
  • the erasing instruction may include, but not limited to, a moving circle, a moving line segment, a moving curve, a moving point, and the like.
  • the target location information includes at least a fourth sub-location and a fifth sub-location.
  • the fourth sub-position can be the original position
  • the fifth sub-position can be the placed position.
  • the fourth sub-position and the fifth sub-position may be at least one of a start position, a center position, an end position, and the like.
  • the drawing robot controls the mechanical arm to be located at the first initial position (the fourth sub-position ) point moves to the second starting position (fifth sub-position).
  • the method also includes step S36, wherein:
  • Step S36 calibrate the mechanical arm of the robot, and determine the second conversion parameters.
  • the computer device may be a robot including at least a robot arm.
  • the second conversion parameter may include but not limited to a conversion matrix and the like.
  • the robotic arm may be calibrated using a linear calibration method, a nonlinear optimization calibration method, a hand-eye calibration method or other calibration methods to obtain the second transformation parameter.
  • the embodiment of the present disclosure does not limit the calibration method, as long as the second conversion parameter can be acquired.
  • the first position information of at least one object in the first coordinate system is acquired; based on the first conversion parameter, the first position information of each object in the first coordinate system is converted into the second coordinate system The second position information in the system; based on the second position information of each object and the preset operation rules, determine the target operation information, the target operation information includes the target operation object, the target operation instruction and the target position information in the second coordinate system ; Based on the second conversion parameter, converting the target position information into third position information in the third coordinate system; based on the target operation object and the third position information, executing the target operation instruction.
  • the position in the second coordinate system is converted to the position in the third coordinate system through the second conversion parameter, so as to realize the unification of the position of the object in different coordinate systems, so as to obtain a more accurate target Operation objects, target operation instructions and target location information, thereby further improving the accuracy of target operation instructions execution.
  • FIG. 4A is a schematic diagram of a data processing system provided by an embodiment of the present disclosure.
  • the data processing system 40 includes a calibration part 41 , an acquisition part 42 , a determination part 43 and an execution part 44 .
  • the calibration part 41 is configured to determine the first conversion parameter and the second conversion parameter based on the calibration method.
  • the acquisition part 42 is configured to acquire first position information of at least one object in the first coordinate system.
  • the determining part 43 is configured to convert the first position information of each object in the first coordinate system into the second position information in the second coordinate system based on the first transformation parameter, and based on the The second location information and the preset operation rule determine the target operation information, and the target operation information includes the target operation object, the target operation instruction and the target location information.
  • the executing part 44 is configured to convert the target position information into third position information in the third coordinate system based on the second conversion parameter, and execute the target operation instruction based on the target operation object and the third position information.
  • the calibration part 41 includes: an initialization part and a conversion part.
  • the initialization part is used for initializing the first coordinate system, the second coordinate system and the third coordinate system.
  • the conversion part is used to determine a first conversion parameter between the first coordinate system and the second coordinate system, and a second conversion parameter between the second coordinate system and the third coordinate system based on the calibration method.
  • the vision module coordinate system (first coordinate system), the chessboard coordinate system (second coordinate system) and the robot arm coordinate system (third coordinate system), and determine the visual coordinate system based on the hand-eye calibration method.
  • the module coordinate system is transformed into the first transformation parameter of the chessboard coordinate system, and the second transformation parameter of the chessboard coordinate system into the manipulator coordinate system is determined.
  • the unification of the visual module coordinate system and the mechanical arm coordinate system is realized.
  • the robotic arm adopts a three-axis robotic arm, and a position sensor is added for each degree of freedom of each robotic arm, and the forward and reverse solutions of the three-axis robotic arm are used to calibrate the robotic arm.
  • the acquisition part 42 is further configured to: acquire the image information collected by the camera module; and based on the image information, acquire the first position information of each object in the first coordinate system.
  • FIG. 4B is a schematic diagram of the electrical connection between components of a playing robot 400 provided by an embodiment of the present disclosure.
  • the central processing unit, controller, etc. which are electrically connected to the camera 402, and can receive the chessboard information and target object information captured by the camera 402, and calculate and issue the control robot arm 403 according to the received chessboard information and target object information.
  • Action instructions or signals; the processing unit 402 is electrically connected to the robotic arm 403, and can send instructions or signals to control the action of the robotic arm 403 to the corresponding drive unit of the robotic arm 403 to drive the robotic arm 403 to move.
  • the opposing target of the game robot refers to an object that needs to interact with the game robot and is located opposite the game robot.
  • the object may be a user, a doll, another game robot, etc., which is not limited in this embodiment of the present disclosure.
  • FIG. 4C is a top view of a game playing robot provided by an embodiment of the present disclosure.
  • the chess piece 405 is released, and the camera 402 can capture information on the chessboard 404 and user information.
  • any one of the mechanical arms 403 can be used to grab and release the chess pieces 405, while the other mechanical arm 403 can perform some actions in spare time to interact with the user .
  • Fig. 4D is a schematic diagram of the observation screen of the camera when there is a user in front of a game robot provided by an embodiment of the present disclosure.
  • the photographable area 406 of the camera 402 includes a first side 4061 and a second side perpendicular to each other In the side 4062, the length of the first side 4061 is greater than the length of the second side 4062, and the second side 4062 is parallel to the horizontal direction. Furthermore, the photographable area 406 of the camera 402 is vertical along the direction of the first side 4061, and the direction along the second side 4062 is horizontal, and the photographable area 406 of the camera 402 is along the direction of the first side 4061.
  • the length is relatively long, which can well adapt to the long-distance shooting requirements of the chessboard 404 and the user 407; correspondingly, the length of the camera 402's shooting area 406 along the direction of the second side 4062 is relatively short, ensuring horizontal shooting Under the premise of demand, shooting resources will not be wasted.
  • the executing part 44 is further configured to: convert the target position information into third position information in the third coordinate system based on the second transformation parameter; based on the target operation object and the third position information , execute the target operation instruction.
  • the determining part 43 is further configured to: based on the second position information of each chess piece and The game rules determine the target chess pieces, target operation instructions and target position information in the second coordinate system.
  • the third position information includes the third sub-position of the target chess piece
  • the execution part 44 is also configured to: control the mechanical arm of the playing robot to place the target chess piece The pawn is placed on the third piece position.
  • the target operation instruction includes a capture chess instruction
  • the target chess piece includes a first chess piece and a second chess piece
  • the third position information includes the first piece position of the first chess piece and the second piece of the second chess piece.
  • the execution part 44 is also configured to: based on the first sub-position, control the mechanical arm to take the first chess piece; based on the second sub-position, control the mechanical arm to grab the second chess piece, and move the second chess piece to first child position.
  • the determining part 43 is further configured to: based on the second position information of each graphic and The drawing rules determine the target graphics, target operation instructions and target position information in the second coordinate system.
  • the executing part 44 is further configured as at least one of the following: when the target operation instruction includes a drawing instruction, control the mechanical arm of the drawing robot to draw the target figure according to the target position information; In the case of including the erasing instruction, control the mechanical arm of the drawing robot to erase the target graphic at the target position; in the case of the target operation instruction including the movement instruction, obtain the fourth sub-position and the fifth sub-position in the target position information, and The mechanical arm of the drawing robot is controlled to move the target figure located at the fourth sub-position to the fifth sub-position.
  • the data processing system includes a cloud and a game robot
  • the cloud includes a calibration part 41 and a determination part 43
  • the game robot includes an acquisition part 42 and an execution part 44 .
  • the playing robot collects image information through the camera module, and sends the image information to the cloud. Then, based on the image information, the cloud obtains the first position information of each chess piece in the camera module coordinate system; based on the first conversion parameter, converts each first position information into a second position in the chessboard coordinate system information; based on each second position information and the rules of the game, determine the target chess piece, the target operation instruction and the target position information; based on the second conversion parameter, convert the target position information into the third position information in the mechanical arm coordinate system; The target chess piece, the target operation instruction and the third position information are returned to the playing robot. Finally, the playing robot executes the target operation instruction based on the target chess piece and the third position information.
  • the playing robot collects image information through the camera module, and sends the image information to the cloud. Then, based on the image information, the cloud obtains the first position information of each chess piece in the camera module coordinate system; based on the first conversion parameter, converts each first position information into a second position in the chessboard coordinate system Information; based on each second position information and game rules, determine the target chess pieces, target operation instructions and target position information, and return the target chess pieces, target operation instructions and target position information to the game robot. Finally, the playing robot converts the target position information into third position information in the coordinate system of the mechanical arm based on the second conversion parameter; based on the target chess piece and the third position information, executes the target operation instruction.
  • Fig. 4E is a schematic flow diagram of a chess playing robot provided by an embodiment of the present disclosure. As shown in Fig. 4E, the flow includes the following steps:
  • Step S41 the user plays chess
  • Step S42 The user presses the chess key to send the chess playing robot instruction
  • Step S43 The playing robot starts the camera module to collect image information, and sends the image information to the cloud;
  • Step S44 After the image recognition, coordinate transformation and analysis are performed on the cloud, the operation information is returned to the playing robot;
  • Step S45 The playing robot analyzes the operation information, and obtains the first chess piece and its first sub-position, the second chess piece and its second sub-position, and the capture command;
  • Step S46 the playing robot controls the mechanical arm to take away the first chess piece at the first sub-position
  • Step S47 The playing robot controls the mechanical arm to move to the second sub-position, takes away the second chess piece, and places it in the first sub-position;
  • Step S48 The chess-playing robot resets, prompts the user to play chess by means of voice, indicator lights, or buttons, and continues to execute step S41.
  • the person puts the chess pieces crookedly, and through the camera module, based on the definition of the chessboard coordinate system, accurate capture can be realized, and when placing the chess pieces, they can be accurately placed at the intersection of the chessboard grids. At this point, the "crooked grasp and correct release" is realized, which can improve the user's game experience.
  • FIG. 5 is a schematic structural diagram of a data processing device provided by an embodiment of the present disclosure.
  • the data processing device 50 includes a first An acquisition section 51 , a first conversion section 52 , a first determination section 53 , and a first execution section 53 .
  • the first acquiring part 51 is configured to acquire first position information of at least one object in the first coordinate system
  • the first conversion part 52 is configured to convert the first position information of each of the objects in the first coordinate system into a second position in the second coordinate system based on a first conversion parameter information;
  • the first determination part 53 is configured to determine target operation information based on the second position information and preset operation rules of each of the objects, the target operation information including the target operation object, the target operation instruction and the Target position information in the second coordinate system;
  • the first execution part 54 is configured to execute the target operation instruction based on the target operation object and the target position information.
  • the first acquisition part 51 is further configured to: acquire the image information collected by the camera module; based on the image information, acquire the first position of each of the objects in the first coordinate system information.
  • the device further includes: a second determining part configured to calibrate the camera module and determine the first conversion parameter.
  • the first execution part 54 is further configured to: convert the target position information into third position information in a third coordinate system based on the second conversion parameters; The object and the third location information are used to execute the target operation instruction.
  • the device further includes: a third determining part configured to calibrate the mechanical arm of the robot to determine the second conversion parameter.
  • the object when the preset operation rules include game rules, the object includes chess pieces, the target operation object includes target chess pieces, and the first determining part 53 is further configured to: based on each The second position information of the chess pieces and the game rules determine the target chess pieces, target operation instructions and target position information in the second coordinate system.
  • the third position information includes a third sub-position of the target chess piece
  • the first executing part 54 is further configured to: Controlling the mechanical arm of the playing robot to place the target chess piece at the third sub-position.
  • the target operation instruction includes a chess capture instruction
  • the target chess piece includes a first chess piece and a second chess piece
  • the third position information includes a first sub-position of the first chess piece and the second sub-position of the second chess piece
  • the first execution part 54 is also configured to: control the mechanical arm to take away the first chess piece based on the first sub-position; The second sub-position, controlling the mechanical arm to grab the second chess piece and move the second chess piece to the first sub-position.
  • the first determining part 53 is further configured to: based on each A second position information and drawing rule of the graphic, to determine the target graphic, the target operation instruction and the target position information in the second coordinate system.
  • the first execution part 54 is further configured as at least one of the following: when the target operation instruction includes a drawing instruction, control the mechanical arm of the drawing robot to follow the target position information drawing the target graphic; in the case where the target operation instruction includes an erasing instruction, controlling the mechanical arm of the drawing robot to erase the target graphic of the target position information; when the target operation instruction includes a movement instruction In the case of , the fourth sub-position and the fifth sub-position in the target position information are obtained, and the mechanical arm of the drawing robot is controlled to move the target figure located at the fourth sub-position to the fifth sub-position. sublocation.
  • a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a unit, a module or a non-modular one.
  • the above data processing method is implemented in the form of software function modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
  • a software product which is stored in a storage medium and includes several instructions to make a
  • An electronic device which may be a personal computer, a server, or a network device, etc.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk.
  • embodiments of the present disclosure are not limited to any specific combination of hardware and software.
  • An embodiment of the present disclosure provides a computer device, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the above method when executing the computer program.
  • An embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the foregoing method is implemented.
  • the computer readable storage medium may be transitory or non-transitory.
  • An embodiment of the present disclosure provides a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, a part or part of the above-mentioned method is implemented. All steps.
  • the computer program product can be specifically realized by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in some embodiments, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
  • FIG. 6 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present disclosure.
  • the hardware entity of the computer device 600 includes: a processor 601, a communication interface 602, and a memory 603, wherein:
  • Processor 601 generally controls the overall operation of computer device 600 .
  • the communication interface 602 enables the computer device to communicate with other terminals or servers through the network.
  • the memory 603 is configured to store instructions and applications executable by the processor 601, and can also cache data to be processed or already processed by the processor 601 and various parts of the computer device 600 (for example, image data, audio data, voice communication data and Video communication data) can be realized by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission may be performed between the processor 601 , the communication interface 602 and the memory 603 through the bus 604 .
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are schematic.
  • the division of the units is a logical function division.
  • the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • all the functional units in the embodiments of the present disclosure may be integrated into one processing unit, each unit may be used as a single unit, or two or more units may be integrated into one unit; the above-mentioned integrated
  • the unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
  • the above-mentioned integrated units of the present disclosure are realized in the form of software function modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
  • the computer software product is stored in a storage medium and includes several instructions to make a An electronic device (which may be a personal computer, a server, or a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.
  • Embodiments of the present disclosure provide a data processing method and device, a computer device, a storage medium, and a computer program product, wherein the method includes: acquiring first position information of at least one object in a first coordinate system; parameters, transforming the first position information of each object in the first coordinate system into the second position information in the second coordinate system; based on the second position information of each object and preset operation rules, determine the target operation information , the target operation information includes the target operation object, the target operation instruction and the target position information in the second coordinate system; based on the target operation object and the target position information, execute the target operation instruction.
  • the position in the first coordinate system is converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate target operation objects, target operation instructions and Target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Manipulator (AREA)

Abstract

Embodiments of the present disclosure provide a data processing method and apparatus, a computer device, a storage medium, and a computer program product. The method comprises: obtaining first position information of at least one object in a first coordinate system; on the basis of a first conversion parameter, converting the first position information of each object in the first coordinate system into second position information in a second coordinate system; determining target operation information on the basis of the second position information of each object and a preset operation rule, the target operation information comprising a target operation object, a target operation instruction, and target position information in the second coordinate system; and executing the target operation instruction on the basis of the target operation object and the target position information.

Description

数据处理方法和装置、计算机设备、存储介质及计算机程序产品Data processing method and device, computer equipment, storage medium and computer program product
相关申请的交叉引用Cross References to Related Applications
本公开实施例基于申请号为202210094470.3、申请日为2022年01月26日、申请名称为“数据处理方法和装置、计算机设备及计算机存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。The embodiment of the present disclosure is based on the Chinese patent application with the application number 202210094470.3, the application date is January 26, 2022, and the application name is "data processing method and device, computer equipment and computer storage medium", and requires the Chinese patent application Priority, the entire content of the Chinese patent application is hereby incorporated by reference into this disclosure.
技术领域technical field
本公开涉及但不限于人机交互领域,尤其涉及一种数据处理方法和装置、计算机设备、存储介质及计算机程序产品。The present disclosure relates to but not limited to the field of human-computer interaction, and in particular relates to a data processing method and device, computer equipment, storage media and computer program products.
背景技术Background technique
随着计算机和机器人技术的发展,能够实现与人进行交互的机器人逐渐有了很大的市场需求。相关技术中,机器人在制动过程中因受多种因素的影响,容易造成操作位置(如抓取位置或绘制位置等)的偏差。With the development of computer and robot technology, there is a great market demand for robots that can interact with people. In related technologies, the robot is affected by various factors during the braking process, which may easily cause deviations in operating positions (such as grasping positions or drawing positions, etc.).
发明内容Contents of the invention
本公开实施例提供一种数据处理方法和装置、计算机设备、存储介质及计算机程序产品。Embodiments of the present disclosure provide a data processing method and device, computer equipment, storage media, and computer program products.
本公开实施例的技术方案是这样实现的:The technical scheme of the embodiment of the present disclosure is realized in this way:
本公开实施例提供一种数据处理方法,所述方法包括:An embodiment of the present disclosure provides a data processing method, the method including:
获取至少一个对象在第一坐标系中的第一位置信息;Acquiring first position information of at least one object in the first coordinate system;
基于第一转换参数,将每一所述对象在所述第一坐标系中的所述第一位置信息转换为在第二坐标系中的第二位置信息;converting the first position information of each of the objects in the first coordinate system to second position information in a second coordinate system based on a first conversion parameter;
基于每一所述对象的第二位置信息和预设操作规则,确定目标操作信息,所述目标操作信息包括目标操作对象、目标操作指令和在所述第二坐标系中的目标位置信息;determining target operation information based on the second position information and preset operation rules of each of the objects, the target operation information including target operation objects, target operation instructions and target position information in the second coordinate system;
基于所述目标操作对象和所述目标位置信息,执行所述目标操作指令。The target operation instruction is executed based on the target operation object and the target position information.
本公开实施例提供一种数据处理装置,所述装置包括:An embodiment of the present disclosure provides a data processing device, and the device includes:
第一获取部分,被配置为获取至少一个对象在第一坐标系中的第一位置信息;a first acquisition part configured to acquire first position information of at least one object in the first coordinate system;
第一转换部分,被配置为基于第一转换参数,将每一所述对象在所述第一坐标系中的所述第一位置信息转换为在第二坐标系中的第二位置信息;a first conversion part configured to convert the first position information of each of the objects in the first coordinate system into second position information in a second coordinate system based on a first conversion parameter;
第一确定部分,被配置为基于每一所述对象的第二位置信息和预设操作规则,确定目标 操作信息,所述目标操作信息包括目标操作对象、目标操作指令和在所述第二坐标系中的目标位置信息;The first determination part is configured to determine target operation information based on the second position information of each of the objects and preset operation rules, the target operation information including target operation objects, target operation instructions and Target location information in the system;
第一执行部分,被配置为基于所述目标操作对象和所述目标位置信息,执行所述目标操作指令。The first execution part is configured to execute the target operation instruction based on the target operation object and the target position information.
本公开实施例提供一种计算机设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述数据处理方法。An embodiment of the present disclosure provides a computer device, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the above data processing method when executing the computer program.
本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述数据处理方法。An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the foregoing data processing method is implemented.
本公开实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序被计算机设备读取并执行时,实现上述数据处理方法。An embodiment of the present disclosure provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer device, the above data processing method is realized.
在本公开实施例中,通过获取至少一个对象在第一坐标系中的第一位置信息;基于第一转换参数,将每一所述对象在所述第一坐标系中的所述第一位置信息转换为在第二坐标系中的第二位置信息;基于每一所述对象的第二位置信息和预设操作规则,确定目标操作信息,所述目标操作信息包括目标操作对象、目标操作指令和在所述第二坐标系中的目标位置信息;基于所述目标操作对象和所述目标位置信息,执行所述目标操作指令。这样,可以通过第一转换参数将第一坐标系中的位置转换为第二坐标系中的位置,实现对象在不同坐标系中位置的统一,以得到更加准确的目标操作对象、目标操作指令以及目标位置信息,从而提高目标操作指令执行的精准度,进而改善了用户的人机交互体验。In an embodiment of the present disclosure, by acquiring the first position information of at least one object in the first coordinate system; based on the first conversion parameter, the first position of each object in the first coordinate system is The information is converted into second position information in the second coordinate system; based on the second position information of each of the objects and the preset operation rules, target operation information is determined, the target operation information includes target operation objects, target operation instructions and target position information in the second coordinate system; based on the target operation object and the target position information, execute the target operation instruction. In this way, the position in the first coordinate system can be converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate target operation objects, target operation instructions and Target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience.
应当理解的是,以上的一般描述和后文的细节描述是示例性和解释性的,而非限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory in nature and are not restrictive of the disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1为本公开实施例提供的一种数据处理方法的实现流程示意图;FIG. 1 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure;
图2为本公开实施例提供的一种数据处理方法的实现流程示意图;FIG. 2 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure;
图3为本公开实施例提供的一种数据处理方法的实现流程示意图;FIG. 3 is a schematic diagram of an implementation flow of a data processing method provided by an embodiment of the present disclosure;
图4A为本公开实施例提供的一种数据处理系统的示意图;FIG. 4A is a schematic diagram of a data processing system provided by an embodiment of the present disclosure;
图4B为本公开实施例提供的一种对弈机器人的部件间电连接示意图;FIG. 4B is a schematic diagram of electrical connections between components of a playing robot provided by an embodiment of the present disclosure;
图4C为本公开实施例提供的一种对弈机器人的俯视图;FIG. 4C is a top view of a playing robot provided by an embodiment of the present disclosure;
图4D为本公开实施例提供的一种对弈机器人前方有用户时,摄像头的观察画面示意图;FIG. 4D is a schematic diagram of an observation screen of a camera when there is a user in front of a playing robot provided by an embodiment of the present disclosure;
图4E为本公开实施例提供的一种对弈机器人下棋的流程示意图;FIG. 4E is a schematic flow diagram of a chess playing robot provided by an embodiment of the present disclosure;
图5为本公开实施例提供的一种数据处理装置的组成结构示意图;FIG. 5 is a schematic diagram of the composition and structure of a data processing device provided by an embodiment of the present disclosure;
图6为本公开实施例中计算机设备的一种硬件实体示意图。FIG. 6 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present disclosure.
具体实施方式Detailed ways
为了使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开作进一步地详细描述,所描述的实施例不应视为对本公开的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. All other embodiments obtained under the premise of creative labor belong to the protection scope of the present disclosure.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, references to "some embodiments" describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.
在以下的描述中,所涉及的术语“第一\第二\第三”是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。In the following description, the terms "first\second\third" are used to distinguish similar objects, and do not represent a specific ordering of objects. Understandably, "first\second\third" is allowed The specific order or sequence may be interchanged under certain circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein.
除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开实施例的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of the present disclosure, and are not intended to limit the present disclosure.
随着计算机和机器人技术的发展,能够实现与人进行交互的机器人逐渐有了很大的市场需求。目前的交互机器人,一般主要是以工业机器人作为机械本体结合视觉,经研发人员的研发后,实现下棋、绘图等功能。但是,这种工业机器人作为机械本体的交互机器人成本极高,不能达到面向消费者的愿景。同时由于在人机交互过程中,机器人在制动过程中因受外界干扰、异常等多种因素的影响,容易造成机械臂抓取位置或绘制位置的偏差,如此不断叠加,使得用户体验效果不佳。With the development of computer and robot technology, there is a great market demand for robots that can interact with people. The current interactive robots generally use industrial robots as the mechanical body combined with vision. After research and development by R&D personnel, they can realize functions such as playing chess and drawing. However, the cost of this kind of industrial robot as an interactive robot of the mechanical body is extremely high, and it cannot achieve the vision for consumers. At the same time, in the process of human-computer interaction, the robot is affected by various factors such as external interference and abnormality during the braking process, which may easily cause deviations in the grasping position or drawing position of the robotic arm. Such continuous superposition makes the user experience effect not good. good.
本公开实施例提供一种数据处理方法,通过第一转换参数将第一坐标系中的位置转换为第二坐标系中的位置,实现对象在不同坐标系中位置的统一,以得到更加准确的目标操作对象、目标操作指令以及目标位置信息,从而提高目标操作指令执行的精准度,进而改善了用户的人机交互体验。本公开实施例提供的数据处理方法可以由计算机设备执行。下面说明本公开实施例提出的计算机设备的示例性应用。本公开实施例提出的计算机设备可以实施为手机终端、笔记本电脑、平板电脑、交互机器人(例如,对弈机器人、绘图机器人等)、其他线上游戏平台、服务器、台式计算机、智能电视、车载设备以及工业设备等。服务器可以是 独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。The embodiment of the present disclosure provides a data processing method, which converts the position in the first coordinate system into the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate Target operation objects, target operation instructions, and target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience. The data processing method provided by the embodiments of the present disclosure may be executed by a computer device. Exemplary applications of the computer equipment proposed by the embodiments of the present disclosure are described below. The computer equipment proposed in the embodiments of the present disclosure can be implemented as a mobile phone terminal, a notebook computer, a tablet computer, an interactive robot (for example, a game robot, a drawing robot, etc.), other online game platforms, a server, a desktop computer, a smart TV, a vehicle-mounted device, and industrial equipment, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, intermediate Cloud servers for basic cloud computing services such as mail service, domain name service, security service, content delivery network (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
下面,将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述。In the following, the technical solutions in the embodiments of the present disclosure will be clearly and completely described with reference to the drawings in the embodiments of the present disclosure.
图1为本公开实施例提供的一种数据处理方法的实现流程示意图,如图1所示,该方法包括步骤S11至步骤S14,其中:Fig. 1 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure. As shown in Fig. 1, the method includes steps S11 to S14, wherein:
步骤S11、获取至少一个对象在第一坐标系中的第一位置信息。Step S11. Obtain first position information of at least one object in the first coordinate system.
这里,对象可以是任意合适场景的对象。例如,在对弈场景中,该对象可以是五子棋的棋子、象棋的棋子、围棋的棋子等。又例如,在绘制场景中,该对象可以是画笔、图形、橡皮擦等。Here, the object may be an object of any suitable scene. For example, in a game playing scene, the object may be a Gomoku piece, a Xiangqi piece, a Go piece, etc. For another example, in a drawing scene, the object may be a paintbrush, a graphic, an eraser, and the like.
在一些实施方式中,第一坐标系可以包括但不限于像素坐标系、图像坐标系、相机坐标系、世界坐标系等。其中,像素坐标系可以是以图像左上角为原点,u轴和v轴分别平行于图像两边的坐标系,用(u,v)表示其坐标值,u表示图像所在的行,v表示图像所在的列。图像坐标系可以是以图像中心为坐标原点,X轴和Y轴平行于图像两边,可以用(x,y)表示物体的坐标值。相机坐标系是以摄像机光心为圆心,摄像机的光轴与图像平面垂直。世界坐标系是为了描述相机的位置而被引入的,任何维的旋转可以表示为坐标向量与合适的方阵的乘积。在实施时,本领域技术人员可以根据实际情况选取合适的第一坐标系,本公开实施例并不限定。例如,在对弈场景中,第一坐标系可以是相机坐标系。In some implementations, the first coordinate system may include, but not limited to, a pixel coordinate system, an image coordinate system, a camera coordinate system, a world coordinate system, and the like. Among them, the pixel coordinate system can take the upper left corner of the image as the origin, and the u-axis and v-axis are parallel to the coordinate system on both sides of the image, and (u, v) represent its coordinate value, u represents the row where the image is located, and v represents the position of the image column. The image coordinate system can take the center of the image as the coordinate origin, and the X axis and the Y axis are parallel to both sides of the image, and (x, y) can be used to represent the coordinate value of the object. The camera coordinate system is centered on the optical center of the camera, and the optical axis of the camera is perpendicular to the image plane. The world coordinate system is introduced to describe the position of the camera, and the rotation in any dimension can be expressed as the product of the coordinate vector and the appropriate square matrix. During implementation, those skilled in the art may select an appropriate first coordinate system according to actual conditions, which is not limited by the embodiments of the present disclosure. For example, in a game scene, the first coordinate system may be a camera coordinate system.
在一些实施方式中,可以通过摄像模组、传感器、红外感应等方式来获取每一对象的第一位置信息。In some implementations, the first position information of each object can be acquired through a camera module, a sensor, an infrared sensor, and the like.
在一些实施方式中,机器人在接收到操作指令之后,获取该第一位置信息。其中,操作指令用于指示当前由机器人操作。例如,该操作指令可以是用户按下第一按键,该第一按键可以是实体按键,也可以是虚拟按键。该第一按键可以是任意合适的按键,例如,开始键、开局键、完成键、下棋键等。又例如,该操作指令还可以是用户执行的手势操作、语音操作、体感操作等。In some implementations, the robot acquires the first location information after receiving the operation instruction. Wherein, the operation instruction is used to indicate that the robot is currently operating. For example, the operation instruction may be that the user presses a first button, and the first button may be a physical button or a virtual button. The first key may be any suitable key, for example, a start key, a start key, a finish key, a chess key, and the like. For another example, the operation instruction may also be a gesture operation, a voice operation, a somatosensory operation, etc. performed by the user.
步骤S12、基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息。Step S12. Based on the first transformation parameters, transform the first position information of each object in the first coordinate system into the second position information in the second coordinate system.
这里,第一转换参数可以是预先设置的,也可以是通过标定、对比等方式计算得到的。Here, the first conversion parameter may be preset, or may be calculated by means of calibration, comparison, and the like.
在一些实施方式中,第二坐标系可以包括但不限于图像坐标系、像素坐标系等。在实施 时,本领域技术人员可以根据实际情况选取合适的第二坐标系,本公开实施例并不限定。例如,在对弈场景中,第二坐标系可以是棋盘图像坐标系。In some implementations, the second coordinate system may include, but not limited to, an image coordinate system, a pixel coordinate system, and the like. During implementation, those skilled in the art can select an appropriate second coordinate system according to the actual situation, which is not limited by the embodiments of the present disclosure. For example, in a game scene, the second coordinate system may be a chessboard image coordinate system.
在一些实施方式中,该第一转换参数可以预先存储在计算机设备中,也可以存储在云端、或其它终端中。在第一转换参数存储在计算机设备的情况下,计算机设备根据该第一转换参数,将第一位置信息转换为第二位置信息。在第一转换参数存储在其它终端的情况下,计算机设备将第一位置信息发送给其它终端,使得其它终端根据该第一转换参数,将第一位置信息转换为第二位置信息,并将该第二位置信息返回至计算机设备中。In some embodiments, the first conversion parameter may be pre-stored in the computer device, or stored in the cloud or other terminals. In the case that the first conversion parameter is stored in the computer device, the computer device converts the first position information into the second position information according to the first conversion parameter. In the case that the first conversion parameter is stored in other terminals, the computer device sends the first location information to other terminals, so that other terminals convert the first location information into second location information according to the first conversion parameter, and convert the first location information to the second location information. The second location information is returned to the computer device.
步骤S13、基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,目标操作信息包括目标操作对象、目标操作指令和在第二坐标系中的目标位置信息。Step S13 : Determine target operation information based on the second position information of each object and preset operation rules, where the target operation information includes target operation objects, target operation instructions, and target position information in the second coordinate system.
这里,预设操作规则可以包括但不限于对弈规则、绘制规则等。在实施时,可以根据实际交互场景确定预设操作规则,本公开实施例不作限定。Here, the preset operating rules may include but not limited to game rules, drawing rules, and the like. During implementation, the preset operation rule may be determined according to an actual interaction scenario, which is not limited in this embodiment of the present disclosure.
在一些实施方式中,可以基于该第一位置信息,确定该场景信息。例如,在该第一位置信息包括五子棋的位置信息的情况下,可以确定该场景是五子棋场景。又例如,在该第一位置信息包括图形位置的情况下,可以确定该场景是画画场景。In some implementation manners, the scene information may be determined based on the first location information. For example, in a case where the first position information includes the position information of backgammon, it may be determined that the scene is a backgammon scene. For another example, in a case where the first position information includes a graphic position, it may be determined that the scene is a drawing scene.
在一些实施方式中,可以预先建立场景信息和预设操作规则这二者之间的对应关系的映射表,并将该映射表存储至计算机设备、或其它终端中。在映射表存储在计算机设备的情况下,计算机设备根据场景信息,在映射表中确定与场景信息匹配的预设操作规则。在映射表存储在其它终端的情况下,计算机设备将场景信息发送给其它终端,使得其它终端根据该场景信息,在映射表中确定与场景信息匹配的预设操作规则,并将预设操作规则返回至计算机设备中。In some implementation manners, a mapping table of the corresponding relationship between the scene information and the preset operation rules may be established in advance, and the mapping table may be stored in a computer device or other terminals. In the case that the mapping table is stored in the computer device, the computer device determines in the mapping table a preset operation rule matching the scene information according to the scene information. In the case that the mapping table is stored in other terminals, the computer device sends the scene information to other terminals, so that other terminals determine the preset operation rules matching the scene information in the mapping table according to the scene information, and send the preset operation rules Return to the computer device.
例如,在场景信息为五子棋场景的情况下,计算机设备根据该五子棋场景,在映射表中查找与五子棋场景匹配的预设操作规则为五子棋对弈规则。又例如,在场景信息为画画场景的情况下,计算机设备根据该画画场景,在映射表中查找与画画场景匹配的预设操作规则为画画规则。For example, when the scene information is a backgammon scene, the computer device searches the mapping table for the preset operation rules matching the backgammon scene to be the backgammon game rules according to the backgammon scene. For another example, when the scene information is a drawing scene, the computer device searches the mapping table for a preset operation rule matching the drawing scene as a drawing rule according to the drawing scene.
目标操作对象可以是任意合适场景的对象。例如,在对弈场景中,该目标操作对象可以是棋子等。又例如,在绘制场景中,该目标操作对象可以是画笔、图形、橡皮擦等。The target operand can be any suitable scene object. For example, in a chess game scenario, the target operation object may be a chess piece or the like. For another example, in a drawing scene, the target operation object may be a paintbrush, a graphic, an eraser, and the like.
目标操作指令可以包括但不限于下棋指令、吃棋指令、绘制指令、移动指令、擦除指令等。在实施时,可以根据实际交互场景确定目标操作指令,本公开实施例不作限定。Target operation instructions may include, but are not limited to, instructions to play chess, to capture chess, to draw, to move, to erase, and so on. During implementation, the target operation instruction may be determined according to an actual interaction scenario, which is not limited in this embodiment of the present disclosure.
在一些实施方式中,在预设操作规则包括对弈规则的情况下,对象包括棋子,目标操作对象包括目标棋子,上述步骤13包括步骤S131,其中:In some implementations, when the preset operating rules include game rules, the object includes chess pieces, and the target operation object includes target chess pieces, the above-mentioned step 13 includes step S131, wherein:
步骤S131、基于每一棋子的第二位置信息和对弈规则,确定目标棋子、目标操作指令 和在第二坐标系中的目标位置信息。Step S131, based on the second position information of each chess piece and the rules of the game, determine the target chess piece, the target operation instruction and the target position information in the second coordinate system.
这里,计算机设备可以是对弈机器人。目标操作指令可以包括但不限于下棋指令、吃棋指令等。Here, the computer device may be a playing robot. The target operation instruction may include, but not limited to, an instruction to play chess, an instruction to capture chess, and the like.
在一些实施方式中,在预设操作规则包括绘制规则的情况下,对象包括图形,目标操作对象包括目标图形,上述步骤13包括步骤S132,其中:In some implementations, when the preset operation rules include drawing rules, the object includes graphics, and the target operation object includes target graphics, the above step 13 includes step S132, wherein:
步骤S132、基于每一图形的第二位置信息和绘制规则,确定目标图形、目标操作指令和在第二坐标系中的目标位置信息。Step S132, based on the second position information and drawing rules of each figure, determine the target figure, the target operation instruction and the target position information in the second coordinate system.
这里,该计算机设备包括绘图机器人。目标操作指令可以包括但不限于绘制操作、移动操作、擦除操作等。Here, the computer device includes a drawing robot. Target operation instructions may include, but are not limited to, drawing operations, moving operations, erasing operations, and the like.
步骤S14、基于目标操作对象和目标位置信息,执行目标操作指令。Step S14, based on the target operation object and the target position information, execute the target operation instruction.
这里,根据应用场景,计算机设备控制对应的机械臂、机械手等硬件设备执行该目标操作指令。例如,在对弈场景中,目标操作对象包括目标棋子,计算机设备控制机械臂将目标棋子放置在目标位置。又例如,在对弈场景中,目标操作对象包括第一棋子和第二棋子,计算机设备控制机械臂将第一棋子移动至第二棋子的位置。还例如,在绘画场景中,目标操作对象包括目标图形,计算机设备控制机械臂以目标位置为起点绘制目标图形。Here, according to the application scenario, the computer device controls a corresponding hardware device such as a robotic arm or a manipulator to execute the target operation instruction. For example, in the game scene, the target operation object includes the target chess piece, and the computer device controls the mechanical arm to place the target chess piece at the target position. For another example, in the game scene, the target operation object includes the first chess piece and the second chess piece, and the computer device controls the mechanical arm to move the first chess piece to the position of the second chess piece. Also for example, in a painting scene, the target operation object includes a target figure, and the computer device controls the mechanical arm to draw the target figure starting from the target position.
本公开实施例中,通过获取至少一个对象在第一坐标系中的第一位置信息;基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息;基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,目标操作信息包括目标操作对象、目标操作指令和在第二坐标系中的目标位置信息;基于目标操作对象和目标位置信息,执行目标操作指令。这样,可以通过第一转换参数将第一坐标系中的位置转换为第二坐标系中的位置,实现对象在不同坐标系中位置的统一,以得到更加准确的目标操作对象、目标操作指令以及目标位置信息,从而提高目标操作指令执行的精准度,进而改善了用户的人机交互体验。In the embodiment of the present disclosure, by obtaining the first position information of at least one object in the first coordinate system; based on the first conversion parameter, the first position information of each object in the first coordinate system is converted into the second coordinate system The second position information in the system; based on the second position information of each object and the preset operation rules, determine the target operation information, the target operation information includes the target operation object, the target operation instruction and the target position information in the second coordinate system ; Execute the target operation instruction based on the target operation object and the target position information. In this way, the position in the first coordinate system can be converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate target operation objects, target operation instructions and Target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience.
图2为本公开实施例提供的一种数据处理方法的实现流程示意图,如图2所示,该数据处理方法包括步骤S21至步骤S25,其中:Fig. 2 is a schematic diagram of the implementation flow of a data processing method provided by an embodiment of the present disclosure. As shown in Fig. 2, the data processing method includes steps S21 to S25, wherein:
步骤S21、获取摄像模组采集的图像信息。Step S21, acquiring image information collected by the camera module.
这里,计算机设备可以内置摄像模组,也可以外置摄像模组。该摄像模组用于采集目标区域的图像信息。该目标区域可以包括但不限于虚拟棋盘中的对弈区域、实体棋盘中的对弈区域、虚拟的绘制区域、实体的绘制区域等。摄像模组可以是任何合适的能够捕获图像的各类器件。在一些实施方式中,该摄像模组可以是普通相机或摄像机,也可以是具有极限广角拍摄的广角模组。Here, the computer device may have a built-in camera module or an external camera module. The camera module is used to collect image information of the target area. The target area may include, but is not limited to, a playing area on a virtual chessboard, a playing area on a physical chessboard, a virtual drawing area, a physical drawing area, and the like. The camera module can be any suitable device capable of capturing images. In some embodiments, the camera module may be a common camera or video camera, or a wide-angle module with extreme wide-angle shooting.
该图像信息可以是直接由摄像模组采集的未经处理的图像,也可以是由摄像模组采集的并经由计算机设备进行处理后的图像。The image information may be an unprocessed image directly collected by the camera module, or an image collected by the camera module and processed by a computer device.
步骤S22、基于图像信息,获取每一对象在第一坐标系中的第一位置信息。Step S22. Based on the image information, first position information of each object in the first coordinate system is acquired.
这里,可以采用合适的识别算法对图像信息进行识别,以获取每一对象的第一位置信息。例如,光学字符识别(Optical Character Recognition,OCR)算法、基于深度学习的目标检测算法等。在实施时,本领域技术人员可以根据实际情况选取合适的识别算法,本公开实施例并不限定。Here, a suitable recognition algorithm may be used to recognize the image information, so as to obtain the first position information of each object. For example, optical character recognition (Optical Character Recognition, OCR) algorithm, object detection algorithm based on deep learning, etc. During implementation, those skilled in the art can select an appropriate recognition algorithm according to actual conditions, which is not limited by the embodiments of the present disclosure.
步骤S23、基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息。Step S23. Based on the first transformation parameters, transform the first position information of each object in the first coordinate system into the second position information in the second coordinate system.
步骤S24、基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,目标操作信息包括目标操作对象、目标操作指令和在第二坐标系中的目标位置信息。Step S24: Determine target operation information based on the second position information of each object and preset operation rules, where the target operation information includes target operation objects, target operation instructions, and target position information in the second coordinate system.
步骤S25、基于目标操作对象和目标位置信息,执行目标操作指令。Step S25, based on the target operation object and the target position information, execute the target operation instruction.
这里,上述步骤S23至步骤S25对应于前述步骤S12至步骤S14,在实施时,可以参照前述步骤S12至S14的具体实施方式。Here, the above-mentioned steps S23 to S25 correspond to the above-mentioned steps S12 to S14, and for implementation, reference may be made to the specific implementation manners of the above-mentioned steps S12 to S14.
在一些实施方式中,该方法还包括步骤S26,其中:In some embodiments, the method also includes step S26, wherein:
步骤S26、对摄像模组进行标定,确定第一转换参数。Step S26, calibrate the camera module, and determine the first conversion parameter.
这里,第一转换参数可以包括但不限于摄像模组的内参、畸变参数、外参、或其它转换矩阵等。其中,摄像模组的内参是摄像模组的固有参数,该固有参数可以从制造商获取,也可以通过对摄像模组进行标定来获取。该畸变参数用于校正由于摄像模组自身的特性带来的图像畸变。例如,镜头畸变,这是由于摄像模组的镜片因光线的通过产生不规则的折射带来的。Here, the first conversion parameters may include but not limited to internal parameters, distortion parameters, external parameters, or other conversion matrices of the camera module. Wherein, the internal reference of the camera module is an inherent parameter of the camera module, and the inherent parameter can be obtained from the manufacturer, or can be obtained by calibrating the camera module. The distortion parameter is used to correct the image distortion caused by the characteristics of the camera module itself. For example, lens distortion, which is caused by the irregular refraction of the lens of the camera module due to the passage of light.
在一些实施方式中,可以使用线性标定方法、非线性优化标定方法、张正友标定方法、棋盘标定方法、角点标定方法、相机标定方法或其它标定方法等对摄像模组进行标定,以获得该第一转换参数。本公开实施例对标定方法不作限定,只要能够获取该第一转换参数即可。In some implementations, the camera module can be calibrated using a linear calibration method, a nonlinear optimization calibration method, a Zhang Zhengyou calibration method, a checkerboard calibration method, a corner point calibration method, a camera calibration method, or other calibration methods to obtain the first A transformation parameter. The embodiment of the present disclosure does not limit the calibration method, as long as the first conversion parameter can be acquired.
在本公开实施例中,通过获取摄像模组采集的图像信息;基于图像信息,获取每一对象在第一坐标系中的第一位置信息;基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息;基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,目标操作信息包括目标操作对象、目标操作指令和在第二坐标系中的目标位置信息;基于目标操作对象和目标位置信息,执行目标操作指令。这样,在利用摄像模组获得准确的第一位置信息后,通过第一转换参数将第一坐标系中的位置转换为第二坐标系中的位置,实现对象在不同坐标系中位置的统一,以得到更加准确的目标操作对象、目 标操作指令以及目标位置信息,从而进一步提高了目标操作指令执行的精准度。In the embodiment of the present disclosure, the image information collected by the camera module is obtained; based on the image information, the first position information of each object in the first coordinate system is obtained; The first position information in the coordinate system is converted into the second position information in the second coordinate system; based on the second position information of each object and preset operation rules, target operation information is determined, and the target operation information includes the target operation object, A target operation instruction and target position information in the second coordinate system; based on the target operation object and the target position information, execute the target operation instruction. In this way, after using the camera module to obtain accurate first position information, the position in the first coordinate system is converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the position of the object in different coordinate systems, In order to obtain more accurate target operation object, target operation instruction and target position information, thereby further improving the accuracy of target operation instruction execution.
图3为本公开实施例提供的一种数据处理方法的实现流程示意图,如图3所示,该方法包括步骤S31至步骤S35,其中:Fig. 3 is a schematic flow diagram of a data processing method provided by an embodiment of the present disclosure. As shown in Fig. 3, the method includes steps S31 to S35, wherein:
步骤S31、获取至少一个对象在第一坐标系中的第一位置信息。Step S31 , acquiring first position information of at least one object in the first coordinate system.
步骤S32、基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息。Step S32. Based on the first transformation parameters, transform the first position information of each object in the first coordinate system into the second position information in the second coordinate system.
步骤S33、基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,目标操作信息包括目标操作对象、目标操作指令和在第二坐标系中的目标位置信息。Step S33 : Determine target operation information based on the second position information of each object and preset operation rules, where the target operation information includes target operation objects, target operation instructions, and target position information in the second coordinate system.
这里,上述步骤S31至步骤S33对应于前述步骤S11至步骤S13,在实施时,可以参照前述步骤S11至S13的具体实施方式。Here, the above-mentioned steps S31 to S33 correspond to the above-mentioned steps S11 to S13, and for implementation, reference may be made to the specific implementation manners of the above-mentioned steps S11 to S13.
步骤S34、基于第二转换参数,将目标位置信息转换为在第三坐标系中的第三位置信息。Step S34 , based on the second transformation parameters, transform the target position information into third position information in the third coordinate system.
这里,第二转换参数可以是预先设置的,也可以是通过标定、对比等方式计算得到的。该第二转换参数可以包括但不限于转换矩阵等。在一些实施方式中,可以使用手眼标定方法进行标定,以获得该第二转换参数。本公开实施例对标定方法不作限定,只要能够获取该第二转换参数即可。Here, the second conversion parameter may be preset, or may be calculated by means of calibration, comparison, and the like. The second conversion parameter may include but not limited to a conversion matrix and the like. In some implementations, a hand-eye calibration method may be used for calibration to obtain the second conversion parameter. The embodiment of the present disclosure does not limit the calibration method, as long as the second conversion parameter can be acquired.
第三坐标系可以包括但不限于空间坐标系、图像坐标系等。例如,在对弈场景中,该第三坐标系可以是机械臂坐标系。The third coordinate system may include but not limited to a space coordinate system, an image coordinate system, and the like. For example, in a game scene, the third coordinate system may be a mechanical arm coordinate system.
步骤S35、基于目标操作对象和第三位置信息,执行目标操作指令。Step S35 , based on the target operation object and the third position information, execute the target operation instruction.
这里,目标操作指令可以包括但不限于下棋指令、吃棋指令、绘制指令、擦除指令、移动指令等。Here, the target operation instruction may include, but not limited to, a chess-playing instruction, a chess-capture instruction, a drawing instruction, an erasing instruction, a moving instruction, and the like.
在一些实施方式中,在目标操作指令包括下棋指令的情况下,该第三位置信息包括目标棋子的第三子位置,上述步骤S35包括步骤S351,其中:In some implementations, when the target operation instruction includes a chess playing instruction, the third position information includes the third sub-position of the target chess piece, and the above step S35 includes step S351, wherein:
步骤S351、控制对弈机器人的机械臂将目标棋子放置在第三子位置。Step S351, controlling the mechanical arm of the playing robot to place the target chess piece at the third sub-position.
这里,该计算机设备可以是对弈机器人,该对弈机器人至少包括机械臂。在实施时,对弈机器人控制机械臂抓取目标棋子后,并移动至第三位置信息处释放该目标棋子,以实现将目标棋子放置在第三子位置。Here, the computer device may be a playing robot, and the playing robot includes at least a mechanical arm. During implementation, after the playing robot controls the mechanical arm to grab the target chess piece, it moves to the third position information and releases the target chess piece, so as to place the target chess piece at the third position.
例如,在围棋对弈中,对弈机器人可以控制机械臂运动,从装有黑棋的框中抓取一黑棋,并运动至第三子位置处进行释放。For example, in a game of Go, the playing robot can control the movement of the mechanical arm, grab a black chess from the box containing the black chess, and move to the third sub-position for release.
在一些实施方式中,在目标操作指令包括吃棋指令的情况下,目标棋子包括第一棋子和第二棋子,第三位置信息包括第一棋子的第一子位置和第二棋子的第二子位置,上述步骤S35包括步骤S361至步骤S362,其中:In some implementations, when the target operation instruction includes a capture chess instruction, the target chess piece includes a first chess piece and a second chess piece, and the third position information includes the first piece position of the first chess piece and the second piece of the second chess piece. The above step S35 includes steps S361 to S362, wherein:
步骤S361、基于第一子位置,控制机械臂取走第一棋子。Step S361, based on the position of the first piece, control the mechanical arm to take away the first chess piece.
这里,该计算机设备可以是对弈机器人,该对弈机器人至少包括机械臂。第一棋子可以是对方的棋子。Here, the computer device may be a playing robot, and the playing robot includes at least a mechanical arm. The first pawn may be an opponent's pawn.
步骤S362、基于第二子位置,控制机械臂抓取第二棋子,并将第二棋子移动至第一子位置。Step S362, based on the second sub-position, controlling the mechanical arm to grab the second chess piece and move the second chess piece to the first sub-position.
这里,第二棋子可以是己方的棋子。Here, the second chess piece may be one's own chess piece.
在实施时,在吃棋的过程中,对弈机器人可以先取对方棋子再放己方棋子,也可以先放己方棋子再取对方棋子,本公开实施例对此不作限定。During implementation, in the process of capturing chess, the playing robot can take the opponent's pieces first and then put its own pieces, or put its own pieces first and then take the opponent's pieces, which is not limited in the embodiments of the present disclosure.
例如,在象棋对弈中,对弈机器人可以控制机械臂运动,先从对方的第一子位置中取走“炮”(第一棋子),再从第二子位置中抓取“马”(第二棋子),并将该“马”(第二棋子)移动至第一子位置。For example, in a chess game, the playing robot can control the movement of the mechanical arm, first take away the "cannon" (the first chess piece) from the opponent's first sub-position, and then grab the "horse" (the second pawn) from the second sub-position. Chess piece), and this "horse" (second chess piece) is moved to the first piece position.
在一些实施方式中,上述步骤S35包括步骤S371至步骤S373中的至少之一:In some embodiments, the above step S35 includes at least one of step S371 to step S373:
步骤S371、在目标操作指令包括绘制指令的情况下,控制绘图机器人的机械臂按照目标位置信息绘制目标图形。Step S371 , if the target operation instruction includes a drawing instruction, control the mechanical arm of the drawing robot to draw the target figure according to the target position information.
这里,该计算机设备可以是绘图机器人,该绘图机器人至少包括机械臂。该绘制指令可以包括但不限于画圆、画线段、画曲线、画点等。该目标位置信息可以包括但不限于起始位置、中心位置、终止位置等中的至少一个。Here, the computer device may be a drawing robot, and the drawing robot includes at least a mechanical arm. The drawing instruction may include, but not limited to, drawing a circle, drawing a line segment, drawing a curve, drawing a point, and the like. The target location information may include but not limited to at least one of a start location, a center location, an end location, and the like.
例如,在绘制指令是画圆,目标位置信息是起始位置的情况下,绘图机器人控制该机械臂在该起始位置处画圆。又例如,在绘制指令是画线段,目标位置信息是起始位置和终止位置的情况下,绘图机器人控制该机械臂从该起始位置处起画线段至该终止位置。For example, when the drawing instruction is to draw a circle and the target position information is the initial position, the drawing robot controls the mechanical arm to draw a circle at the initial position. For another example, when the drawing instruction is to draw a line segment, and the target position information is a start position and an end position, the drawing robot controls the mechanical arm to draw a line segment from the start position to the end position.
步骤S372、在目标操作指令包括擦除指令的情况下,控制绘图机器人的机械臂擦除目标位置的目标图形。Step S372 , if the target operation instruction includes an erase instruction, control the mechanical arm of the drawing robot to erase the target figure at the target position.
这里,该擦除指令可以包括但不限于擦除圆、擦除线段、擦除曲线、擦除点等。该目标位置信息可以包括但不限于起始位置、中心位置、终止位置等中的至少一个。Here, the erasing instruction may include, but not limited to, erasing a circle, erasing a line segment, erasing a curve, erasing a point, and the like. The target location information may include but not limited to at least one of a start location, a center location, an end location, and the like.
例如,在擦除指令是擦除曲线,目标位置信息是起始位置和终止位置的情况下,绘图机器人控制该机械臂擦除从该起始位置至该终止位置的曲线。For example, when the erasing instruction is to erase a curve, and the target position information is a start position and an end position, the drawing robot controls the mechanical arm to erase the curve from the start position to the end position.
步骤S373、在目标操作指令包括移动指令的情况下,获取目标位置信息中的第四子位置和第五子位置,并控制绘图机器人的机械臂将位于第四子位置的目标图形移动至第五子位置。Step S373, if the target operation instruction includes a movement instruction, obtain the fourth sub-position and the fifth sub-position in the target position information, and control the mechanical arm of the drawing robot to move the target figure at the fourth sub-position to the fifth sub-position. sublocation.
这里,该擦除指令可以包括但不限于移动圆、移动线段、移动曲线、移动点等。该目标位置信息至少包括第四子位置和第五子位置。其中,该第四子位置可以是原来的位置,第五 子位置可以是放置的位置。该第四子位置和第五子位置可以是起始位置、中心位置、终止位置等中的至少一个。Here, the erasing instruction may include, but not limited to, a moving circle, a moving line segment, a moving curve, a moving point, and the like. The target location information includes at least a fourth sub-location and a fifth sub-location. Wherein, the fourth sub-position can be the original position, and the fifth sub-position can be the placed position. The fourth sub-position and the fifth sub-position may be at least one of a start position, a center position, an end position, and the like.
例如,在移动指令是移动点,第四子位置是第一起始位置、第五子位置是第二起始位置的情况下,绘图机器人控制该机械臂将位于第一起始位置(第四子位置)的点移动至第二起始位置(第五子位置)。For example, when the movement instruction is a moving point, the fourth sub-position is the first initial position, and the fifth sub-position is the second initial position, the drawing robot controls the mechanical arm to be located at the first initial position (the fourth sub-position ) point moves to the second starting position (fifth sub-position).
在一些实施方式中,该方法还包括步骤S36,其中:In some embodiments, the method also includes step S36, wherein:
步骤S36、对机器人的机械臂进行标定,确定第二转换参数。Step S36 , calibrate the mechanical arm of the robot, and determine the second conversion parameters.
这里,计算机设备可以是机器人,该机器人至少包括机械臂。第二转换参数可以包括但不限于转换矩阵等。Here, the computer device may be a robot including at least a robot arm. The second conversion parameter may include but not limited to a conversion matrix and the like.
在一些实施方式中,可以使用线性标定方法、非线性优化标定方法、手眼标定方法或其它标定方法对机械臂进行标定,以获得该第二转换参数。本公开实施例对标定方法不作限定,只要能够获取该第二转换参数即可。In some implementations, the robotic arm may be calibrated using a linear calibration method, a nonlinear optimization calibration method, a hand-eye calibration method or other calibration methods to obtain the second transformation parameter. The embodiment of the present disclosure does not limit the calibration method, as long as the second conversion parameter can be acquired.
在本公开实施例中,获取至少一个对象在第一坐标系中的第一位置信息;基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息;基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,目标操作信息包括目标操作对象、目标操作指令和在第二坐标系中的目标位置信息;基于第二转换参数,将目标位置信息转换为在第三坐标系中的第三位置信息;基于目标操作对象和第三位置信息,执行目标操作指令。这样,在获取第二位置信息后,通过第二转换参数将第二坐标系中的位置转换为第三坐标系中的位置,实现对象在不同坐标系中位置的统一,以得到更加准确的目标操作对象、目标操作指令以及目标位置信息,从而进一步提高了目标操作指令执行的精准度。In an embodiment of the present disclosure, the first position information of at least one object in the first coordinate system is acquired; based on the first conversion parameter, the first position information of each object in the first coordinate system is converted into the second coordinate system The second position information in the system; based on the second position information of each object and the preset operation rules, determine the target operation information, the target operation information includes the target operation object, the target operation instruction and the target position information in the second coordinate system ; Based on the second conversion parameter, converting the target position information into third position information in the third coordinate system; based on the target operation object and the third position information, executing the target operation instruction. In this way, after obtaining the second position information, the position in the second coordinate system is converted to the position in the third coordinate system through the second conversion parameter, so as to realize the unification of the position of the object in different coordinate systems, so as to obtain a more accurate target Operation objects, target operation instructions and target location information, thereby further improving the accuracy of target operation instructions execution.
图4A为本公开实施例提供的一种数据处理系统的示意图,如图4A所示,该数据处理系统40包括标定部分41、获取部分42、确定部分43和执行部分44。FIG. 4A is a schematic diagram of a data processing system provided by an embodiment of the present disclosure. As shown in FIG. 4A , the data processing system 40 includes a calibration part 41 , an acquisition part 42 , a determination part 43 and an execution part 44 .
所述标定部分41,被配置为基于标定方法,确定第一转换参数和第二转换参数。The calibration part 41 is configured to determine the first conversion parameter and the second conversion parameter based on the calibration method.
所述获取部分42,被配置为获取至少一个对象在第一坐标系中的第一位置信息。The acquisition part 42 is configured to acquire first position information of at least one object in the first coordinate system.
所述确定部分43,被配置为基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息,并基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,该目标操作信息包括目标操作对象、目标操作指令和目标位置信息。The determining part 43 is configured to convert the first position information of each object in the first coordinate system into the second position information in the second coordinate system based on the first transformation parameter, and based on the The second location information and the preset operation rule determine the target operation information, and the target operation information includes the target operation object, the target operation instruction and the target location information.
所述执行部分44,被配置为基于第二转换参数,将目标位置信息转换为在第三坐标系中的第三位置信息,基于目标操作对象和第三位置信息,执行目标操作指令。The executing part 44 is configured to convert the target position information into third position information in the third coordinate system based on the second conversion parameter, and execute the target operation instruction based on the target operation object and the third position information.
在一些实施方式中,所述标定部分41包括:初始化部分和转换部分。其中,初始化部分用于初始化第一坐标系、第二坐标系和第三坐标系。转换部分用于基于标定方法,确定第 一坐标系和第二坐标系之间的第一转换参数、第二坐标系和第三坐标系的第二转换参数。In some implementations, the calibration part 41 includes: an initialization part and a conversion part. Wherein, the initialization part is used for initializing the first coordinate system, the second coordinate system and the third coordinate system. The conversion part is used to determine a first conversion parameter between the first coordinate system and the second coordinate system, and a second conversion parameter between the second coordinate system and the third coordinate system based on the calibration method.
例如,在对弈场景中,分别初始化视觉模组坐标系(第一坐标系)、棋盘坐标系(第二坐标系)及机械臂坐标系(第三坐标系),基于手眼标定方法,确定从视觉模组坐标系转换为棋盘坐标系的第一转换参数,并确定从棋盘坐标系转换为机械臂坐标系的第二转换参数。基于该第一转换参数和第二转换参数,实现视觉模组坐标系和机械臂坐标系的统一。For example, in the game scene, initialize the vision module coordinate system (first coordinate system), the chessboard coordinate system (second coordinate system) and the robot arm coordinate system (third coordinate system), and determine the visual coordinate system based on the hand-eye calibration method. The module coordinate system is transformed into the first transformation parameter of the chessboard coordinate system, and the second transformation parameter of the chessboard coordinate system into the manipulator coordinate system is determined. Based on the first conversion parameter and the second conversion parameter, the unification of the visual module coordinate system and the mechanical arm coordinate system is realized.
例如,以棋盘格子宽度为一个单位,定义棋盘坐标系量纲,并定义棋盘为二维直角坐标系。又例如,机械臂采用三轴机械臂,每个机械臂的每个自由度增加位置传感器,通过三轴机械臂正逆解,实现对机械臂进行标定。For example, take the width of the checkerboard grid as a unit, define the dimensions of the checkerboard coordinate system, and define the checkerboard as a two-dimensional Cartesian coordinate system. For another example, the robotic arm adopts a three-axis robotic arm, and a position sensor is added for each degree of freedom of each robotic arm, and the forward and reverse solutions of the three-axis robotic arm are used to calibrate the robotic arm.
在一些实施方式中,所述获取部分42,还被配置为:获取摄像模组采集的图像信息;基于图像信息,获取每一对象在第一坐标系中的第一位置信息。In some implementations, the acquisition part 42 is further configured to: acquire the image information collected by the camera module; and based on the image information, acquire the first position information of each object in the first coordinate system.
图4B为本公开实施例提供的一种对弈机器人400的部件间电连接示意图,如图4B所示,对弈机器人至少包括处理单元401、摄像头402和机械臂403,其中处理单元401可以包括但不限于中央处理器、控制器等,其与摄像头402电连接,可以接收摄像头402拍摄到棋盘信息和对象目标物信息,并根据接收到的棋盘信息和对向目标物信息计算并发出控制机械臂403动作的指令或信号;处理单元402与机械臂403电连接,可以将控制机械臂403动作的指令或信号发送至机械臂403对应的驱动单元,以驱动机械臂403动作。其中,对弈机器人的对向目标物指位于对弈机器人对面的需要与对弈机器人交互的物体,该物体可以是用户、玩偶、另一对弈机器人等,本公开实施例对此不作限定。FIG. 4B is a schematic diagram of the electrical connection between components of a playing robot 400 provided by an embodiment of the present disclosure. As shown in FIG. It is limited to the central processing unit, controller, etc., which are electrically connected to the camera 402, and can receive the chessboard information and target object information captured by the camera 402, and calculate and issue the control robot arm 403 according to the received chessboard information and target object information. Action instructions or signals; the processing unit 402 is electrically connected to the robotic arm 403, and can send instructions or signals to control the action of the robotic arm 403 to the corresponding drive unit of the robotic arm 403 to drive the robotic arm 403 to move. Wherein, the opposing target of the game robot refers to an object that needs to interact with the game robot and is located opposite the game robot. The object may be a user, a doll, another game robot, etc., which is not limited in this embodiment of the present disclosure.
图4C为本公开实施例提供的一种对弈机器人的俯视图,如图4C所示,对弈机器人至少包括摄像头402和机械臂403,该机械臂403可以在棋盘404的范围内移动,以抓取或释放棋子405,摄像头402可以拍摄到棋盘404的信息和用户信息。在对弈机器人设置有两个机械臂403的情况下,可以采用任意一个机械臂403来抓取和释放棋子405,而另外一个机械臂403在空余时间内可以进行一些动作,用于与用户交互信息。FIG. 4C is a top view of a game playing robot provided by an embodiment of the present disclosure. As shown in FIG. The chess piece 405 is released, and the camera 402 can capture information on the chessboard 404 and user information. In the case where the playing robot is equipped with two mechanical arms 403, any one of the mechanical arms 403 can be used to grab and release the chess pieces 405, while the other mechanical arm 403 can perform some actions in spare time to interact with the user .
图4D为本公开实施例提供的一种对弈机器人前方有用户时,摄像头的观察画面示意图,如图4D所示,摄像头402的可拍摄区域406包括互相垂直的第一侧边4061和第二侧边4062,第一侧边4061的长度大于第二侧边4062的长度,第二侧边4062与水平方向平行。进而,摄像头402的可拍摄区域406沿第一侧边4061的方向为竖直方向,沿第二侧边4062的方向为水平方向,且摄像头402可拍摄区域406沿第一侧边4061的方向的长度比较长,能很好的适应包括棋盘404和用户407的长距离拍摄要求;对应的,摄像头402可拍摄区域406沿第二侧边4062的方向的长度比较短,在保证水平方向上的拍摄需求的前提下,不会浪费拍摄资源。Fig. 4D is a schematic diagram of the observation screen of the camera when there is a user in front of a game robot provided by an embodiment of the present disclosure. As shown in Fig. 4D, the photographable area 406 of the camera 402 includes a first side 4061 and a second side perpendicular to each other In the side 4062, the length of the first side 4061 is greater than the length of the second side 4062, and the second side 4062 is parallel to the horizontal direction. Furthermore, the photographable area 406 of the camera 402 is vertical along the direction of the first side 4061, and the direction along the second side 4062 is horizontal, and the photographable area 406 of the camera 402 is along the direction of the first side 4061. The length is relatively long, which can well adapt to the long-distance shooting requirements of the chessboard 404 and the user 407; correspondingly, the length of the camera 402's shooting area 406 along the direction of the second side 4062 is relatively short, ensuring horizontal shooting Under the premise of demand, shooting resources will not be wasted.
在一些实施方式中,所述执行部分44,还被配置为:基于第二转换参数,将目标位置信息转换为在第三坐标系中的第三位置信息;基于目标操作对象和第三位置信息,执行目标操作指令。In some implementations, the executing part 44 is further configured to: convert the target position information into third position information in the third coordinate system based on the second transformation parameter; based on the target operation object and the third position information , execute the target operation instruction.
在一些实施方式中,在预设操作规则包括对弈规则的情况下,对象包括棋子,目标操作对象包括目标棋子,所述确定部分43,还被配置为:基于每一棋子的第二位置信息和对弈规则,确定目标棋子、目标操作指令和在第二坐标系中的目标位置信息。In some embodiments, when the preset operation rules include game rules, the object includes chess pieces, and the target operation object includes target chess pieces, the determining part 43 is further configured to: based on the second position information of each chess piece and The game rules determine the target chess pieces, target operation instructions and target position information in the second coordinate system.
在一些实施方式中,在目标操作指令包括下棋指令的情况下,第三位置信息包括目标棋子的第三子位置,所述执行部分44,还被配置为:控制对弈机器人的机械臂将目标棋子放置在第三子位置。In some implementations, when the target operation instruction includes a chess playing instruction, the third position information includes the third sub-position of the target chess piece, and the execution part 44 is also configured to: control the mechanical arm of the playing robot to place the target chess piece The pawn is placed on the third piece position.
在一些实施方式中,在目标操作指令包括吃棋指令的情况下,目标棋子包括第一棋子和第二棋子,第三位置信息包括第一棋子的第一子位置和第二棋子的第二子位置,所述执行部分44,还被配置为:基于第一子位置,控制机械臂取走第一棋子;基于第二子位置,控制机械臂抓取第二棋子,并将第二棋子移动至第一子位置。In some implementations, when the target operation instruction includes a capture chess instruction, the target chess piece includes a first chess piece and a second chess piece, and the third position information includes the first piece position of the first chess piece and the second piece of the second chess piece. position, the execution part 44 is also configured to: based on the first sub-position, control the mechanical arm to take the first chess piece; based on the second sub-position, control the mechanical arm to grab the second chess piece, and move the second chess piece to first child position.
在一些实施方式中,在预设操作规则包括绘制规则的情况下,对象包括图形,目标操作对象包括目标图形;所述确定部分43,还被配置为:基于每一图形的第二位置信息和绘制规则,确定目标图形、目标操作指令和在第二坐标系中的目标位置信息。In some implementations, when the preset operation rules include drawing rules, the object includes graphics, and the target operation object includes target graphics; the determining part 43 is further configured to: based on the second position information of each graphic and The drawing rules determine the target graphics, target operation instructions and target position information in the second coordinate system.
在一些实施方式中,所述执行部分44,还被配置为以下至少之一:在目标操作指令包括绘制指令的情况下,控制绘图机器人的机械臂按照目标位置信息绘制目标图形;在目标操作指令包括擦除指令的情况下,控制绘图机器人的机械臂擦除目标位置的目标图形;在目标操作指令包括移动指令的情况下,获取目标位置信息中的第四子位置和第五子位置,并控制绘图机器人的机械臂将位于第四子位置的目标图形移动至第五子位置。In some embodiments, the executing part 44 is further configured as at least one of the following: when the target operation instruction includes a drawing instruction, control the mechanical arm of the drawing robot to draw the target figure according to the target position information; In the case of including the erasing instruction, control the mechanical arm of the drawing robot to erase the target graphic at the target position; in the case of the target operation instruction including the movement instruction, obtain the fourth sub-position and the fifth sub-position in the target position information, and The mechanical arm of the drawing robot is controlled to move the target figure located at the fourth sub-position to the fifth sub-position.
在一些实施方式中,该数据处理系统包括云端和对弈机器人,该云端包括标定部分41和确定部分43,该对弈机器人包括获取部分42和执行部分44。In some embodiments, the data processing system includes a cloud and a game robot, the cloud includes a calibration part 41 and a determination part 43 , and the game robot includes an acquisition part 42 and an execution part 44 .
例如,首先,对弈机器人通过摄像模组采集图像信息,并将该图像信息发送至云端。然后,云端基于该图像信息,获取每一棋子在摄像模组坐标系中的第一位置信息;基于该第一转换参数,将每一第一位置信息转换为在棋盘坐标系中的第二位置信息;基于每一第二位置信息和对弈规则,确定目标棋子、目标操作指令和目标位置信息;基于该第二转换参数,将目标位置信息转换为在机械臂坐标系中的第三位置信息;将该目标棋子、目标操作指令和第三位置信息返给对弈机器人。最后,对弈机器人基于该目标棋子和第三位置信息,执行该目标操作指令。For example, first, the playing robot collects image information through the camera module, and sends the image information to the cloud. Then, based on the image information, the cloud obtains the first position information of each chess piece in the camera module coordinate system; based on the first conversion parameter, converts each first position information into a second position in the chessboard coordinate system information; based on each second position information and the rules of the game, determine the target chess piece, the target operation instruction and the target position information; based on the second conversion parameter, convert the target position information into the third position information in the mechanical arm coordinate system; The target chess piece, the target operation instruction and the third position information are returned to the playing robot. Finally, the playing robot executes the target operation instruction based on the target chess piece and the third position information.
又例如,首先,对弈机器人通过摄像模组采集图像信息,并将该图像信息发送至云端。 然后,云端基于该图像信息,获取每一棋子在摄像模组坐标系中的第一位置信息;基于该第一转换参数,将每一第一位置信息转换为在棋盘坐标系中的第二位置信息;基于每一第二位置信息和对弈规则,确定目标棋子、目标操作指令和目标位置信息,将该目标棋子、目标操作指令和目标位置信息返给对弈机器人。最后,对弈机器人基于该第二转换参数,将目标位置信息转换为在机械臂坐标系中的第三位置信息;基于该目标棋子和第三位置信息,执行该目标操作指令。For another example, first, the playing robot collects image information through the camera module, and sends the image information to the cloud. Then, based on the image information, the cloud obtains the first position information of each chess piece in the camera module coordinate system; based on the first conversion parameter, converts each first position information into a second position in the chessboard coordinate system Information; based on each second position information and game rules, determine the target chess pieces, target operation instructions and target position information, and return the target chess pieces, target operation instructions and target position information to the game robot. Finally, the playing robot converts the target position information into third position information in the coordinate system of the mechanical arm based on the second conversion parameter; based on the target chess piece and the third position information, executes the target operation instruction.
图4E为本公开实施例提供的一种对弈机器人下棋的流程示意图,如图4E所示,该流程包括以下步骤:Fig. 4E is a schematic flow diagram of a chess playing robot provided by an embodiment of the present disclosure. As shown in Fig. 4E, the flow includes the following steps:
步骤S41:用户下棋;Step S41: the user plays chess;
步骤S42:用户按下下棋键,发出对弈机器人下棋指令;Step S42: The user presses the chess key to send the chess playing robot instruction;
步骤S43:对弈机器人启动摄像模组采集图像信息,将该图像信息发送给云端;Step S43: The playing robot starts the camera module to collect image information, and sends the image information to the cloud;
步骤S44:云端进行图像识别、坐标转换和分析后,返回操作信息给对弈机器人;Step S44: After the image recognition, coordinate transformation and analysis are performed on the cloud, the operation information is returned to the playing robot;
步骤S45:对弈机器人解析该操作信息,得到第一棋子及其第一子位置、第二棋子及其第二子位置、和吃棋指令;Step S45: The playing robot analyzes the operation information, and obtains the first chess piece and its first sub-position, the second chess piece and its second sub-position, and the capture command;
步骤S46:对弈机器人控制机械臂取走位于第一子位置的第一棋子;Step S46: the playing robot controls the mechanical arm to take away the first chess piece at the first sub-position;
步骤S47:对弈机器人控制机械臂移动至第二子位置,取走第二棋子,并放置至第一子位置;Step S47: The playing robot controls the mechanical arm to move to the second sub-position, takes away the second chess piece, and places it in the first sub-position;
步骤S48:对弈机器人复位,采用语音、指示灯、或按键等方式提示用户下棋,继续执行步骤S41。Step S48: The chess-playing robot resets, prompts the user to play chess by means of voice, indicator lights, or buttons, and continues to execute step S41.
在本公开实施例中,在人机对弈的过程中,人将棋子放歪,通过摄像模块,基于棋盘坐标系的定义都可以实现准确抓取,并且在放置棋子的时候准确放置到棋盘格交叉点处,实现了“歪抓正放”,从而可以改善用户的对弈体验。In the embodiment of the present disclosure, in the process of man-machine game, the person puts the chess pieces crookedly, and through the camera module, based on the definition of the chessboard coordinate system, accurate capture can be realized, and when placing the chess pieces, they can be accurately placed at the intersection of the chessboard grids. At this point, the "crooked grasp and correct release" is realized, which can improve the user's game experience.
基于上述实施例,本公开实施例提供一种数据处理装置,图5为本公开实施例提供的一种数据处理装置的组成结构示意图,如图5所示,所述数据处理装置50包括第一获取部分51、第一转换部分52、第一确定部分53以及第一执行部分53。Based on the above-mentioned embodiments, an embodiment of the present disclosure provides a data processing device. FIG. 5 is a schematic structural diagram of a data processing device provided by an embodiment of the present disclosure. As shown in FIG. 5 , the data processing device 50 includes a first An acquisition section 51 , a first conversion section 52 , a first determination section 53 , and a first execution section 53 .
所述第一获取部分51,被配置为获取至少一个对象在第一坐标系中的第一位置信息;The first acquiring part 51 is configured to acquire first position information of at least one object in the first coordinate system;
所述第一转换部分52,被配置为基于第一转换参数,将每一所述对象在所述第一坐标系中的所述第一位置信息转换为在第二坐标系中的第二位置信息;The first conversion part 52 is configured to convert the first position information of each of the objects in the first coordinate system into a second position in the second coordinate system based on a first conversion parameter information;
所述第一确定部分53,被配置为基于每一所述对象的第二位置信息和预设操作规则,确定目标操作信息,所述目标操作信息包括目标操作对象、目标操作指令和在所述第二坐标系中的目标位置信息;The first determination part 53 is configured to determine target operation information based on the second position information and preset operation rules of each of the objects, the target operation information including the target operation object, the target operation instruction and the Target position information in the second coordinate system;
所述第一执行部分54,被配置为基于所述目标操作对象和所述目标位置信息,执行所述目标操作指令。The first execution part 54 is configured to execute the target operation instruction based on the target operation object and the target position information.
在一些实施方式中,所述第一获取部分51,还被配置为:获取摄像模组采集的图像信息;基于所述图像信息,获取每一所述对象在第一坐标系中的第一位置信息。In some implementations, the first acquisition part 51 is further configured to: acquire the image information collected by the camera module; based on the image information, acquire the first position of each of the objects in the first coordinate system information.
在一些实施方式中,所述装置还包括:第二确定部分,被配置为对所述摄像模组进行标定,确定所述第一转换参数。In some embodiments, the device further includes: a second determining part configured to calibrate the camera module and determine the first conversion parameter.
在一些实施方式中,所述第一执行部分54,还被配置为:基于第二转换参数,将所述目标位置信息转换为在第三坐标系中的第三位置信息;基于所述目标操作对象和所述第三位置信息,执行所述目标操作指令。In some implementations, the first execution part 54 is further configured to: convert the target position information into third position information in a third coordinate system based on the second conversion parameters; The object and the third location information are used to execute the target operation instruction.
在一些实施方式中,所述装置还包括:第三确定部分,被配置为对所述机器人的机械臂进行标定,确定所述第二转换参数。In some implementations, the device further includes: a third determining part configured to calibrate the mechanical arm of the robot to determine the second conversion parameter.
在一些实施方式中,在所述预设操作规则包括对弈规则的情况下,所述对象包括棋子,所述目标操作对象包括目标棋子,所述第一确定部分53,还被配置为:基于每一所述棋子的第二位置信息和对弈规则,确定目标棋子、目标操作指令和在所述第二坐标系中的目标位置信息。In some implementations, when the preset operation rules include game rules, the object includes chess pieces, the target operation object includes target chess pieces, and the first determining part 53 is further configured to: based on each The second position information of the chess pieces and the game rules determine the target chess pieces, target operation instructions and target position information in the second coordinate system.
在一些实施方式中,在所述目标操作指令包括下棋指令的情况下,所述第三位置信息包括所述目标棋子的第三子位置,所述第一执行部分54,还被配置为:控制所述对弈机器人的机械臂将所述目标棋子放置在所述第三子位置。In some implementations, when the target operation instruction includes a chess playing instruction, the third position information includes a third sub-position of the target chess piece, and the first executing part 54 is further configured to: Controlling the mechanical arm of the playing robot to place the target chess piece at the third sub-position.
在一些实施方式中,在所述目标操作指令包括吃棋指令的情况下,所述目标棋子包括第一棋子和第二棋子,所述第三位置信息包括所述第一棋子的第一子位置和所述第二棋子的第二子位置,所述第一执行部分54,还被配置为:基于所述第一子位置,控制所述机械臂取走所述第一棋子;基于所述第二子位置,控制所述机械臂抓取所述第二棋子,并将所述第二棋子移动至所述第一子位置。In some implementations, when the target operation instruction includes a chess capture instruction, the target chess piece includes a first chess piece and a second chess piece, and the third position information includes a first sub-position of the first chess piece and the second sub-position of the second chess piece, the first execution part 54 is also configured to: control the mechanical arm to take away the first chess piece based on the first sub-position; The second sub-position, controlling the mechanical arm to grab the second chess piece and move the second chess piece to the first sub-position.
在一些实施方式中,在所述预设操作规则包括绘制规则的情况下,所述对象包括图形,所述目标操作对象包括目标图形;所述第一确定部分53,还被配置为:基于每一所述图形的第二位置信息和绘制规则,确定目标图形、目标操作指令和在所述第二坐标系中的目标位置信息。In some implementations, when the preset operation rule includes a drawing rule, the object includes a graph, and the target operation object includes a target graph; the first determining part 53 is further configured to: based on each A second position information and drawing rule of the graphic, to determine the target graphic, the target operation instruction and the target position information in the second coordinate system.
在一些实施方式中,所述第一执行部分54,还被配置为以下至少之一:在所述目标操作指令包括绘制指令的情况下,控制所述绘图机器人的机械臂按照所述目标位置信息绘制所述目标图形;在所述目标操作指令包括擦除指令的情况下,控制所述绘图机器人的机械臂擦除所述目标位置信息的所述目标图形;在所述目标操作指令包括移动指令的情况下,获取所述 目标位置信息中的第四子位置和第五子位置,并控制所述绘图机器人的机械臂将位于所述第四子位置的所述目标图形移动至所述第五子位置。In some implementations, the first execution part 54 is further configured as at least one of the following: when the target operation instruction includes a drawing instruction, control the mechanical arm of the drawing robot to follow the target position information drawing the target graphic; in the case where the target operation instruction includes an erasing instruction, controlling the mechanical arm of the drawing robot to erase the target graphic of the target position information; when the target operation instruction includes a movement instruction In the case of , the fourth sub-position and the fifth sub-position in the target position information are obtained, and the mechanical arm of the drawing robot is controlled to move the target figure located at the fourth sub-position to the fifth sub-position. sublocation.
在本公开实施例以及其它的实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。In the embodiments of the present disclosure and other embodiments, a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a unit, a module or a non-modular one.
以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开装置实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
需要说明的是,本公开实施例中,如果以软件功能模块的形式实现上述的数据处理方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一台电子设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本公开实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiments of the present disclosure, if the above data processing method is implemented in the form of software function modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the embodiments of the present disclosure or the part that contributes to the related technology can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to make a An electronic device (which may be a personal computer, a server, or a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk. As such, embodiments of the present disclosure are not limited to any specific combination of hardware and software.
本公开实施例提供一种计算机设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述方法。An embodiment of the present disclosure provides a computer device, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the above method when executing the computer program.
本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述方法。所述计算机可读存储介质可以是瞬时性的,也可以是非瞬时性的。An embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the foregoing method is implemented. The computer readable storage medium may be transitory or non-transitory.
本公开实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序被计算机读取并执行时,实现上述方法中的部分或全部步骤。该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一些实施例中,所述计算机程序产品具体体现为计算机存储介质,在一些实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。An embodiment of the present disclosure provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, a part or part of the above-mentioned method is implemented. All steps. The computer program product can be specifically realized by means of hardware, software or a combination thereof. In some embodiments, the computer program product is embodied as a computer storage medium, and in some embodiments, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开存储介质和设备实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。It should be pointed out here that: the descriptions of the above storage medium and device embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects to those of the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
需要说明的是,图6为本公开实施例中计算机设备的一种硬件实体示意图,如图6所示,该计算机设备600的硬件实体包括:处理器601、通信接口602和存储器603,其中:It should be noted that FIG. 6 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present disclosure. As shown in FIG. 6, the hardware entity of the computer device 600 includes: a processor 601, a communication interface 602, and a memory 603, wherein:
处理器601通常控制计算机设备600的总体操作。 Processor 601 generally controls the overall operation of computer device 600 .
通信接口602可以使计算机设备通过网络与其他终端或服务器通信。The communication interface 602 enables the computer device to communicate with other terminals or servers through the network.
存储器603配置为存储由处理器601可执行的指令和应用,还可以缓存待处理器601以及计算机设备600中各部分待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random AccessMemory,RAM)实现。处理器601、通信接口602和存储器603之间可以通过总线604进行数据传输。The memory 603 is configured to store instructions and applications executable by the processor 601, and can also cache data to be processed or already processed by the processor 601 and various parts of the computer device 600 (for example, image data, audio data, voice communication data and Video communication data) can be realized by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission may be performed between the processor 601 , the communication interface 602 and the memory 603 through the bus 604 .
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本公开的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。上述本公开实施例序号为了描述,不代表实施例的优劣。It should be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic related to the embodiment is included in at least one embodiment of the present disclosure. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that in various embodiments of the present disclosure, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, rather than by the embodiments of the present disclosure. The implementation process constitutes any limitation. The serial numbers of the above-mentioned embodiments of the present disclosure are for description, and do not represent the advantages and disadvantages of the embodiments.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
在本公开所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例是示意性的,例如,所述单元的划分,为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods may be implemented in other ways. The device embodiments described above are schematic. For example, the division of the units is a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本公开实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, all the functional units in the embodiments of the present disclosure may be integrated into one processing unit, each unit may be used as a single unit, or two or more units may be integrated into one unit; the above-mentioned integrated The unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指 令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ReadOnly Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps to realize the above method embodiments can be completed by hardware related to program instructions, and the aforementioned programs can be stored in computer-readable storage media. When the program is executed, the execution includes: The steps of the foregoing method embodiments; and the aforementioned storage media include: removable storage devices, read-only memory (ReadOnly Memory, ROM), magnetic disks or optical disks and other media that can store program codes.
或者,本公开上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台电子设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the present disclosure are realized in the form of software function modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present disclosure or the part that contributes to the related technology can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to make a An electronic device (which may be a personal computer, a server, or a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.
以上所述,为本公开的实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。The above is an embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope of the present disclosure, and should cover all within the protection scope of the present disclosure.
工业实用性Industrial Applicability
本公开实施例提供一种数据处理方法和装置、计算机设备、存储介质及计算机程序产品,其中,所述方法包括:获取至少一个对象在第一坐标系中的第一位置信息;基于第一转换参数,将每一对象在第一坐标系中的第一位置信息转换为在第二坐标系中的第二位置信息;基于每一对象的第二位置信息和预设操作规则,确定目标操作信息,目标操作信息包括目标操作对象、目标操作指令和在第二坐标系中的目标位置信息;基于目标操作对象和目标位置信息,执行目标操作指令。上述方案,通过第一转换参数将第一坐标系中的位置转换为第二坐标系中的位置,实现对象在不同坐标系中位置的统一,以得到更加准确的目标操作对象、目标操作指令以及目标位置信息,从而提高目标操作指令执行的精准度,进而改善了用户的人机交互体验。Embodiments of the present disclosure provide a data processing method and device, a computer device, a storage medium, and a computer program product, wherein the method includes: acquiring first position information of at least one object in a first coordinate system; parameters, transforming the first position information of each object in the first coordinate system into the second position information in the second coordinate system; based on the second position information of each object and preset operation rules, determine the target operation information , the target operation information includes the target operation object, the target operation instruction and the target position information in the second coordinate system; based on the target operation object and the target position information, execute the target operation instruction. In the above solution, the position in the first coordinate system is converted to the position in the second coordinate system through the first conversion parameter, so as to realize the unification of the positions of objects in different coordinate systems, so as to obtain more accurate target operation objects, target operation instructions and Target location information, thereby improving the accuracy of the execution of target operation instructions, thereby improving the user's human-computer interaction experience.

Claims (23)

  1. 一种数据处理方法,所述方法包括:A data processing method, the method comprising:
    获取至少一个对象在第一坐标系中的第一位置信息;Acquiring first position information of at least one object in the first coordinate system;
    基于第一转换参数,将每一所述对象在所述第一坐标系中的所述第一位置信息转换为在第二坐标系中的第二位置信息;converting the first position information of each of the objects in the first coordinate system to second position information in a second coordinate system based on a first transformation parameter;
    基于每一所述对象的第二位置信息和预设操作规则,确定目标操作信息,所述目标操作信息包括目标操作对象、目标操作指令和在所述第二坐标系中的目标位置信息;determining target operation information based on the second position information and preset operation rules of each of the objects, the target operation information including target operation objects, target operation instructions and target position information in the second coordinate system;
    基于所述目标操作对象和所述目标位置信息,执行所述目标操作指令。The target operation instruction is executed based on the target operation object and the target position information.
  2. 根据权利要求1所述的方法,其中,所述获取至少一个对象在第一坐标系中的第一位置信息,包括:The method according to claim 1, wherein said obtaining the first position information of at least one object in the first coordinate system comprises:
    获取摄像模组采集的图像信息;Obtain image information collected by the camera module;
    基于所述图像信息,获取每一所述对象在第一坐标系中的第一位置信息。Based on the image information, first position information of each of the objects in the first coordinate system is acquired.
  3. 根据权利要求2所述的方法,其中,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    对所述摄像模组进行标定,确定所述第一转换参数。Calibrate the camera module to determine the first conversion parameter.
  4. 根据权利要求1至3中任一项所述的方法,其中,所述基于所述目标操作对象和所述目标位置信息,执行所述目标操作指令,包括:The method according to any one of claims 1 to 3, wherein the executing the target operation instruction based on the target operation object and the target position information includes:
    基于第二转换参数,将所述目标位置信息转换为在第三坐标系中的第三位置信息;converting the target position information into third position information in a third coordinate system based on a second conversion parameter;
    基于所述目标操作对象和所述第三位置信息,执行所述目标操作指令。The target operation instruction is executed based on the target operation object and the third position information.
  5. 根据权利要求4所述的方法,其中,应用于机器人,所述方法还包括:The method of claim 4, wherein, applied to a robot, the method further comprises:
    对所述机器人的机械臂进行标定,确定所述第二转换参数。Calibrate the mechanical arm of the robot to determine the second transformation parameter.
  6. 根据权利要求4或5所述的方法,其中,应用于对弈机器人,在所述预设操作规则包括对弈规则的情况下,所述对象包括棋子,所述目标操作对象包括目标棋子;The method according to claim 4 or 5, wherein, when applied to a game robot, in the case where the preset operating rules include game rules, the object includes chess pieces, and the target operation object includes target chess pieces;
    所述基于每一所述对象的第二位置信息和预设操作规则,确定目标操作信息,包括:The determining target operation information based on the second location information and preset operation rules of each of the objects includes:
    基于每一所述棋子的第二位置信息和对弈规则,确定目标棋子、目标操作指令和在所述第二坐标系中的目标位置信息。Based on the second position information of each chess piece and the game rules, determine the target chess piece, the target operation instruction and the target position information in the second coordinate system.
  7. 根据权利要求6所述的方法,其中,在所述目标操作指令包括吃棋指令的情况下,所述目标棋子包括第一棋子和第二棋子,所述第三位置信息包括所述第一棋子的第一子位置和所述第二棋子的第二子位置;The method according to claim 6, wherein, in the case where the target operation instruction includes a chess capture instruction, the target chess piece includes a first chess piece and a second chess piece, and the third position information includes the first chess piece the first sub-position of said second pawn and the second sub-position of said second pawn;
    所述基于所述目标操作对象和所述第三位置信息,执行所述目标操作指令,包括:The executing the target operation instruction based on the target operation object and the third position information includes:
    基于所述第一子位置,控制所述机械臂取走所述第一棋子;Based on the first sub-position, controlling the mechanical arm to take away the first chess piece;
    基于所述第二子位置,控制所述机械臂抓取所述第二棋子,并将所述第二棋子移动至所述第一子位置。Based on the second sub-position, the mechanical arm is controlled to grab the second chess piece and move the second chess piece to the first sub-position.
  8. 根据权利要求6或7所述的方法,其中,在所述目标操作指令包括下棋指令的情况下,所述第三位置信息包括所述目标棋子的第三子位置;The method according to claim 6 or 7, wherein, in the case where the target operation instruction comprises a chess playing instruction, the third position information comprises the third sub-position of the target chess piece;
    所述基于所述目标操作对象和所述第三位置信息,执行所述目标操作指令,包括:The executing the target operation instruction based on the target operation object and the third position information includes:
    控制所述对弈机器人的机械臂将所述目标棋子放置在所述第三子位置。Controlling the mechanical arm of the playing robot to place the target chess piece at the third sub-position.
  9. 根据权利要求4或5所述的方法,其中,应用于绘图机器人,在所述预设操作规则包括绘制规则的情况下,所述对象包括图形,所述目标操作对象包括目标图形;The method according to claim 4 or 5, wherein, when applied to a drawing robot, when the preset operation rules include drawing rules, the object includes graphics, and the target operation object includes target graphics;
    所述基于每一所述对象的第二位置信息和预设操作规则,确定目标操作信息,包括:The determining target operation information based on the second location information and preset operation rules of each of the objects includes:
    基于每一所述图形的第二位置信息和绘制规则,确定目标图形、目标操作指令和在所述第二坐标系中的目标位置信息。Based on the second position information and the drawing rule of each of the figures, determine the target figure, the target operation instruction and the target position information in the second coordinate system.
  10. 根据权利要求9所述的方法,其中,所述基于所述目标操作对象和所述第三位置信息,执行所述目标操作指令,包括以下至少之一:The method according to claim 9, wherein the executing the target operation instruction based on the target operation object and the third position information comprises at least one of the following:
    在所述目标操作指令包括绘制指令的情况下,控制所述绘图机器人的机械臂按照所述目标位置信息绘制所述目标图形;When the target operation instruction includes a drawing instruction, controlling the mechanical arm of the drawing robot to draw the target figure according to the target position information;
    在所述目标操作指令包括擦除指令的情况下,控制所述绘图机器人的机械臂擦除所述目标位置信息的所述目标图形;In the case where the target operation instruction includes an erase instruction, controlling the mechanical arm of the drawing robot to erase the target graphic of the target position information;
    在所述目标操作指令包括移动指令的情况下,获取所述目标位置信息中的第四子位置和第五子位置,并控制所述绘图机器人的机械臂将位于所述第四子位置的所述目标图形移动至所述第五子位置。In the case where the target operation instruction includes a movement instruction, obtain the fourth sub-position and the fifth sub-position in the target position information, and control the mechanical arm of the drawing robot to be located at all positions of the fourth sub-position. The target graphic moves to the fifth sub-position.
  11. 一种数据处理装置,所述装置包括:A data processing device, said device comprising:
    第一获取部分,被配置为获取至少一个对象在第一坐标系中的第一位置信息;a first acquisition part configured to acquire first position information of at least one object in the first coordinate system;
    第一转换部分,被配置为基于第一转换参数,将每一所述对象在所述第一坐标系中的所述第一位置信息转换为在第二坐标系中的第二位置信息;a first conversion part configured to convert the first position information of each of the objects in the first coordinate system into second position information in a second coordinate system based on a first conversion parameter;
    第一确定部分,被配置为基于每一所述对象的第二位置信息和预设操作规则,确定目标操作信息,所述目标操作信息包括目标操作对象、目标操作指令和在所述第二坐标系中的目标位置信息;The first determination part is configured to determine target operation information based on the second position information and preset operation rules of each of the objects, the target operation information including target operation objects, target operation instructions and Target location information in the system;
    第一执行部分,被配置为基于所述目标操作对象和所述目标位置信息,执行所述目标操作指令。The first execution part is configured to execute the target operation instruction based on the target operation object and the target position information.
  12. 根据权利要求11所述的装置,其中,所述第一获取部分,还被配置为:The device according to claim 11, wherein the first acquisition part is further configured to:
    获取摄像模组采集的图像信息;Obtain image information collected by the camera module;
    基于所述图像信息,获取每一所述对象在第一坐标系中的第一位置信息。Based on the image information, first position information of each of the objects in the first coordinate system is acquired.
  13. 根据权利要求12所述的装置,其中,所述装置还包括第二确定部分;The apparatus according to claim 12, wherein the apparatus further comprises a second determining part;
    所述第二确定部分,被配置对所述摄像模组进行标定,确定所述第一转换参数。The second determining part is configured to calibrate the camera module and determine the first conversion parameter.
  14. 根据权利要求11至13中任一项所述的装置,其中,所述第一执行部分,还被配置:The device according to any one of claims 11 to 13, wherein the first execution part is further configured to:
    基于第二转换参数,将所述目标位置信息转换为在第三坐标系中的第三位置信息;converting the target position information into third position information in a third coordinate system based on a second conversion parameter;
    基于所述目标操作对象和所述第三位置信息,执行所述目标操作指令。The target operation instruction is executed based on the target operation object and the third position information.
  15. 根据权利要求14所述的装置,其中,应用于机器人,所述装置还包括第三确定部分;The apparatus according to claim 14, wherein, applied to a robot, the apparatus further comprises a third determining part;
    所述第三确定部分,被配置为对所述机器人的机械臂进行标定,确定所述第二转换参数。The third determining part is configured to calibrate the mechanical arm of the robot to determine the second transformation parameter.
  16. 根据权利要求14或15所述的装置,其中,应用于对弈机器人,在所述预设操作规则包括对弈规则的情况下,所述对象包括棋子,所述目标操作对象包括目标棋子;所述第一确定部分,还被配置为:The device according to claim 14 or 15, wherein, when applied to a game robot, when the preset operating rules include game rules, the object includes a chess piece, and the target operation object includes a target chess piece; the second A certain section is also configured as:
    基于每一所述棋子的第二位置信息和对弈规则,确定目标棋子、目标操作指令和在所述第二坐标系中的目标位置信息。Based on the second position information of each chess piece and the game rules, determine the target chess piece, the target operation instruction and the target position information in the second coordinate system.
  17. 根据权利要求16所述的装置,其中,在所述目标操作指令包括吃棋指令的情况下,所述目标棋子包括第一棋子和第二棋子,所述第三位置信息包括所述第一棋子的第一子位置和所述第二棋子的第二子位置;所述第一执行部分,还被配置为:The device according to claim 16, wherein, in the case where the target operation instruction includes a capture chess instruction, the target chess piece includes a first chess piece and a second chess piece, and the third position information includes the first chess piece The first sub-position of the second pawn and the second sub-position of the second chess piece; the first execution part is also configured to:
    基于所述第一子位置,控制所述机械臂取走所述第一棋子;Based on the first sub-position, controlling the mechanical arm to take away the first chess piece;
    基于所述第二子位置,控制所述机械臂抓取所述第二棋子,并将所述第二棋子移动至所述第一子位置。Based on the second sub-position, the mechanical arm is controlled to grab the second chess piece and move the second chess piece to the first sub-position.
  18. 根据权利要求16或17所述的装置,其中,在所述目标操作指令包括下棋指令的情况下,所述第三位置信息包括所述目标棋子的第三子位置;所述第一执行部分,还被配置为:The device according to claim 16 or 17, wherein, in the case where the target operation instruction includes a chess playing instruction, the third position information includes the third sub-position of the target chess piece; the first executing part , also configured as:
    控制所述对弈机器人的机械臂将所述目标棋子放置在所述第三子位置。Controlling the mechanical arm of the playing robot to place the target chess piece at the third sub-position.
  19. 根据权利要求14或15所述的装置,其中,应用于绘图机器人,在所述预设操作规则包括绘制规则的情况下,所述对象包括图形,所述目标操作对象包括目标图形;所述第一确定部分,还被配置为:The device according to claim 14 or 15, wherein, when applied to a drawing robot, when the preset operation rules include drawing rules, the object includes graphics, and the target operation object includes target graphics; the second A certain section is also configured as:
    基于每一所述图形的第二位置信息和绘制规则,确定目标图形、目标操作指令和在所述第二坐标系中的目标位置信息。Based on the second position information and the drawing rule of each of the figures, determine the target figure, the target operation instruction and the target position information in the second coordinate system.
  20. 根据权利要求19所述的装置,其中,所述第一执行部分,还被配置为以下至少之一:The device according to claim 19, wherein the first executing part is further configured as at least one of the following:
    在所述目标操作指令包括绘制指令的情况下,控制所述绘图机器人的机械臂按照所述目 标位置信息绘制所述目标图形;When the target operation instruction includes a drawing instruction, control the mechanical arm of the drawing robot to draw the target figure according to the target position information;
    在所述目标操作指令包括擦除指令的情况下,控制所述绘图机器人的机械臂擦除所述目标位置信息的所述目标图形;In the case where the target operation instruction includes an erase instruction, controlling the mechanical arm of the drawing robot to erase the target graphic of the target position information;
    在所述目标操作指令包括移动指令的情况下,获取所述目标位置信息中的第四子位置和第五子位置,并控制所述绘图机器人的机械臂将位于所述第四子位置的所述目标图形移动至所述第五子位置。In the case where the target operation instruction includes a movement instruction, obtain the fourth sub-position and the fifth sub-position in the target position information, and control the mechanical arm of the drawing robot to be located at all positions of the fourth sub-position. The target graphic moves to the fifth sub-position.
  21. 一种计算机设备,包括处理器和存储器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现权利要求1至10中任一项所述方法。A computer device, comprising a processor and a memory, the memory stores a computer program that can run on the processor, and the processor implements the method according to any one of claims 1 to 10 when executing the computer program.
  22. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至10中任一项所述方法。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is realized.
  23. 一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序被计算机设备读取并执行时,实现权利要求1至10中任一项所述方法。A computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer device, the computer program product described in any one of claims 1 to 10 can be realized. described method.
PCT/CN2022/127674 2022-01-26 2022-10-26 Data processing method and apparatus, computer device, storage medium, and computer program product WO2023142555A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210094470.3 2022-01-26
CN202210094470.3A CN114425155A (en) 2022-01-26 2022-01-26 Data processing method and device, computer equipment and computer storage medium

Publications (1)

Publication Number Publication Date
WO2023142555A1 true WO2023142555A1 (en) 2023-08-03

Family

ID=81314042

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/127674 WO2023142555A1 (en) 2022-01-26 2022-10-26 Data processing method and apparatus, computer device, storage medium, and computer program product

Country Status (2)

Country Link
CN (1) CN114425155A (en)
WO (1) WO2023142555A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114425155A (en) * 2022-01-26 2022-05-03 北京市商汤科技开发有限公司 Data processing method and device, computer equipment and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6362003A (en) * 1986-09-03 1988-03-18 Nissan Motor Co Ltd Conversion method for tree-dimensional coordinates
JP2016120566A (en) * 2014-12-25 2016-07-07 株式会社キーエンス Image processing apparatus, image processing system, image processing method, and computer program
US20170277167A1 (en) * 2016-03-24 2017-09-28 Seiko Epson Corporation Robot system, robot control device, and robot
CN110559077A (en) * 2018-06-05 2019-12-13 上海联影医疗科技有限公司 Coordinate system registration method, robot control method, device, equipment and medium
CN111708366A (en) * 2020-06-29 2020-09-25 济南浪潮高新科技投资发展有限公司 Robot, method and device for controlling action of robot, and computer-readable storage medium
CN113313755A (en) * 2021-04-16 2021-08-27 中科创达软件股份有限公司 Method, device and equipment for determining pose of target object and storage medium
CN113696178A (en) * 2021-07-29 2021-11-26 大箴(杭州)科技有限公司 Control method and system, medium and equipment for intelligent robot grabbing
CN114425155A (en) * 2022-01-26 2022-05-03 北京市商汤科技开发有限公司 Data processing method and device, computer equipment and computer storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6362003A (en) * 1986-09-03 1988-03-18 Nissan Motor Co Ltd Conversion method for tree-dimensional coordinates
JP2016120566A (en) * 2014-12-25 2016-07-07 株式会社キーエンス Image processing apparatus, image processing system, image processing method, and computer program
US20170277167A1 (en) * 2016-03-24 2017-09-28 Seiko Epson Corporation Robot system, robot control device, and robot
CN110559077A (en) * 2018-06-05 2019-12-13 上海联影医疗科技有限公司 Coordinate system registration method, robot control method, device, equipment and medium
CN111708366A (en) * 2020-06-29 2020-09-25 济南浪潮高新科技投资发展有限公司 Robot, method and device for controlling action of robot, and computer-readable storage medium
CN113313755A (en) * 2021-04-16 2021-08-27 中科创达软件股份有限公司 Method, device and equipment for determining pose of target object and storage medium
CN113696178A (en) * 2021-07-29 2021-11-26 大箴(杭州)科技有限公司 Control method and system, medium and equipment for intelligent robot grabbing
CN114425155A (en) * 2022-01-26 2022-05-03 北京市商汤科技开发有限公司 Data processing method and device, computer equipment and computer storage medium

Also Published As

Publication number Publication date
CN114425155A (en) 2022-05-03

Similar Documents

Publication Publication Date Title
Lee et al. Camera-to-robot pose estimation from a single image
US9933856B2 (en) Calibrating vision systems
KR101566543B1 (en) Method and system for mutual interaction using space information argumentation
CN111880657A (en) Virtual object control method and device, electronic equipment and storage medium
CN111158469A (en) Visual angle switching method and device, terminal equipment and storage medium
CN102141838A (en) Visual based identitiy tracking
CN105138111A (en) Single camera based somatosensory interaction method and system
CN113426117B (en) Shooting parameter acquisition method and device for virtual camera, electronic equipment and storage medium
WO2023142555A1 (en) Data processing method and apparatus, computer device, storage medium, and computer program product
KR20200038111A (en) electronic device and method for recognizing gestures
WO2014075026A1 (en) Remote control using depth camera
TW202145065A (en) Image processing method, electronic device and computer-readable storage medium
CN110096144B (en) Interactive holographic projection method and system based on three-dimensional reconstruction
KR102565444B1 (en) Method and apparatus for identifying object
CN105468249B (en) Intelligent interaction system and its control method
CN110152288B (en) Game controller, game system and method for identifying game operation direction
WO2023202062A1 (en) Target docking method based on image recognition and terminal device and medium thereof
CN116912463A (en) 3D avatar processing method, apparatus, electronic device, and readable storage medium
CN111452046A (en) Virtual reality-based explosive-handling robot system, control method and storage medium
CN116012913A (en) Model training method, face key point detection method, medium and device
CN115294213A (en) Calibration tower, camera calibration method and device, electronic equipment and storage medium
CN115494938A (en) Non-contact interaction method and device
CN117115321B (en) Method, device, equipment and storage medium for adjusting eye gestures of virtual character
US20230133168A1 (en) Method for identifying human postures and gestures for interaction purposes and portable hand-held device
TWM474176U (en) Non-contact real-time interaction system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22923353

Country of ref document: EP

Kind code of ref document: A1