Method and apparatus for determining a recognition area, and electronic device
By using electronic devices to generate target identification boxes and outputting them to the guidance display screen during the motion recognition process, the problem of decreased recognition rate caused by the user leaving the motion detection range is solved, and a higher body movement recognition rate is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU LEAFUN CULTURE SCI & TECH
- Filing Date
- 2023-03-31
- Publication Date
- 2026-06-12
AI Technical Summary
During the motion recognition process, users may leave the motion detection range, causing their body movements to be unrecognizable, which reduces the recognition rate.
The electronic device receives images captured by the first and second cameras of the motion detection device, identifies the coordinates and positional relationships of the photographed object, generates a target identification box, and outputs it to the guidance display screen to guide the user into the motion detection range.
It improves the recognition rate of user body movements during motion sensing and avoids recognition failures caused by the user leaving the detection range.
Smart Images

Figure CN116246061B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, specifically to a method, apparatus, and electronic device for determining a recognition area. Background Technology
[0002] With the rapid development of human-computer interaction technology, motion recognition technology has gradually become a popular technology in modern human-computer interaction. Motion recognition technology enables computer control by recognizing human body movements. Users do not need to wear any sensing devices; they can interact with the computer simply by making gestures or other body movements. However, users are often unaware of the motion detection range of the motion sensing device. If the user leaves the detection range, the motion recognition process will fail to recognize the user's body movements, thus reducing the recognition rate. Summary of the Invention
[0003] This application discloses a method, apparatus, and electronic device for determining a recognition area, which can improve the recognition rate of users' body movements during the motion recognition process.
[0004] This application discloses a method for determining a recognition area, applied to an electronic device. The electronic device is communicatively connected to a guide display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than the shooting range of the second camera, and the shooting range of the second camera is the motion detection range corresponding to the motion detection device. The method includes:
[0005] The device receives a first image and a second image sent by the motion detection device; the first image is captured by the first camera, and the second image is captured by the second camera; the first image includes the object being photographed and the guide display screen.
[0006] Identify the first image coordinates of the captured object in the first image;
[0007] The object being photographed is identified in the second image to obtain a first recognition result, and a target bounding box is generated in the first image based on the coordinates of the first image and the first recognition result.
[0008] Determine the positional relationship between the target identification box and the guide display screen in the first image;
[0009] The display coordinates corresponding to the target identifier frame in the guidance display screen are determined based on the positional relationship, and the target identifier frame is output to the guidance display screen based on the display coordinates.
[0010] As an optional implementation, generating a target bounding box in the first image based on the first image coordinates and the first recognition result includes:
[0011] If the first recognition result indicates that the photographed object is recognized in the second image, a target identification box is generated in the first image according to the first image coordinates; the target identification box includes the first image coordinates.
[0012] As an optional implementation, after receiving the first and second images sent by the motion detection device, the method further includes:
[0013] Output the initial identification frame to the guidance display screen;
[0014] The step of identifying the photographed object in the second image to obtain a first identification result, and generating a target bounding box in the first image based on the first image coordinates and the first identification result, includes:
[0015] If the object is determined to be within the initial identification frame based on the first image coordinates of the object, and the first recognition result indicates that the object was not recognized in the second image, then the initial identification frame is adjusted based on the first image coordinates to obtain the target identification frame.
[0016] As an optional implementation, if the object is determined to be within the initial identification frame based on the first image coordinates of the object, and the first recognition result indicates that the object was not recognized in the second image, then adjusting the initial identification frame based on the first image coordinates to obtain the target identification frame includes:
[0017] If the target object is determined to be on the target boundary of the initial identification frame based on the first image coordinates of the target object, and the first recognition result indicates that the target object is not recognized in the second image, then the target boundary is moved a target distance toward the center position of the initial identification frame to obtain the target identification frame; the target boundary is any boundary of the initial identification frame.
[0018] As an optional implementation, after generating a target bounding box in the first image based on the first image coordinates and the first recognition result, the method further includes:
[0019] Define one or more test areas within the target identification box;
[0020] If the first image coordinates of the photographed object in the first image match the target test area, then it is determined that the photographed object is located in the target test area, and the recognition time of recognizing the photographed object in the acquired second image when the photographed object is located in the target test area is detected; the target test area can be any of the test areas.
[0021] Based on the recognition time corresponding to the subject in each of the test areas, the optimal recognition area within the target identification box is determined from the one or more test areas; the recognition time corresponding to the optimal recognition area is less than the time threshold.
[0022] As an optional implementation, the test area includes the central image area of the target identification box;
[0023] The step of determining the optimal recognition region within the target identification frame from the one or more test regions based on the recognition time corresponding to the subject in each of the test regions includes:
[0024] If the recognition time of the photographed object in the central image region of the target identification frame is less than the time threshold, the central image region of the target identification frame is determined as the optimal recognition region.
[0025] If the recognition time of the photographed object in the central image region of the target identification frame is greater than the time threshold, the optimal recognition region is determined from the neighboring image regions of the central image region of the target identification frame; the neighboring image regions are test regions whose distance from the central image region of the target identification frame is less than the distance threshold.
[0026] As an optional implementation, after determining the optimal recognition region within the target identification frame from the one or more test regions based on the recognition time corresponding to the subject in each of the test regions, the method further includes:
[0027] If the movement trajectory of the subject is determined based on the first image coordinates of the subject in multiple first images, and is determined to be moving from outside the target identification frame to the optimal recognition area, and then moving from the optimal recognition area to any boundary of the target identification frame, the subject is identified in the second image acquired during the subject's movement, a second recognition result is obtained, and the target identification frame is adjusted based on the second recognition result.
[0028] This application discloses a device for determining a recognition area, applied to an electronic device. The electronic device is communicatively connected to a guide display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than the shooting range of the second camera, and the shooting range of the second camera is the motion detection range corresponding to the motion detection device. The device includes:
[0029] The receiving module is used to receive a first image and a second image sent by the motion detection device; the first image is captured by the first camera, and the second image is captured by the second camera; the first image includes the object being photographed and the guide display screen.
[0030] The recognition module is used to identify the first image coordinates of the photographed object in the first image;
[0031] The generation module is used to identify the photographed object in the second image, obtain a first recognition result, and generate a target identification box in the first image based on the first image coordinates and the first recognition result;
[0032] A determining module is used to determine the positional relationship between the target identification box and the guide display screen in the first image;
[0033] The output module is used to determine the display coordinates corresponding to the target identification frame in the guide display screen according to the positional relationship, and output the target identification frame to the guide display screen according to the display coordinates.
[0034] This application discloses an electronic device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor implements any of the identification region determination methods disclosed in this application.
[0035] This application discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute any of the identification region determination methods disclosed in this application.
[0036] Compared with related technologies, the embodiments of this application have the following beneficial effects:
[0037] In this embodiment, the electronic device is communicatively connected to a guidance display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera, wherein the shooting range of the first camera is larger than that of the second camera, and the shooting range of the second camera is the motion detection range corresponding to the motion detection device. The electronic device receives a first image and a second image sent by the motion detection device, wherein the first image is an image captured by the first camera, and the second image is an image captured by the second camera. The first image includes the object being photographed and the guidance display screen. The electronic device identifies the first image coordinates of the object being photographed in the first image. The electronic device identifies the object being photographed in the second image, obtains a first recognition result, and generates a target identification box in the first image based on the first image coordinates and the first recognition result. The electronic device determines the positional relationship between the target identification box and the guidance display screen in the first image. The electronic device determines the display coordinates corresponding to the target identification box in the guidance display screen based on the positional relationship, and outputs the target identification box to the guidance display screen based on the display coordinates.
[0038] This application embodiment determines whether the subject is within the motion detection range of the second camera when it is located at the first image coordinates in the first image based on the first recognition result of the second image. Based on the first recognition result and the first image coordinates, a target identification box is generated in the first image and output to the guidance display screen to guide the subject into the motion detection range corresponding to the motion detection device. This avoids the problem of the user's body movements not being recognized when the subject leaves the motion detection range of the motion detection device during the motion recognition process, thus improving the recognition rate of the user's body movements. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1A This is a schematic diagram illustrating an application scenario of a method for determining an identification region disclosed in an embodiment of this application;
[0041] Figure 1B This is a schematic diagram illustrating an application scenario of another method for determining the identification region disclosed in an embodiment of this application;
[0042] Figure 1C This is a schematic diagram illustrating an application scenario of another method for determining the identification region disclosed in the embodiments of this application;
[0043] Figure 2This is a flowchart illustrating a method for determining an identification region disclosed in an embodiment of this application;
[0044] Figure 3 This is a schematic diagram of a first image and a second image acquired by a motion detection device disclosed in an embodiment of this application;
[0045] Figure 4 This is a flowchart illustrating another method for determining an identification region disclosed in an embodiment of this application;
[0046] Figure 5 This is a flowchart illustrating another method for determining an identification region disclosed in an embodiment of this application;
[0047] Figure 6 This is a schematic diagram of the structure of a region identification device disclosed in an embodiment of this application;
[0048] Figure 7 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation
[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0050] It should be noted that the terms "comprising" and "having," and any variations thereof, in the embodiments and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0051] This application discloses a method, apparatus, and electronic device for determining a recognition area, which can improve the recognition rate of users' body movements during motion recognition. These will be described in detail below.
[0052] Please see Figure 1A , Figure 1A This is a schematic diagram of an application scenario for a method for determining an identification area disclosed in an embodiment of this application. The application scenario may include an electronic device 10, a motion detection device 20, and a guidance display screen 30.
[0053] Electronic device 10 can be a personal computer, laptop computer, smartphone, tablet computer, wearable device, etc., but is not limited to these. Electronic device 10 can establish communication connections with motion detection device 20 and guidance display screen 30 respectively. For example, it can communicate via wireless communication methods such as Bluetooth and Wi-Fi (Wireless Fidelity), and there is no specific limitation.
[0054] The motion detection device 20 may include sensors such as an RGB camera, a depth camera, and a microphone array, and uses these sensors to sense information such as the body posture, movement, and sound of the subject being photographed, thereby enabling a device with multiple interaction methods such as wireless, gesture, and voice.
[0055] In this embodiment, the motion detection device 20 includes at least a first camera and a second camera.
[0056] The first camera may include an RGB camera, which can be used to capture color images of the surrounding environment. These color images can be used for facial recognition, pose recognition, and other functions of the subject being photographed.
[0057] The second camera may include a depth camera. The depth camera emits an infrared beam and analyzes the infrared beam reflected back after encountering an obstacle. It calculates the distance to objects in the surrounding environment, performs 3D modeling based on the distance to objects in the surrounding environment, obtains a depth image, and extracts the human skeleton from the depth image, thereby recognizing human limb movements.
[0058] Because RGB cameras capture images based on the principle of light reflection, their shooting range is only affected by the intensity of the light source. Depth cameras, on the other hand, use infrared beams. Therefore, the shooting range of a depth camera is limited not only by the intensity of the infrared beam but also by its measurable distance. Consequently, at greater distances and when the infrared beam intensity is weaker, the shooting range of a depth camera is limited. Therefore, the shooting range of an RGB camera is greater than that of a depth camera.
[0059] Since the motion detection device 20 mainly uses a depth camera to recognize the body movements of the subject being photographed, that is, the motion detection device 20 mainly uses a depth camera to perform motion recognition on the subject being photographed, the shooting range corresponding to the depth camera is the motion detection range corresponding to the motion detection device 20.
[0060] The motion detection device 20 can capture a first image through a first camera and a second image through a second camera, and send the first image and the second image to the electronic device 10; wherein, the first image includes the object being photographed and the guidance display screen 30.
[0061] The guide display screen 30 may include electronic display screens such as LED display screens or LCD display screens, and there is no specific limitation. Furthermore, the guide display screen 30 may be a ground display screen placed flat on the ground, a vertical display screen installed on the ground, a wall-mounted vertical display screen installed on the wall, and there is no specific limitation.
[0062] The electronic device 10 can output a target identification frame to the guidance display screen 30 to guide the subject to enter the motion detection range corresponding to the motion detection device.
[0063] The electronic device 10 can receive a first image and a second image sent by the motion detection device 20; identify the first image coordinates of the subject in the first image; identify the subject in the second image to obtain a first recognition result, and generate a target identification box in the first image based on the first image coordinates and the first recognition result; determine the positional relationship between the target identification box and the guide display screen 30 in the first image; determine the display coordinates corresponding to the target identification box in the guide display screen 30 based on the positional relationship, and output the target identification box to the guide display screen 30 based on the display coordinates.
[0064] like Figure 1B As shown, Figure 1B This is a schematic diagram illustrating an application scenario of another method for determining the recognition area disclosed in this application. The guide display screen 30 is a ground display screen, and the motion detection device 20 can be installed on the ceiling. The subject can move on the guide display screen 30. The subject can move to the position within the target identification frame 101 output by the guide display screen 30, so that the motion detection device 20 can effectively perform motion recognition on the subject.
[0065] like Figure 1C As shown, Figure 1C This is a schematic diagram illustrating an application scenario of another method for determining a recognition area disclosed in this application. The guide display screen 30 is a vertical display screen, and the motion detection device 20 can be installed on the wall facing the guide display screen 30, without specific limitations. The subject can move while facing the guide display screen 30. The subject can move to a position directly facing the target identification frame 101 output by the guide display screen 30, so that the motion detection device 20 can effectively perform motion recognition on the subject.
[0066] As can be seen, in this embodiment of the application, the electronic device 10 outputs the target identification frame 101 to the guidance display screen 30 to guide the subject to walk into the corresponding body sensing detection range of the body sensing detection device 20. This avoids the problem of the user's body movements not being recognized when the subject walks out of the body sensing detection range of the body sensing detection device 20 during the body sensing recognition process, thereby improving the recognition rate of the user's body movements.
[0067] Please see Figure 2 , Figure 2 This is a flowchart illustrating a method for determining a recognition area disclosed in an embodiment of this application. This method can be applied to the aforementioned electronic device, which is communicatively connected to a guide display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than the shooting range of the second camera, and the shooting range of the second camera is the corresponding motion detection range of the motion detection device. Figure 2 As shown, the method includes the following steps:
[0068] 201. Receive the first and second images sent by the motion detection device.
[0069] The electronic device receives a first image and a second image sent by the motion detection device; the first image is captured by the first camera and the second image is captured by the second camera; the first image includes the object being photographed and the guidance display screen.
[0070] In this embodiment of the application, the shooting range of the first camera can cover the shooting object and the guidance display screen. Therefore, the first image captured by the first camera includes the shooting object and the guidance display screen. Since the shooting range of the second camera is smaller than that of the first camera, the second image acquired by the second camera may not necessarily include the shooting object and the complete guidance display screen.
[0071] Please see Figure 3 , Figure 3 This is a schematic diagram of a first image and a second image acquired by a motion detection device disclosed in an embodiment of this application. Since the second camera can be a depth camera, which uses infrared or other specific spectral light sources to measure the distance between objects in the surrounding environment and the camera, the second image 302 acquired by the second camera is typically black and white. When the motion detection device 20 does not detect a subject, the second image 302 acquired by the second camera is typically black; when a subject is detected, the outline of the subject in the second image 302 is typically displayed as white or a brighter color, while the background is displayed as black or a darker color. Therefore, based on the different colors or brightness in the second image 302, the recognition status of the subject can be effectively determined from the second image 302, and the limb movements of the subject can be recognized using the second image 302.
[0072] Since the first camera can be an RGB camera, the first image 301 acquired by the RGB camera is typically in color, and the first image 301 includes the subject being photographed and the guiding display screen 30. The electronic device can utilize the first image 301 to effectively identify the first image coordinates of the subject in the first image 301, and to plan and generate a target identification box 101 in the first image 301.
[0073] In this embodiment, the electronic device effectively uses the first image and the second image to generate a target identification box, which improves the efficiency and accuracy of determining the target identification box. In this way, the target identification box guides the subject to enter the corresponding motion detection range of the motion detection device, thereby improving the recognition rate of the user's body movements during the motion recognition process.
[0074] 202. Identify the first image coordinates of the photographed object in the first image.
[0075] The electronic device identifies the first image coordinates of the captured object in the first image.
[0076] The first image coordinates may include the pixel coordinates corresponding to multiple object pixels. Specifically, the first image may be composed of multiple pixels arranged in rows and columns; the electronic device may establish an image coordinate system in the first image, which may be a coordinate system with the upper left or lower left corner of the first image as the origin and pixels as the unit; the horizontal and vertical coordinates of each pixel in the image may be the column number and row number it is in the first image, respectively.
[0077] As an optional implementation, the electronic device can identify the subject in the first image using a target recognition algorithm, such as R-CNN, SSD, YOLO, etc., without any specific limitation. After identifying the subject in the first image, the pixel coordinates of the multiple pixels of the subject in the first image are determined to obtain the coordinates of the first image.
[0078] As another optional implementation, the electronic device can receive a sample image acquired by the first camera of the motion detection device before the subject enters the shooting range of the first camera; then receive a first image acquired by the first camera of the motion detection device after the subject enters the shooting range of the first camera; compare the sample image and the first image to determine the pixel coordinates of the multiple pixels of the subject in the first image, thereby obtaining the first image coordinates; specifically, the pixel values of the sample image and the pixel values of the first image can be subtracted to obtain a difference image, and then the difference image can be binarized to determine the pixel coordinates of the multiple pixels of the subject in the first image, thereby obtaining the first image coordinates.
[0079] 203. Recognize the captured object in the second image to obtain the first recognition result, and generate a target bounding box in the first image based on the coordinates of the first image and the first recognition result.
[0080] The electronic device identifies the object captured in the second image, obtains a first recognition result, and generates a target bounding box in the first image based on the coordinates of the first image and the first recognition result.
[0081] The method for electronic devices to identify the subject in the second image can refer to the method for identifying the subject in the first image described above, and will not be elaborated further.
[0082] The first recognition result can include whether the subject was recognized in the second image or not.
[0083] In one embodiment, the electronic device generates a target identification box in the first image based on the first image coordinates and the first recognition result, which may include the following steps: if the first recognition result indicates that the object being photographed is identified in the second image, then a target identification box is generated in the first image based on the first image coordinates; the target identification box includes the first image coordinates.
[0084] It should be noted that if the first recognition result indicates that the subject is identified in the second image, it means that the actual position of the subject is within the motion detection range of the motion detection device. Therefore, when the subject is identified in the second image, the first image coordinates of the subject in the first image are used as part of the target identification box. Thus, the border and the inner part of the target identification box are composed of the first image coordinates of the subject in the first image when the subject is identified in the second image.
[0085] 204. Determine the positional relationship between the target identification box and the guide display screen in the first image.
[0086] The electronic device determines the positional relationship between the target identification frame and the guide display screen in the first image; it should be noted that the positional relationship between the target identification frame and the guide display screen refers to the positional relationship between the target identification frame generated on the first image and the virtual guide display screen included in the first image.
[0087] Specifically, the electronic device can determine the positional relationship between the target identification box and the virtual guide display screen based on the position of the target identification box in the first image and the position of the virtual guide display screen in the first image. The position of the target identification box may include the pixel coordinates corresponding to multiple target identification box pixels, and the position of the virtual guide display screen may include the pixel coordinates corresponding to multiple guide display screen pixels. Therefore, the positional relationship can be a coordinate transformation matrix between the pixel coordinates included in the target identification box and the pixel coordinates included in the virtual guide display screen.
[0088] 205. Determine the display coordinates of the target identifier frame in the guide display screen based on the positional relationship, and output the target identifier frame to the guide display screen according to the display coordinates.
[0089] The electronic device determines the display coordinates of the target identifier frame in the guide display screen based on the positional relationship, and outputs the target identifier frame to the guide display screen according to the display coordinates. It should be noted that the display coordinates of the target identifier frame in the guide display screen are the same as the display coordinates of the target identifier frame in the physical guide display screen. That is, the electronic device can output the target identifier frame to the physical guide display screen according to the display coordinates.
[0090] The electronic device can determine the display coordinates of the target identifier frame in the physical guide display screen based on the size and resolution of the physical guide display screen and the positional relationship between the target identifier frame and the guide display screen. The resolution of the physical guide display screen is the number of pixels displayed on the physical guide display screen, usually expressed as the number of pixels per row multiplied by the number of pixels per column. Therefore, based on the size of the physical guide display screen and the number of rows and columns of each pixel in the physical guide display screen, the pixel coordinates of each pixel included in the physical guide display screen can be determined.
[0091] Therefore, based on the size and resolution of the physical guide display screen, as well as the positional relationship between the target identification frame and the guide display screen, the electronic device can convert the pixel coordinates corresponding to the multiple target identification frame pixels included in the first image into the pixel coordinates of the corresponding multiple pixels in the physical guide display screen, and use them as the display coordinates of the target identification frame in the physical guide display screen.
[0092] The electronic device outputs the target identification frame to the guiding display screen of the entity according to the display coordinates. That is, it controls multiple pixels corresponding to the target identification frame in the guiding display screen of the entity to emit light, flash, etc., so as to achieve the identification effect and guide the subject to walk into the motion detection range corresponding to the motion detection device 20.
[0093] Please see Figure 4 , Figure 4 This is a flowchart illustrating another method for determining a recognition area disclosed in an embodiment of this application. This method for determining the recognition area can be applied to the aforementioned electronic device, which is communicatively connected to a guide display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than that of the second camera, and the shooting range of the second camera is the corresponding motion detection range of the motion detection device. Figure 4 As shown, the method includes the following steps:
[0094] 401. Receive the first and second images sent by the motion detection device.
[0095] The first image was captured by the first camera, and the second image was captured by the second camera. The first image includes the subject being photographed and the guidance display screen.
[0096] The implementation method of step 401 can refer to the above embodiments, and will not be described in detail here.
[0097] 402. Output the initial label frame to the guidance display screen.
[0098] The electronic device outputs an initial identifier frame to the guidance display screen. It should be noted that the electronic device can output the initial identifier frame to the physical guidance display screen. The position and size of the initial identifier frame output by the electronic device to the guidance display screen can be determined according to user-defined parameters. For example, the initial identifier frame can be a rectangle approximately the size of the guidance display screen, or it can be a frame of any shape located at the center of the guidance display screen; there is no specific limitation.
[0099] 403. Identify the coordinates of the subject in the first image.
[0100] The specific implementation of step 403 can be referred to the above embodiments, and will not be repeated here.
[0101] 404. If the object is determined to be within the initial identification frame based on the first image coordinates of the object, and the first recognition result indicates that the object was not recognized in the second image, then the initial identification frame is adjusted based on the first image coordinates to obtain the target identification frame.
[0102] If the electronic device determines that the subject is within the initial identification frame based on the first image coordinates of the subject, and the first recognition result indicates that the subject is not recognized in the second image, then the initial identification frame is adjusted based on the first image coordinates to obtain the target identification frame.
[0103] By outputting an initial bounding box and then adjusting it to obtain the target bounding box, the efficiency of determining the target bounding box can be improved.
[0104] If the subject is within the initial frame but is not detected in the second image, it indicates that the initial frame contains an area outside the motion detection range of the motion detection device. Adjusting the initial frame based on the coordinates of the first image can be done by cropping the area outside the motion detection range of the motion detection device within the initial frame to obtain the target frame.
[0105] As an optional implementation, if the electronic device determines that the subject is within the initial identification frame based on the first image coordinates of the subject, and the first recognition result indicates that the subject is not recognized in the second image, then adjusting the initial identification frame based on the first image coordinates to obtain the target identification frame may include the following steps:
[0106] If the target object is determined to be on the target boundary of the initial identification box based on the first image coordinates of the target object, and the first recognition result indicates that the target object is not recognized in the second image, then the target boundary is moved a target distance toward the center position of the initial identification box to obtain the target identification box; the target boundary is any boundary of the initial identification box.
[0107] It should be noted that the subject being photographed is located on the target boundary of the initial marker frame. This can be either standing on the target boundary of the initial marker frame or facing it directly. For example, if the guidance display screen is a ground display screen, the subject can walk to the edge of the initial marker frame on the guidance display screen and stand on each edge of the initial marker frame for a period of time, such as 5 seconds. If the subject is located on the target boundary of the initial marker frame but is not detected in the second image, it means that the target boundary of the initial marker frame is not within the motion detection range of the motion detection device. Therefore, the electronic device can move the target boundary of the initial marker frame on the physical guidance display screen a target distance toward the center of the initial marker frame, that is, move it into the initial marker frame. For example, the target distance can be 10 cm to 30 cm, and the specific distance is not limited.
[0108] Performing the above steps can effectively improve the accuracy of determining the target bounding box, thereby guiding the subject into the motion detection range of the motion detection device through a precise target bounding box during the motion recognition process, thus improving the recognition rate of the user's body movements.
[0109] 405. Determine the positional relationship between the target identification box and the guide display screen in the first image.
[0110] 406. Determine the display coordinates of the target identifier frame in the guide display screen based on the positional relationship, and output the target identifier frame to the guide display screen according to the display coordinates.
[0111] The implementation methods for steps 405 and 406 can refer to the above embodiments, and are not specifically limited.
[0112] This application embodiment outputs an initial identification box and adjusts it according to the first recognition result and the first image coordinates to obtain a target identification box, thereby improving the efficiency and accuracy of determining the target identification box. The target identification box is then output to the guidance display screen to guide the subject into the corresponding motion detection range of the motion detection device. This avoids the problem of failing to recognize the user's body movements when the subject leaves the motion detection range of the motion detection device during the motion recognition process, thus improving the recognition rate of the user's body movements.
[0113] Please see Figure 5 , Figure 5 This is a flowchart illustrating another method for determining a recognition area disclosed in an embodiment of this application. This method can be applied to the aforementioned electronic device, which is communicatively connected to a guide display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than that of the second camera, and the shooting range of the second camera is the corresponding motion detection range of the motion detection device. Figure 5 As shown, the method includes the following steps:
[0114] 501. Receive the first and second images sent by the motion detection device.
[0115] The first image was captured by the first camera, and the second image was captured by the second camera. The first image includes the subject being photographed and the guidance display screen.
[0116] 502. Identify the coordinates of the subject in the first image.
[0117] 503. Recognize the captured object in the second image, obtain the first recognition result, and generate a target bounding box in the first image based on the coordinates of the first image and the first recognition result.
[0118] The implementation methods for steps 501 to 503 can be referred to the above embodiments, and will not be described in detail here.
[0119] 504. Define one or more test areas within the target identification box.
[0120] The electronic device defines one or more test regions within a target bounding box. It should be noted that the electronic device defines one or more test regions within a target bounding box generated in the first image. Each test region may include multiple pixels, which can be used as test pixels.
[0121] The test area may include a circular area centered on the target identification box. The radius of the circular area is not limited; for example, the radius may be 20 cm to 50 cm, but is not limited to this.
[0122] 505. If the first image coordinates of the photographed object in the first image match the target test area, then it is determined that the photographed object is located in the target test area, and the recognition time of recognizing the photographed object in the acquired second image when the photographed object is located in the target test area is detected.
[0123] If the first image coordinates of the object being photographed in the first image match the target test area, the electronic device determines that the object being photographed is located in the target test area, and detects the recognition time of recognizing the object in the acquired second image when the object being photographed is located in the target test area; the target test area can be any test area.
[0124] It should be noted that determining whether the first image coordinates of the photographed object in the first image match the target test area can be done by determining the overlap between multiple pixels of the photographed object included in the first image coordinates and multiple test pixels included in the target test area. The overlap is then used to determine whether the first image coordinates of the photographed object in the first image match the target test area. If the overlap is greater than an overlap threshold, it can be determined that the first image coordinates of the photographed object in the first image match the target test area; for example, the overlap threshold can be 80% to 100%, with no specific limitation.
[0125] 506. Based on the recognition time corresponding to the subject in each test area, determine the best recognition area within the target identification box from one or more test areas.
[0126] The electronic device determines the optimal recognition area within the target identification box from one or more test areas based on the recognition time corresponding to the subject being photographed in each test area; the recognition time corresponding to the optimal recognition area is less than the time threshold.
[0127] The duration threshold can be between 0.5 seconds and 1 second, with no specific limitation. It should be noted that if the electronic device can immediately recognize the subject in the second image when the subject enters the target test area, i.e., the recognition time is less than the duration threshold, it indicates that the perspective of the subject in the target test area does not change much, and the subject's feature points are easy to capture. Therefore, this target test area is considered the optimal recognition area.
[0128] The optimal recognition area can be the optimal motion detection range corresponding to the motion detection device. When the subject enters the optimal recognition area, the electronic device can quickly and accurately recognize the subject's limb movements in the second image.
[0129] Therefore, in this embodiment, a target identification frame is first determined to guide the subject into the motion detection range corresponding to the motion detection device, and then the optimal recognition area in the target identification frame is determined to obtain the optimal motion detection range corresponding to the motion detection device, thereby further improving the accuracy of recognizing the subject's limb movements.
[0130] As an optional implementation, the test area includes the central image area of the target identification frame; the electronic device determines the optimal recognition area within the target identification frame from one or more test areas based on the recognition time corresponding to the subject in each test area, which may include the following steps:
[0131] If the recognition time of the subject in the center image region of the target frame is less than the time threshold, the center image region of the target frame is determined as the best recognition region; if the recognition time of the subject in the center image region of the target frame is greater than the time threshold, the best recognition region is determined from the neighboring image regions of the center image region of the target frame; the neighboring image regions are test areas whose distance from the center image region of the target frame is less than the distance threshold.
[0132] It should be noted that the central image region may include the center point of the target bounding box and multiple pixels near the center point. The center point of the target bounding box and multiple pixels near the center point may be used as multiple test pixels included in the test region. There is no limitation on the size of the central image region.
[0133] The neighboring image region can include multiple test regions at different distances from the central image region. The distance threshold can be 10 cm to 20 cm, and there is no specific limitation.
[0134] By performing the above steps, the central image area of the target identification box is first determined as the test area, because the central image area is more likely to be the best recognition area. Then, the central image area is fine-tuned, and the best recognition area is determined from the neighboring image areas of the central image area. This improves the efficiency and accuracy of determining the best recognition area, thereby helping to guide the user into the best recognition area during the motion recognition process and improving the accuracy and efficiency of recognizing the user's body movements.
[0135] As another optional implementation, after determining the optimal recognition area within the target identification frame from one or more test areas based on the recognition time corresponding to the subject being photographed in each test area, the electronic device further performs the following steps:
[0136] If the movement trajectory of the subject is determined based on the first image coordinates of the subject in multiple first images, and is determined to be moving from outside the target identification box to the optimal recognition area, and then moving from the optimal recognition area to any boundary of the target identification box, the subject is identified in the second image acquired during the subject's movement, and a second recognition result is obtained. Based on the second recognition result, the target identification box is adjusted.
[0137] After performing the above steps and determining the optimal recognition area within the target identification frame, the subject is photographed entering the optimal recognition area from outside the target identification frame, and then moving towards each of the four sides of the target identification frame from the optimal recognition area. The second recognition result of the subject is observed in the second image captured during the subject's movement. This is used to test the accuracy of the target identification frame and to further debug it.
[0138] The second recognition result may include recognizing the subject in the second image during the subject's movement, and not recognizing the subject in the second image during the subject's movement.
[0139] For example, the accuracy of the target identification box is tested N times through the above steps, where N is an integer greater than 1. If the second recognition result indicates that the subject is identified in the second image in more than 90% of the tests, it means that the accuracy of the target identification box meets the standard. If the second recognition result indicates that the subject is not identified in the second image in more than 10 tests, the target identification box needs to be further adjusted. The specific adjustment method can be referred to the above embodiment, and will not be elaborated here.
[0140] By performing the above steps, after determining the optimal recognition area within the target identification box, the accuracy of the target identification box can be further tested, thereby adjusting the target identification box and further improving its accuracy. Therefore, in the process of motion recognition, the accuracy and efficiency of recognizing the user's body movements can be improved.
[0141] 507. Determine the positional relationship between the target identification box and the guide display screen in the first image.
[0142] 508. Determine the display coordinates of the target identifier box in the guide display screen according to the positional relationship, and output the target identifier box to the guide display screen according to the display coordinates.
[0143] The specific implementation methods for steps 507 to 508 can be found in the above embodiments, and will not be repeated here.
[0144] In this embodiment, a target identification frame is first determined to guide the subject into the motion detection range corresponding to the motion detection device, and then the optimal recognition area within the target identification frame is determined to obtain the optimal motion detection range corresponding to the motion detection device, thereby further improving the accuracy of recognizing the subject's limb movements.
[0145] Please see Figure 6 , Figure 6 This is a schematic diagram of a recognition area determination device disclosed in an embodiment of this application. The device can be applied to the aforementioned electronic device, which is communicatively connected to a guide display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than the shooting range of the second camera, and the shooting range of the second camera is the corresponding motion detection range of the motion detection device. Figure 6 As shown, the identification area determination device 600 may include: a receiving module 610, an identification module 620, a generating module 630, a determining module 640, and an output module 650.
[0146] The receiving module 610 is used to receive a first image and a second image sent by the motion detection device; the first image is captured by the first camera and the second image is captured by the second camera; the first image includes the object being photographed and the guidance display screen.
[0147] The recognition module 620 is used to identify the first image coordinates of the captured object in the first image;
[0148] The generation module 630 is used to identify the captured object in the second image, obtain a first recognition result, and generate a target identification box in the first image based on the first image coordinates and the first recognition result.
[0149] The determining module 640 is used to determine the positional relationship between the target identification box and the guide display screen in the first image;
[0150] The output module 650 is used to determine the display coordinates of the target identifier box in the guide display screen according to the positional relationship, and output the target identifier box to the guide display screen according to the display coordinates.
[0151] In one embodiment, the generation module 630 is further configured to generate a target identification box in the first image based on the first image coordinates if the first recognition result indicates that a photographed object is identified in the second image; the target identification box includes the first image coordinates.
[0152] In one embodiment, after the receiving module 610 receives the first image and the second image sent by the motion sensing device, the output module 650 is also used to output an initial identification frame to the guide display screen.
[0153] The generation module 630 is further configured to adjust the initial frame based on the first image coordinates to obtain the target frame if the first image coordinates of the object being photographed determine that the object being photographed is within the initial frame and the first recognition result indicates that the object being photographed is not recognized in the second image.
[0154] In one embodiment, the generation module 630 is further configured to, if it is determined from the first image coordinates of the subject that the subject is on the target boundary of the initial identification frame, and the first recognition result indicates that the subject is not recognized in the second image, move the target boundary toward the center position of the initial identification frame by a target distance to obtain the target identification frame; the target boundary is any boundary of the initial identification frame.
[0155] In one embodiment, the determining module 640 is further configured to determine one or more test regions within the target identification box; if the first image coordinates of the photographed object in the first image match the target test region, then it is determined that the photographed object is located in the target test region, and the recognition time of recognizing the photographed object in the acquired second image when the photographed object is located in the target test region is detected; the target test region can be any test region; based on the recognition time corresponding to the photographed object in each test region, the optimal recognition region within the target identification box is determined from one or more test regions; the recognition time corresponding to the optimal recognition region is less than the time threshold.
[0156] In one embodiment, the test area includes the central image area of the target identification box; the determining module 640 is further configured to determine the central image area of the target identification box as the best recognition area if the recognition time of the subject in the central image area of the target identification box is less than a time threshold; and to determine the best recognition area from the neighboring image areas of the central image area of the target identification box if the recognition time of the subject in the central image area of the target identification box is greater than the time threshold. The neighboring image areas are test areas whose distance from the central image area of the target identification box is less than a distance threshold.
[0157] In one embodiment, the device 600 for determining the identification area may further include an adjustment module;
[0158] The adjustment module is used to identify the subject in the second image acquired during the subject's movement if the subject's movement trajectory is determined to be moving from outside the target frame to the optimal recognition area and then moving from the optimal recognition area to any boundary of the target frame based on the first image coordinates of the subject in the first images of multiple frames, thereby obtaining a second recognition result, and adjusting the target frame based on the second recognition result.
[0159] This application embodiment determines whether the subject is within the motion detection range of the second camera when it is located at the first image coordinates in the first image based on the first recognition result of the second image. Based on the first recognition result and the first image coordinates, a target identification box is generated in the first image and output to the guidance display screen to guide the subject into the motion detection range corresponding to the motion detection device. This avoids the problem of the user's body movements not being recognized when the subject leaves the motion detection range of the motion detection device during the motion recognition process, thus improving the recognition rate of the user's body movements.
[0160] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.
[0161] like Figure 7 As shown, the electronic device 700 may include:
[0162] Memory 710 storing executable program code;
[0163] Processor 720 coupled to memory 710;
[0164] The processor 720 calls the executable program code stored in the memory 710 to execute any of the identification region determination methods disclosed in the embodiments of this application.
[0165] This application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the processor implements any of the identification region determination methods disclosed in this application.
[0166] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0167] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0168] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0169] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0170] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-accessible memory. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests to cause a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments of this application.
[0171] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0172] The foregoing has provided a detailed description of a method, apparatus, and electronic device for determining an identification region disclosed in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for determining an identification region, characterized in that, The method is applied to an electronic device, which is communicatively connected to a guidance display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than that of the second camera, and the shooting range of the second camera is the motion detection range corresponding to the motion detection device. The device receives a first image and a second image sent by the motion detection device; the first image is captured by the first camera, and the second image is captured by the second camera; the first image includes the object being photographed and the guide display screen. Output the initial identification frame to the guidance display screen; Identify the first image coordinates of the captured object in the first image; The object being photographed is identified from the second image to obtain a first identification result; If the object is determined to be within the initial identification box based on the first image coordinates of the object, and the first recognition result indicates that the object is not recognized in the second image, then the initial identification box is adjusted based on the first image coordinates to obtain a target identification box; or, if the first recognition result indicates that the object is recognized in the second image, then the target identification box is generated in the first image based on the first image coordinates, and the target identification box includes the first image coordinates. Determine the positional relationship between the target identification box and the guide display screen in the first image; The display coordinates corresponding to the target identifier frame in the guidance display screen are determined based on the positional relationship, and the target identifier frame is output to the guidance display screen based on the display coordinates.
2. The method according to claim 1, characterized in that, If the object is determined to be within the initial identification frame based on the first image coordinates of the object, and the first recognition result indicates that the object was not recognized in the second image, then the initial identification frame is adjusted based on the first image coordinates to obtain the target identification frame, including: If the target object is determined to be on the target boundary of the initial identification frame based on the first image coordinates of the target object, and the first recognition result indicates that the target object is not recognized in the second image, then the target boundary is moved a target distance toward the center position of the initial identification frame to obtain the target identification frame; the target boundary is any boundary of the initial identification frame.
3. The method according to claim 1, characterized in that, The method further includes: Define one or more test areas within the target identification box; If the first image coordinates of the photographed object in the first image match the target test area, then it is determined that the photographed object is located in the target test area, and the recognition time of recognizing the photographed object in the acquired second image when the photographed object is located in the target test area is detected; the target test area can be any of the test areas. Based on the recognition time corresponding to the subject in each of the test areas, the optimal recognition area within the target identification box is determined from the one or more test areas; the recognition time corresponding to the optimal recognition area is less than the time threshold.
4. The method according to claim 3, characterized in that, The test area includes the central image area of the target identification box; The step of determining the optimal recognition region within the target identification frame from the one or more test regions based on the recognition time corresponding to the subject in each of the test regions includes: If the recognition time of the photographed object in the central image region of the target identification frame is less than the time threshold, the central image region of the target identification frame is determined as the optimal recognition region. If the recognition time of the photographed object in the central image region of the target identification frame is greater than the time threshold, the optimal recognition region is determined from the neighboring image regions of the central image region of the target identification frame; the neighboring image regions are test regions whose distance from the central image region of the target identification frame is less than the distance threshold.
5. The method according to claim 3, characterized in that, After determining the optimal recognition region within the target identification frame from the one or more test regions based on the recognition time corresponding to the subject in each of the test regions, the method further includes: If the movement trajectory of the subject is determined based on the first image coordinates of the subject in multiple first images, and is determined to be moving from outside the target identification frame to the optimal recognition area, and then moving from the optimal recognition area to any boundary of the target identification frame, the subject is identified in the second image acquired during the subject's movement, a second recognition result is obtained, and the target identification frame is adjusted based on the second recognition result.
6. A device for determining an identification area, characterized in that, This device is applied to an electronic device, which is communicatively connected to a guidance display screen and a motion detection device. The motion detection device includes at least a first camera and a second camera. The shooting range of the first camera is larger than the shooting range of the second camera, and the shooting range of the second camera is the motion detection range corresponding to the motion detection device. The device includes: The receiving module is used to receive a first image and a second image sent by the motion detection device; the first image is captured by the first camera, and the second image is captured by the second camera; the first image includes the object being photographed and the guide display screen. The receiving module is also used to output an initial identification frame to the guidance display screen; The recognition module is used to identify the first image coordinates of the photographed object in the first image; The generation module is used to identify the photographed object in the second image and obtain a first recognition result; The generation module is further configured to, if the object being photographed is determined to be within the initial identification box based on the first image coordinates, and the first recognition result indicates that the object being photographed is not recognized in the second image, adjust the initial identification box based on the first image coordinates to obtain a target identification box; or, if the first recognition result indicates that the object being photographed is recognized in the second image, generate the target identification box in the first image based on the first image coordinates, wherein the target identification box includes the first image coordinates. A determining module is used to determine the positional relationship between the target identification box and the guide display screen in the first image; The output module is used to determine the display coordinates corresponding to the target identification frame in the guide display screen according to the positional relationship, and output the target identification frame to the guide display screen according to the display coordinates.
7. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 5.