Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of a robot target following control method according to an embodiment of the present invention, which is applicable to a robot following control situation. The method can be executed by a robot target following control device, which can be implemented in a hardware and/or software manner, and referring to fig. 1, the method provided by the embodiment of the invention specifically includes the following steps:
and step 110, acquiring an environment image based on a camera, and identifying a region image in the environment image.
Wherein, the camera can be the device that has the image acquisition function, and the camera can include monocular camera, two mesh cameras, many meshes camera and wide angle camera etc.. The environment image may be an image of an environment in which the robot is located, may include an image of an object located in front of or at a side of the robot, and the region image may be an image of the environment including a single human body, and it is understood that the region image may be located inside the environment image.
In the embodiment of the invention, the robot can use the camera to acquire the environment image of the environment where the robot is located, wherein the camera can be installed in the robot. The method for identifying the region image in the environment image may include identifying the environment image to obtain the region image including a single human body, where a manner of identifying the region image in the environment image is not limited, for example, determining whether a human face is in the environment image or identifying a human posture in the environment image, so as to determine the region image in the environment image.
And step 120, determining a following target according to the personnel characteristics of the area image.
The person feature may be a feature in the region image, and may include a pose feature, a biological feature, and the like.
Specifically, the person features in the region image can be extracted through a neural network model or image matching, the person features can be distinguished and determined, whether the person features meet the requirement of the target or not can be judged, and the region image meeting the requirement of the target can be used as the target.
And step 130, determining a moving path according to the position information of the following target, and controlling the robot to act according to the moving path.
The position information may be information of a position where the following target is located, and may include position coordinates and a direction, the moving path may be composed of one or more position points, and the robot may serve the following target along the moving path.
In the embodiment of the invention, the position information of the following target can be extracted, the moving path can be generated according to the position information, the robot can be controlled to move according to the moving path, and the following of the following target is realized. It is understood that the process of target following may be a dynamic process, and after the robot follows the moving path to the following template, the steps 110 to 130 may be executed again to achieve target following. Wherein the generation of the movement path may be determined by fitting the position information and the robot position.
According to the embodiment of the invention, the camera is used for acquiring the environment image, the area image in the environment image is determined, the following target is determined according to the personnel characteristics of the area image, the moving path is generated according to the position information of the following target and the action is carried out, so that the target following of the robot is realized, the influence of the environment on the following effect can be reduced, and the target following stability of the robot can be improved.
Example two
Fig. 2 is a flowchart of another robot target following control method provided in the second embodiment of the present invention, and the second embodiment of the present invention is embodied on the basis of the above-mentioned embodiment of the present invention, and referring to fig. 2, the method provided in the second embodiment of the present invention specifically includes the following steps:
and step 210, controlling a camera to acquire an environment image of the robot in a preset direction at regular time.
The preset direction may be a preset acquisition direction of the environment image, and the preset direction may include a front direction of the robot, a side direction of the robot, an upper direction of the robot, and the like.
In the embodiment of the invention, the robot can control the camera to acquire the environment image along the preset direction, and the preset direction can be set by a robot user or set by the robot according to the configuration file.
And step 220, extracting a region image in the environment image according to the person identification characteristics.
The character recognition features may be features for recognizing a human body, may include biological features of the human body, such as arms, a head, a chest, an abdomen, legs, and the like, may also include posture features of the human body, may include a skeleton architecture of the human body, and further may train a neural network model using the character recognition features, recognize an environmental image through the neural network model, and determine a region image existing in the environmental image.
Specifically, the person identification feature can be directly used for detecting the environment image to determine whether a single human body exists in the environment image, the area where the single human body is located can be determined as the area image, the person identification feature can also be used for training a neural network model, whether the single human body exists in the environment image is determined through detection of the neural network model on the environment image, and the area of the environment image where the single human body is located can be used as the area image. Further, in order to improve the accuracy of extracting the region images, when a plurality of human bodies exist in the environment image, feature information of each human body in the region images may be extracted, and whether the same person belongs to the same person may be determined using the feature information, so that a plurality of non-overlapping region images may be recognized.
And step 230, extracting the personnel features in the area image.
In the embodiment of the invention, the personnel features can be extracted from each region image and used for judging the following target, wherein the personnel features can comprise biological features, human body posture features or feature parameters generated by processing the region images by an artificial intelligence model.
And step 240, comparing the personnel characteristics with prestored target characteristics of the following targets.
The target feature may be feature information of the following target, the target feature may be stored in the robot in advance, and the target feature may be stored in the form of text or image.
Specifically, the person characteristic may be compared with a pre-stored target characteristic to determine whether the person characteristic is the same as the target characteristic, and the comparison may include comparison of text parameters or comparison of image pixel points.
And step 250, setting the region image with the same personnel characteristic and target characteristic as a follow target.
In the embodiment of the present invention, when the person feature is the same as the target feature, the region image corresponding to the person feature may be set as the following target, for example, mark information may be set for the region image or position information of the region image may be stored in a preset position.
And step 260, determining the distance and the direction between the following target and the robot as position information.
In the embodiment of the present invention, the region image may be processed, and the distance between the region image and the robot and the direction of the region image at the origin of the robot may be determined. The processing of the region image may include coordinate system conversion, converting the region image from a camera coordinate system to a world coordinate system, determining position coordinates of the region image in the world coordinate system, and determining a distance and a direction with a robot position as an origin.
And step 270, determining the position point and the moving speed of the moving path according to the distance and the direction.
The position point can be a component in a moving path, the position point can be located between the robot and the following target, the position point can be determined in a mode of inserting points on a connecting line between the robot and the following target, the moving speed can be the speed for controlling the robot to move, and the value of the moving speed can be preset or determined by the walking speed of the following target.
Specifically, one or more position points can be determined according to the distance and the direction of the following target to form a moving path for controlling the robot to walk. And determining the moving speed of the control robot together according to the following target and the preset speed.
And step 280, controlling the robot to act along the position points according to the moving speed.
Specifically, the moving speed of the robot may be set and the robot may be controlled to move according to one or more position points in the moving path.
And 290, generating notification information to remind the following target when the robot loses the following target.
Specifically, when the robot loses the following target, for example, the robot does not recognize the following target, or the robot fails to lock the following target in the moving process, notification information can be generated to remind the following target that the robot fails to follow, the notification information can be transmitted to the following target in a manner of including short messages or software information, and the specific form of the notification information can be voice, text, graphics or video.
According to the embodiment of the invention, the camera is controlled to collect the environment graph in the preset direction, the area image in the environment graph is extracted according to the character recognition characteristics, wherein the area image comprises the image area of a single human body, the personnel characteristics of the area image are extracted from the area image, the extracted personnel characteristics are compared with the target characteristics, the area image with the same comparison is set as the following target, the position point and the moving speed are determined according to the distance and the direction of the following target, the robot action is controlled according to the position point and the moving speed, and the notification information is generated to remind the following target when the following target is lost, so that the target following of the robot is realized, the influence of the environment on the following effect can be reduced, and the target following stability of the robot can be improved.
Further, on the basis of the above embodiment of the invention, the region image includes an image region of a single human body.
Further, on the basis of the above embodiment of the invention, the method further includes: and if the follow-up target does not exist in the environment image, controlling the camera to adjust the visual angle direction and reacquire the environment image.
In the embodiment of the present invention, when the following target is not identified in the environment image, the vision of the camera image may be controlled, for example, to move left or right, so that the camera acquires a new environment image.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a robot target following control device provided in the third embodiment of the present invention, which is capable of executing the robot target following control method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. The device can be implemented by software and/or hardware, and specifically comprises: a person identification module 301, a target determination module 302 and a target following module 303.
The personnel identification module 301 is configured to acquire an environment image based on a camera and identify a region image in the environment image.
And the target determining module 302 is used for determining a following target according to the personnel characteristics of the area image.
And the target following module 303 is configured to determine a moving path according to the position information of the following target, and control the robot to act according to the moving path.
According to the technical scheme of the embodiment of the invention, the personnel identification module is used for acquiring the environment image by using the camera and determining the area image in the environment image, the target determination module is used for determining the following target according to the personnel characteristics of the area image, and the target following module is used for generating the moving path and performing actions according to the position information of the following target so as to realize target following of the robot, reduce the influence of the environment on the following effect and improve the stability of the target following of the robot.
Further, on the basis of the above embodiment of the invention, the image capturing module 301 in the apparatus includes:
and the image acquisition unit is used for controlling the camera to acquire the environmental image of the preset direction of the robot in real time.
And the personnel identification unit is used for extracting the area image in the environment image according to the person identification characteristics.
Further, on the basis of the above embodiment of the present invention, the target determining module 302 includes:
and the personnel feature unit is used for extracting the personnel features in the area image.
And the characteristic comparison unit is used for comparing the personnel characteristic with a prestored target characteristic of the following target.
A following determination unit configured to set the region image in which the person feature and the target feature are the same as a following target.
Further, on the basis of the above embodiment of the invention, the target following module 303 includes:
a position information unit for determining a distance and a direction of the following target from the robot as the position information.
And the parameter determining unit is used for determining the position point and the moving speed of the moving path according to the distance and the direction.
And the movement control unit is used for controlling the robot to act along the position points according to the movement speed.
Further, on the basis of the above embodiment of the invention, the apparatus further includes:
and the acquisition adjusting module is used for controlling the camera to adjust the visual angle direction and reacquire the environment image if the following target does not exist in the environment image.
Further, on the basis of the above embodiment of the invention, the apparatus further includes: and the alarm module is used for generating notification information to remind the following target when the robot loses the following target.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an electronic device 312 suitable for use in implementing embodiments of the present invention. The electronic device 312 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of the use of the embodiment of the present invention. The device 312 is typically a computing device that implements a robot target following control method.
As shown in fig. 4, electronic device 312 is in the form of a general purpose computing device. The components of the electronic device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 that couples the various system components including the storage device 328 and the processors 316.
Bus 318 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic device 312 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 312 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 328 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 330 and/or cache Memory 332. The electronic device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 334 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 318 by one or more data media interfaces. Storage 328 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 336 having a set (at least one) of program modules 326 may be stored, for example, in storage 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which may comprise an implementation of a network environment, or some combination thereof. Program modules 326 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
Electronic device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), with one or more devices that enable a user to interact with electronic device 312, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 312 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 322. Also, the electronic device 312 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 320. As shown, a network adapter 320 communicates with the other modules of the electronic device 312 via the bus 318. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 312, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 316 executes various functional applications and data processing by executing programs stored in the storage device 328, for example, to implement the robot target following control method provided by the above-described embodiment of the present invention.
EXAMPLE five
Embodiments of the present invention provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processing apparatus, implements a gesture recognition method as in embodiments of the present invention. The computer readable medium of the present invention described above may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an environment image based on a wide-angle camera, and identifying a region image in the environment image; determining a following target according to the personnel characteristics of the area image; and determining a moving path according to the position information of the following target, and controlling the robot to act according to the moving path.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of embodiments of the disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.