Human body posture recognition method, device and electronic equipment based on camera
By analyzing the light source projection shadow in the camera image and the coverage range of the target object, and extracting pedestrian characteristics and posture information, the problem of difficult pedestrian position when the camera is far away is solved, and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202410922259.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-07-10
AI Technical Summary
When the camera is far away, it is difficult to accurately identify the real-time posture of the pedestrian because the pedestrian only appears as a small number of pixels in the image.
By obtaining the image sent by the camera, the shadows projected by the static light source and dynamic light source are determined, and the characteristic information and posture information of the target object are extracted to determine the real-time position.
It effectively improves the accuracy of pedestrian position recognition and can accurately identify the real-time posture of pedestrians at a longer distance.
Smart Images

Figure CN118823676B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a camera-based human posture recognition method, apparatus, and electronic device. Background Technology
[0002] With the rapid development of image processing technology, cameras are being used in various scenarios, such as monitoring equipment manufacturing or traffic monitoring. Currently, in order to quickly identify the posture or behavior of pedestrians on the road, cameras are typically used to recognize the posture or movement of pedestrians. However, when pedestrians are far away from the camera, they are represented by a limited number of pixels in the image, making it difficult to determine the real-time pose of pedestrians from such a small number of pixels. Summary of the Invention
[0003] One objective of this disclosure is to provide a new technical solution for human posture recognition based on a camera.
[0004] According to a first aspect of this disclosure, a camera-based human pose recognition method is provided, the method comprising:
[0005] Acquire the first image sent by the camera in the first time period;
[0006] Identify a static light source in the first image, and identify a target object near the static light source and the object shadow associated with the target object;
[0007] Determine the target object shadow generated by the static light source projection in the object shadow, and determine the second object shadow generated by the dynamic light source projection in the object shadow;
[0008] Based on the object coverage area of the target object in the first image, the shadow coverage area of the target object in the first image, and the first relative positional relationship between the target object and the static light source, the object feature information of the target object is obtained;
[0009] Based on the range change of the shadow of the second object during the first time period and the second relative position relationship between the target object and the dynamic light source, the object pose information of the target object is obtained;
[0010] The real-time pose of the target object is determined based on the object feature information and the object pose information.
[0011] Optionally, determining the static light source in the first image includes:
[0012] A light source that appears a predetermined number of times at a fixed position in the first image of the first time period is identified and designated as a static light source; wherein the predetermined number of times is related to the length of the first time period.
[0013] Optionally, determining the target object near the static light source and the object shadow associated with the target object includes:
[0014] Identify the target object near the static light source;
[0015] Identify the object shadow in the first image that is connected to the bottom contour of the target object.
[0016] Optionally, obtaining the object feature information of the target object based on the object coverage area of the target object in the first image, the shadow coverage area of the target object's shadow in the first image, and the relative positional relationship between the target object and the static light source includes:
[0017] Determine road marking lines that include the coverage area of the object; wherein, the coverage area of the object is the range of the target object in the first image;
[0018] Based on the first predetermined position of the road marking line, the coverage area of the object, and the second predetermined position of the camera, the first positional relationship between the target object and the camera is determined;
[0019] Based on the first position of the static light source in the first image and the second set position of the camera, determine the second positional relationship between the static light source and the camera;
[0020] Based on the first positional relationship and the second positional relationship, the first relative positional relationship between the target object and the static light source is obtained;
[0021] Based on the first relative positional relationship, the direction of light from the static light source is determined;
[0022] Based on the direction of the light and the shadow coverage of the target object in the first image, the relative coverage of the target object is obtained and used as the object feature information of the target object.
[0023] Optionally, obtaining the object pose information of the target object based on the range change of the second object's shadow during the first time period and the second relative positional relationship between the target object and the dynamic light source includes:
[0024] Determine the second position of the dynamic light source in the first image corresponding to the first time node; wherein, the first time period includes the first time node;
[0025] Based on the second position and the second set position of the camera, determine the third positional relationship between the dynamic light source and the camera at the first time node;
[0026] Based on the third positional relationship and the first positional relationship, the second relative positional relationship between the target object and the dynamic light source at the first time node is obtained;
[0027] Based on the positional difference between the third relative positional relationship corresponding to the second time node and the second relative positional relationship; wherein, the first time period includes the second time node, and the second time node is before the first time node;
[0028] Based on the range difference between the first shadow range of the second object shadow corresponding to the first time node and the second shadow range of the second object shadow corresponding to the second time node;
[0029] The position difference and the range difference are input into a preset attitude determination model to obtain a numerical value representing the attitude of the target object, which is used as the object attitude information of the target object.
[0030] Optionally, the specific expression for the range difference includes:
[0031]
[0032]
[0033] Where S represents the shaded area, The value represents the length of the arc within the shadow area, r represents the radius of the circle containing the arc within the shadow area, b represents the width of the quadrilateral within the shadow area, a represents the length of the target object, and b represents the width of the target object. This indicates the relative positional relationship between the target object and the light source. Indicates the first shaded area. Indicates the second shaded area. Indicates the range difference;
[0034] Wherein, the dynamic light source corresponds to the third position of the second time node with the target object, and the position where the dynamic light source is closest to the target object is the fourth position; the posture judgment model includes a neural network model trained based on a sample set. ;
[0035] The step of inputting the position difference and the range difference into a preset attitude determination model to obtain a numerical value representing the attitude of the target object includes:
[0036] When the first difference between the fourth position and the second position is less than or equal to the second difference between the fourth position and the third position, if > If the value is positive, a first value indicating that the target object is in a standing posture is obtained; otherwise, a second value indicating that the target object is in a lying posture is obtained.
[0037] When the first difference between the fourth position and the second position is greater than the second difference between the fourth position and the third position, if If the result is positive, a first value indicating that the target object is in a standing posture is obtained; otherwise, a second value indicating that the target object is in a lying posture is obtained.
[0038] According to a second aspect of this disclosure, a camera-based human posture recognition device is also provided, the device comprising:
[0039] The image acquisition module is used to acquire the first image sent by the camera in the first time period;
[0040] A shadow determination module is used to determine a static light source in the first image, and to determine a target object near the static light source and the object shadow associated with the target object;
[0041] The projection determination module is used to determine the target object shadow generated by the static light source projection in the object shadow, and to determine the second object shadow generated by the dynamic light source projection in the object shadow;
[0042] The feature information acquisition module is used to obtain the object feature information of the target object based on the object coverage area of the target object in the first image, the shadow coverage area of the target object's shadow in the first image, and the relative positional relationship between the target object and the static light source;
[0043] The pose information acquisition module is used to obtain the object pose information of the target object based on the range change of the shadow of the second object in the first time period and the relative positional relationship between the target object and the dynamic light source;
[0044] The pose determination module is used to determine the real-time pose of the target object based on the object feature information and the object pose information.
[0045] According to a third aspect of this disclosure, an electronic device is also provided, including a memory and a processor, the memory being used to store a computer program; the processor being used to execute the computer program to implement the method according to a first aspect of this disclosure.
[0046] According to a fourth aspect of this disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the method described according to a first aspect of this disclosure.
[0047] One beneficial effect of the embodiments of this disclosure is that the human pose recognition method based on a camera provided by the present invention can use the target object shadow associated with a static light source and the second object shadow associated with a dynamic light source to determine the features and pose of the target object, effectively improving the accuracy of recognizing the pose of the target object.
[0048] Other features and advantages of the embodiments of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of the present disclosure and, together with their description, serve to explain the principles of the embodiments of the present disclosure.
[0050] Figure 1 This is a schematic diagram of the composition structure of a camera-based human pose recognition system capable of applying a camera-based human pose recognition method according to one embodiment.
[0051] Figure 2 This is a flowchart illustrating a camera-based human pose recognition method according to one embodiment;
[0052] Figure 3 This is a block diagram of a camera-based human posture recognition device according to one embodiment;
[0053] Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to one embodiment. Detailed Implementation
[0054] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the invention.
[0055] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0056] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0057] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0058] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0059] <System Implementation Example>
[0060] Figure 1 This is a schematic diagram of the structural composition of a camera-based human pose recognition system capable of applying a camera-based human pose recognition method according to one embodiment. For example... Figure 1 As shown, the system includes a camera 200 and a camera-based human posture recognition device 100, and the system can be applied to traffic scenarios.
[0061] The camera 200 can be set on one side of the road and can capture the entire road or the other side of the road. The camera 200 can capture a first image containing the target object, vehicle 300 and street light 300.
[0062] The camera-based human posture recognition device 100 can be connected to the camera 200 via communication or electrical connection, and no limitation is made here.
[0063] In the embodiments of this disclosure, the memory of the camera-based human posture recognition device 100 is used to store a computer program that controls the processor of the camera-based human posture recognition device 100 to operate according to the camera-based human posture recognition method of any embodiment. Those skilled in the art can design the computer program based on the scheme of the embodiments of this disclosure. How the computer program controls the processor to operate is well known in the art and will not be described in detail here.
[0064] <Method Implementation>
[0065] Figure 2 This is a flowchart illustrating a camera-based human pose recognition method according to one embodiment. The implementing entity is, for example, a... Figure 1 A camera-based human posture recognition device 100.
[0066] like Figure 2 As shown, the camera-based human pose recognition method of this embodiment may include the following steps S210 to S260:
[0067] Step S210: Acquire the first image sent by the camera during the first time period.
[0068] In this embodiment, the first image may be composed of multiple image frames, and the first time period may be a period of time captured by the camera, such as 1 minute, 5 minutes, or half an hour.
[0069] Step S220: Determine the static light source in the first image, and determine the target object near the static light source and the object shadow associated with the target object.
[0070] In this embodiment, a static light source, such as a street lamp or a vehicle fixed in one position, can be used to identify target objects located near the static light source in the image frame. These target objects can be pedestrians, animals, etc., and are not limited here. The determination of the target object and its associated object shadow is, for example, achieved using existing Python and OpenCV combined with a webcam for human detection, which will not be elaborated upon here.
[0071] In some embodiments, in order to make full use of different static light sources to accurately determine the shadows cast by the static light sources on the target object, step S220 may include the following steps: determining light sources that appear a set number of times at a fixed position in the first image of the first time period, and using them as static light sources; wherein, the set number of times is related to the length of the first time period.
[0072] For example, the first time period is 1 minute long, with 1440 image frames, and the number of iterations is set to 700.
[0073] In some embodiments, step S220 may include the following steps: determining a target object near a static light source; determining an object shadow in a first image that is connected to the bottom contour of the target object.
[0074] In this embodiment, the bottom contour of the target object in the first image is determined as the object shadow of the target object, which can effectively reduce the occurrence of using the shadows of other objects connected to the target object as the object shadow of the target object. Specifically, existing background segmenters in OpenCV can be used to determine the various shadows in the first image, and existing machine learning techniques can use human shadows as samples for deep learning to extract human shadows from partially overlapping shadows in the image.
[0075] Step S230: Determine the target object shadow generated by the projection of a static light source in the object shadow, and determine the second object shadow generated by the projection of a dynamic light source in the object shadow.
[0076] Step S240: Based on the object coverage area of the target object in the first image, the shadow coverage area of the target object in the first image, and the first relative positional relationship between the target object and the static light source, the object feature information of the target object is obtained.
[0077] In some embodiments, in order to more accurately determine the object feature information of the target object, a road marking line containing the object coverage area is determined; wherein, the object coverage area is the range of the target object in the first image; a first positional relationship between the target object and the camera is determined based on a first predetermined position of the road marking line, the object coverage area, and a second predetermined position of the camera; a second positional relationship between the static light source and the camera is determined based on a first position of the static light source in the first image and the second predetermined position of the camera; a first relative positional relationship between the target object and the static light source is obtained based on the first and second positional relationships; the light direction of the static light source is determined based on the first relative positional relationship; and the relative coverage area of the target object is obtained based on the light direction and the shadow coverage area of the target object in the first image, and is used as the object feature information of the target object.
[0078] In some examples, such as Figure 1 As shown, the first image may contain a first set position of road marking lines.
[0079] In some examples, the object coverage area can be the object coverage area contained in the outline of the target object obtained by the camera-based human pose recognition device through the first image.
[0080] In some examples, the second set position of the camera can be preset. That is, when the first set position and the second set position are determined, the first positional relationship can be determined. When the first position and the second set position are determined, the second positional relationship can be determined. When the relative positions of the camera with the target object and the static light source are determined respectively, the first relative positional relationship between the target object and the static light source can be determined, thereby determining the relative coverage area of the target object.
[0081] Step S250: Based on the range change of the second object shadow in the first time period and the second relative position relationship between the target object and the dynamic light source, obtain the object pose information of the target object.
[0082] In some embodiments, to more accurately determine the pose of the target object, step S250 may include the following steps: determining a second position of the dynamic light source in the first image corresponding to a first time node; wherein the first time period includes the first time node; determining a third positional relationship between the dynamic light source and the camera at the first time node based on the second position and a second set position of the camera; obtaining a second relative positional relationship between the target object and the dynamic light source at the first time node based on the third positional relationship and the first positional relationship; determining the positional difference between the third relative positional relationship and the second relative positional relationship corresponding to the second time node; wherein the first time period includes the second time node, and the second time node is before the first time node; determining the range difference between the first shadow range of the second object shadow corresponding to the first time node and the second shadow range of the second object shadow corresponding to the second time node; inputting the positional difference and the range difference into a preset pose determination model to obtain a value representing the pose of the target object, and using it as the object pose information of the target object.
[0083] In some embodiments, the specific expression for the range difference includes:
[0084]
[0085]
[0086] Where S represents the shaded area, The value represents the length of the arc within the shadow area, r represents the radius of the circle containing the arc within the shadow area, b represents the width of the quadrilateral within the shadow area, a represents the length of the target object, and b represents the width of the target object. This indicates the relative positional relationship between the target object and the light source. Indicates the first shaded area. Indicates the second shaded area. Indicates the range difference;
[0087] Among them, the third position of the dynamic light source and the target object corresponds to the second time node, and the fourth position is the closest position between the dynamic light source and the target object; the pose determination model includes a neural network model trained based on the sample set. The sample set includes dynamic light sources at different locations and different target objects.
[0088] The position difference and range difference are input into a preset attitude determination model to obtain numerical values representing the attitude of the target object, including:
[0089] When the first difference between the fourth position and the second position is less than or equal to the second difference between the fourth position and the third position, if > If the result is positive, then the first value representing the target object is in a standing posture is obtained; otherwise, the second value representing the target object is in a lying posture is obtained.
[0090] When the first difference between the fourth position and the second position is greater than the second difference between the fourth position and the third position, if If the result is positive, then the first value representing the target object is in a standing posture is obtained; otherwise, the second value representing the target object is in a lying posture is obtained.
[0091] In other words, by processing the shadows cast by a dynamic light source on a target object and determining whether the target object's posture has changed, the accuracy of determining the target object's posture can be effectively improved.
[0092] Step S260: Determine the real-time pose of the target object based on the object feature information and the object pose information.
[0093] In some examples, once the real-time pose of the target object is determined, countermeasures can be quickly implemented in the event of an accident or incident involving the target object.
[0094] <Equipment Example 1>
[0095] Figure 3 This is a schematic diagram of a camera-based human posture recognition device according to one embodiment. Figure 3 As shown, the camera-based human posture recognition device 300 may include:
[0096] Image acquisition module 210 is used to acquire the first image sent by the camera in the first time period;
[0097] The shadow determination module 220 is used to determine a static light source in the first image, and to determine a target object near the static light source and the object shadow associated with the target object;
[0098] The projection determination module 230 is used to determine the target object shadow generated by the static light source projection in the object shadow, and to determine the second object shadow generated by the dynamic light source projection in the object shadow;
[0099] The feature information obtaining module 240 is used to obtain the object feature information of the target object based on the object coverage area of the target object in the first image, the shadow coverage area of the target object's shadow in the first image, and the relative positional relationship between the target object and the static light source;
[0100] The pose information acquisition module 250 is used to obtain the object pose information of the target object based on the range change of the shadow of the second object in the first time period and the relative positional relationship between the target object and the dynamic light source;
[0101] The pose determination module 260 is used to determine the real-time pose of the target object based on the object feature information and the object pose information.
[0102] Optionally, the shadow determination module 220 is used to determine the light source that appears at a fixed position a set number of times in the first image of the first time period, and use it as a static light source; wherein the set number of times is related to the length of the first time period.
[0103] Optionally, the shadow determination module 220 is used to determine a target object near the static light source; and to determine the object shadow in the first image that is connected to the bottom contour of the target object.
[0104] Optionally, the feature information obtaining module 240 is used to determine road marking lines that include the coverage area of an object; wherein, the coverage area of the object is the range of the target object in the first image; a first positional relationship between the target object and the camera is determined based on a first predetermined position of the road marking lines, the coverage area of the object, and a second predetermined position of the camera; a second positional relationship between the static light source and the camera is determined based on a first predetermined position of the static light source in the first image and the second predetermined position of the camera; a first relative positional relationship between the target object and the static light source is obtained based on the first relative positional relationship; the light direction of the static light source is determined based on the first relative positional relationship; and the relative coverage area of the target object is obtained based on the light direction and the shadow coverage area of the target object in the first image, and is used as the object feature information of the target object.
[0105] Optionally, the posture information obtaining module 250 is used to determine the second position of the dynamic light source in the first image corresponding to a first time node; wherein the first time period includes the first time node; based on the second position and the second set position of the camera, a third positional relationship between the dynamic light source and the camera at the first time node is determined; based on the third positional relationship and the first positional relationship, a second relative positional relationship between the target object and the dynamic light source at the first time node is obtained; based on the position difference between the third relative positional relationship corresponding to the second time node and the second relative positional relationship; wherein the first time period includes the second time node, and the second time node is before the first time node; based on the range difference between the first shadow range of the shadow of the second object corresponding to the first time node and the second shadow range of the shadow of the second object corresponding to the second time node; the position difference and the range difference are input into a preset posture judgment model to obtain a value representing the posture of the target object, and used as the object posture information of the target object.
[0106] Optionally, the attitude information obtaining module 250 is configured to, when the first difference between the fourth position and the second position is less than or equal to the second difference between the fourth position and the third position, if > If the first value indicates that the target object is in a standing posture, then a first value is obtained; otherwise, a second value indicates that the target object is in a lying posture; if the first difference between the fourth position and the second position is greater than the second difference between the fourth position and the third position, then... If the result is positive, a first value indicating that the target object is in a standing posture is obtained; otherwise, a second value indicating that the target object is in a lying posture is obtained.
[0107] <Equipment Example 2>
[0108] Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to another embodiment.
[0109] like Figure 4 As shown, the electronic device 400 includes a processor 410 and a memory 420, the memory 420 for storing an executable computer program, and the processor 410 for executing methods as described in any of the above method embodiments under the control of the computer program.
[0110] The electronic device 400 can be a camera-based human posture recognition device 100.
[0111] Each module of the camera-based human posture recognition device 300 described above can be implemented by the processor 410 executing the computer program stored in the memory 420 in this embodiment, or it can be implemented by other structures, which are not limited here.
[0112] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0113] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0114] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0115] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0116] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0117] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0118] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0120] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.
Claims
1. A human body posture recognition method based on a camera, characterized in that: The method comprises: Acquire a first image sent by the camera in a first time period; Determining a static light source in the first image, and determining a target object near the static light source and an object shadow associated with the target object; Determine a target object shadow generated by the static light source projection in the object shadow, and determine a second object shadow generated by the dynamic light source projection in the object shadow; Obtaining object feature information of the target object according to an object coverage range of the target object in the first image, a shadow coverage range of the shadow of the target object in the first image, and a first relative position relationship between the target object and the static light source; Obtaining object posture information of the target object according to a range change amount of the shadow of the second object in the first time period and a second relative position relationship between the target object and the dynamic light source; Determining the real-time position and posture of the target object according to the object feature information and the object posture information; The determining of the static light source in the first image includes: Determine a light source that appears a set number of times at a fixed position in the first image of the first time period and uses it as a static light source; wherein the set number of times is related to the length of the first time period; The determining of the target object near the static light source and the object shadow associated with the target object comprises: Determining a target object near the static light source; Determining an object shadow in the first image connected to a bottom contour of the target object; The obtaining object feature information of the target object according to the object coverage range of the target object in the first image, the shadow coverage range of the shadow of the target object in the first image, and the first relative position relationship between the target object and the static light source includes: Determine a road marking line that includes an object coverage range; wherein the object coverage range is a range of the target object in the first image; Determining a first position relationship between the target object and the camera according to a first set position of the road marking line, the object coverage range, and a second set position of the camera; Determining a second position relationship between the static light source and the camera according to a first position of the static light source in the first image and a second set position of the camera; Obtaining a first relative position relationship between the target object and the static light source according to the first position relationship and the second position relationship; Determining the light direction of the static light source according to the first relative position relationship; According to the light direction and the shadow coverage of the target object in the first image, a relative coverage of the target object is obtained and used as object feature information of the target object.
2. The method according to claim 1, characterized in that: The obtaining the object posture information of the target object according to the range change of the shadow of the second object in the first time period and the second relative position relationship between the target object and the dynamic light source includes: Determine a second position of the dynamic light source in the first image corresponding to a first time node; wherein the first time period includes the first time node; Determining a third position relationship between the dynamic light source and the camera at the first time node according to the second position and the second set position of the camera; According to the third position relationship and the first position relationship, obtaining a second relative position relationship between the target object and the dynamic light source at the first time node; Determine a position difference between a third relative position relationship corresponding to a second time node and the second relative position relationship; wherein the first time period includes the second time node, and the second time node is before the first time node; Determine a range difference between a first shadow range of the second object shadow corresponding to the first time node and a second shadow range of the second object shadow corresponding to the second time node; The position difference and the range difference are input into a preset posture judgment model to obtain a numerical value representing the posture of the target object as the object posture information of the target object.
3. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 2.
4. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, which implements the method according to any one of claims 1 to 2 when executed by a processor.
5. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 2 when being executed by a processor.
Citation Information
Patent Citations
Method and device for processing image
CN104639843A
Illumination consistency quantitative evaluation method in virtual-real fusion scene
CN114627273A