Measurement method, device, system and computer readable storage medium
By collecting the target image under a vertical lens, the distance between the pedestrian's head and feet and the distance from the head to the center of the image is calculated, and the problem of measuring the pedestrian's height is solved, achieving accurate and economical height measurement.
Patent Information
- Application Number
- CN201910560095.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-25
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2039-06-25
AI Technical Summary
In the prior art, the pedestrian height measurement method is not optimized enough, and the hardware equipment is high, making it difficult to use a monocular camera for accurate measurement.
The target image is collected through the image acquisition device, and the optical axis direction of the lens is perpendicular to the ground, the distance between the head and feet of the target object and the distance from the head to the center of the image are obtained. Combined with the vertical distance from the lens to the ground, the target is calculated The height of the subject.
It realizes the use of a monocular camera to accurately measure the height of pedestrians, reduces the requirements for hardware equipment, and provides a more economical and convenient measurement method.
Smart Images

Figure CN112131917B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a measurement method, device, system, and computer-readable storage medium. Background Art
[0002] In the fields of behavior analysis and security monitoring, identifying and understanding the behavior of pedestrians in video scenes is a very important task, and the height of pedestrians is an important reference information. Usually, a binocular camera is used to collect images of pedestrians in order to calculate the height of pedestrians. However, binocular cameras are expensive and large in size, which limits the installation scenarios of binocular cameras.
[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the prior art: the method for measuring the height of pedestrians is not optimized enough and has high requirements for hardware equipment. Summary of the invention
[0004] In view of this, the present disclosure provides a measurement method, device, system, and computer-readable storage medium.
[0005] One aspect of the present disclosure provides a measurement method, comprising acquiring a target image through an image acquisition device, wherein the target image includes an object image of a target object, wherein the optical axis direction of a lens of the image acquisition device is perpendicular to the ground; obtaining a first distance and a second distance, wherein the distance between the head and the feet of the target object is taken as the first distance, and the distance between the head of the target object and the center of the target image is taken as the second distance; and determining the height of the target object based on the first distance, the second distance, and the vertical distance from the lens to the ground, wherein obtaining the first distance and the second distance comprises: determining a bounding box of the object image; determining a head position and a foot position of the target object, wherein the head position is an intersection of an extension line of a line connecting the center of the bounding box and the center of the target image and the bounding box, and the foot position is an intersection of a line connecting the center of the bounding box and the center of the target image and the bounding box; and obtaining the first distance and the second distance based on the head position and the foot position.
[0006] According to an embodiment of the present disclosure, determining the bounding box of the object image includes: identifying the target image to determine the position of the target object; and generating a bounding box of the object image in the target image based on the position.
[0007] According to an embodiment of the present disclosure, obtaining the first distance and the second distance includes: when the target object is located in a preset area, obtaining the first distance and the second distance, wherein the distance between the head and the feet of the target object in the target image is taken as the first distance, and the distance between the head of the target object in the target image and the center of the target image is taken as the second distance.
[0008] According to an embodiment of the present disclosure, the target object includes a specific object. When the specific object appears in multiple target images, obtaining the first distance and the second distance includes: respectively calculating the specific distance between the head and the feet of the specific object in each of the multiple target images; determining the target image corresponding to the largest specific distance as the height calculation image; and obtaining the distance between the head and the feet of the specific object in the height calculation image as the first distance, and obtaining the distance between the head of the specific object in the height calculation image and the center of the height calculation image as the second distance.
[0009] According to an embodiment of the present disclosure, the lens includes a fisheye lens.
[0010] According to an embodiment of the present disclosure, the method further includes preprocessing the target image, and the preprocessing includes correcting the distortion of the target image.
[0011] Another aspect of the present disclosure provides a measuring device, including an image acquisition module, used to acquire an image of an object through an image acquisition device, wherein the optical axis direction of the lens of the image acquisition device is perpendicular to the ground; an acquisition module, used to acquire a first distance and a second distance, wherein the distance between the head and the foot of the target object is taken as the first distance, and the distance between the head of the target object and the center of the target image is taken as the second distance; and a determination module, used to determine the height of the object based on the first distance, the second distance and the vertical distance from the lens to the ground, wherein the acquisition module includes: a first determination submodule, used to determine a bounding box of the object image; a second determination submodule, used to determine a head position and a foot position of the target object, wherein the head position is an intersection of an extension line of a line connecting the center of the bounding box and the center of the target image and the bounding box, and the foot position is an intersection of a line connecting the center of the bounding box and the center of the target image and the bounding box; and a first acquisition submodule, used to acquire the first distance and the second distance based on the head position and the foot position.
[0012] According to an embodiment of the present disclosure, the first determination submodule includes: a determination subunit, used to identify the target image and determine the position of the target object; and a generation subunit, used to generate a bounding box of the image of the object in the target image based on the position.
[0013] According to an embodiment of the present disclosure, the target object includes a specific object. When the specific object appears in multiple target images, the acquisition module includes: a calculation submodule, used to respectively calculate the specific distance between the head and the feet of the specific object in each of the multiple target images; a third determination submodule, used to determine that the target image corresponding to the largest specific distance is the height calculation image; and a second acquisition submodule, used to obtain the distance between the head and the feet of the specific object in the height calculation image as the first distance, and obtain the distance between the head of the specific object in the height calculation image and the center of the height calculation image as the second distance.
[0014] According to an embodiment of the present disclosure, the lens includes a fisheye lens.
[0015] According to an embodiment of the present disclosure, the measuring device further includes a preprocessing module for preprocessing the target image, wherein the preprocessing includes correcting the distortion of the target image.
[0016] Another aspect of the present disclosure provides a measurement system, comprising one or more processors and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute any of the methods described above.
[0017] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0018] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.
[0019] According to the embodiments of the present disclosure, the problem that a pedestrian's height cannot be measured using a monocular camera can be at least partially solved, and thus the technical effect of measuring the height of a pedestrian using a monocular camera can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0021] Figure 1The application scenarios to which the measurement method according to the embodiments of the present disclosure can be applied are schematically shown;
[0022] Figure 2A and 2B The flowchart of the measurement method according to the embodiment of the present disclosure is schematically shown;
[0023] Figure 2C Schematically illustrates an image captured by a camera with a fisheye lens according to an embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram schematically illustrates a method for obtaining a first distance and a second distance according to an embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram schematically shows a method of determining the height of the pedestrian according to the similar triangle theorem according to an embodiment of the present disclosure;
[0026] Figure 5 A block diagram schematically shows a measuring device according to an embodiment of the present disclosure;
[0027] Figure 6 A block diagram schematically shows a measuring device according to an embodiment of the present disclosure; and
[0028] Figure 7 A block diagram of a measurement system according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0029] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0030] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0031] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0032] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0033] The embodiment of the present disclosure provides a measurement method, including acquiring a target image through an image acquisition device, wherein the target image includes an object image of a target object, the optical axis direction of the lens of the image acquisition device is perpendicular to the ground, obtaining a first distance and a second distance, taking the distance between the head and the feet of the target object as the first distance, and the distance between the head of the target object and the center of the target image as the second distance, and determining the height of the target object based on the first distance, the second distance, and the vertical distance from the lens to the ground. Obtaining the first distance and the second distance includes: determining a bounding box of the object image; determining the head position and the foot position of the target object, wherein the head position is the intersection of the extended line of the line connecting the center of the bounding box and the center of the target image and the bounding box, and the foot position is the intersection of the line connecting the center of the bounding box and the center of the target image and the bounding box; and obtaining the first distance and the second distance based on the head position and the foot position.
[0034] Figure 1 The following schematically illustrates an application scenario in which the measurement method according to the embodiment of the present disclosure can be applied. It should be noted that: Figure 1 The examples shown are merely examples of application scenarios to which the embodiments of the present disclosure can be applied, so as to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other scenarios.
[0035] like Figure 1 As shown, the application scenario includes a store 100 , in which a plurality of customers purchase goods.
[0036] For example, in order to conduct security monitoring, behavior analysis, and customer classification of customers, stores collect indoor images through cameras installed indoors and obtain customer height data by analyzing the images.
[0037] According to an embodiment of the present disclosure, in order to obtain, for example, the height of a customer in a store, the image of the customer can be captured by a camera whose optical axis is perpendicular to the ground and facing the ground, and the distance between the customer's head and feet in the image and the distance from the head to the center of the image can be obtained, thereby determining the customer's height.
[0038] Figure 2A and Figure 2B The flowchart of the measuring method according to the embodiment of the present disclosure is schematically shown.
[0039] like Figure 2A As shown, the method includes operations S210 to S230.
[0040] In operation S210, a target image is captured by an image capture device, wherein the target image includes an object image of a target object, wherein an optical axis direction of a lens of the image capture device is perpendicular to the ground.
[0041] In operation S220, a first distance and a second distance are obtained, wherein the distance between the head and feet of the target object is taken as the first distance, and the distance between the head of the target object and the center of the target image is taken as the second distance.
[0042] In operation S230, the height of the target object is determined based on the first distance, the second distance, and a vertical distance from the lens to the ground.
[0043] like Figure 2B As shown, operation S220 includes operations S221 to S223.
[0044] In operation S221, a bounding box of the image of the object in the image is determined.
[0045] In operation S222, the head position and the foot position of the object in the image are determined, wherein the head position includes the intersection of an extension line of a line connecting the center of the bounding box and the center of the image and the bounding box, and the foot position includes the intersection of a line connecting the center of the bounding box and the center of the image and the bounding box.
[0046] In operation S223, the first distance and the second distance are obtained based on the head position and the foot position.
[0047] According to the measurement method of the embodiment of the present disclosure, the image acquisition device may be a monocular camera, and a person's height may be measured only by the monocular camera, thereby reducing the hardware requirements of the method for measuring a person's height.
[0048] According to an embodiment of the present disclosure, in operation S210, for example, a target image including a target object may be captured by a camera installed on the ceiling of the room. According to an embodiment of the present disclosure, the image capture device may include a camera with a fisheye camera. Capturing images using a fisheye camera with a vertical viewing angle can effectively avoid the obstruction of indoor objects and has a large viewing angle, which is conducive to accurately counting the number of people indoors and their locations. Those skilled in the art will appreciate that this method is not only applicable to fisheye cameras but also to other types of cameras. For ease of description, the following examples are described by taking a fisheye camera as an example of an image capture device. Those skilled in the art will appreciate that an "object" may be a person or other object such as an animal, and the present disclosure does not limit this. For ease of description, the following examples are described by taking pedestrians as an example. The following is combined with Figure 2C Embodiments of the present disclosure are described.
[0049] Figure 2C An image captured by a camera with a fisheye lens according to an embodiment of the present disclosure is schematically shown.
[0050] like Figure 2C As shown, images captured using a fisheye lens may be distorted.
[0051] According to an embodiment of the present disclosure, the measurement method further includes preprocessing the target image, and the preprocessing includes correcting the distortion of the image. Correcting the distortion of the image may be, for example, a spherical coordinate positioning method, a polynomial transformation method, a polar radius mapping method, a projection conversion algorithm, a fisheye lens calibration method, etc. According to an embodiment of the present disclosure, the image preprocessing may also include, for example, reducing the noise of the image by means of median filtering, etc. According to an embodiment of the present disclosure, the target image is preprocessed to improve the accuracy of the measurement.
[0052] Return to reference Figure 2A According to an embodiment of the present disclosure, in operation S220, a first distance and a second distance are obtained. Figure 2C In the scenario shown, the pedestrian's head is located at point A, and the foot is located at point B. The first distance may be the distance between A and B. The center position of the target image is point O1, and the second distance may be the distance between points A and O1.
[0053] Figure 3 The schematic diagram of the method for obtaining the first distance and the second distance according to an embodiment of the present disclosure is schematically shown. According to an embodiment of the present disclosure, in operation S221, for example, Figure 3In the scenario shown, the bounding box of the image of the pedestrian in the image is determined to be 310. According to an embodiment of the present disclosure, for example, the target image can be identified to determine the location of the target object; and the bounding box of the object image in the target image can be generated based on the location. For example, the target object in the target image can be determined by a machine learning method, thereby determining the location of the target object, and generating a bounding box of the image of the pedestrian based on the location. For example, a machine learning model can be obtained by learning sample images of pedestrians, and the target image can be used as the input of the machine learning model. The output result of the machine learning model is the bounding box of the image of the pedestrian in the target image.
[0054] According to an embodiment of the present disclosure, in operation S222, the target object at a position closer to the camera is closer to the center of the target image in the imaging plane of the camera, while the target object at a position farther from the camera is farther from the center of the image. Specifically, the head of the pedestrian is closer to the center of the target image in the imaging plane of the camera, and the foot of the pedestrian is farther from the center of the image. Figure 3 In the scenario shown, the center of the bounding box 410 is determined to be O2, and O1 and O2 are connected to obtain the line O1O2. The position of the pedestrian's feet can be considered to be the intersection B of the line O1O2 and the bounding box 410, and the position of the pedestrian's head can be considered to be the intersection A of the extension line of O1O2 and the bounding box 410.
[0055] According to an embodiment of the present disclosure, in operation S223, for example, Figure 3 In the scenario shown, the first distance may be the distance between A and B, and the second distance may be the distance between A and point O1.
[0056] According to an embodiment of the present disclosure, obtaining the first distance and the second distance includes, when the target object is located in a preset area, obtaining the first distance and the second distance, taking the distance between the head and the feet of the target object in the target image as the first distance, and taking the distance between the head of the target object in the target image and the center of the target image as the second distance. This method only measures the height of pedestrians located in the preset area, avoiding inaccurate statistical results caused by large errors in calculating the height of pedestrians outside the preset area. For example, in a fisheye camera, the measurement error of pedestrians close to the fisheye camera is greater than the measurement error of pedestrians far away from the fisheye camera, then the circular area with a radius of R in the image captured by the fisheye camera with the center of the image as the prototype can be used as a non-preset area, and the area outside the circular area can be used as a preset area.
[0057] Return to reference Figure 2A In operation S230, for example, the height of the pedestrian may be determined according to the similar triangle theorem.
[0058] Figure 4A schematic diagram of determining the height of a pedestrian based on the similar triangle theorem according to an embodiment of the present disclosure is schematically shown.
[0059] like Figure 4 As shown in FIG. 1 , a camera with a fisheye lens installed on the top of the room is used as an image acquisition device to acquire images. Assuming that ΔMNP is the full viewing angle of the lens, the base NP of the triangle represents the imaging plane of the camera (a two-dimensional image, Figure 4 The standing figure indicates a real person, and the figure on the ground is the projection of the person in the imaging plane of the camera. The dotted line ME represents the line between the projection of the person's head in the imaging plane and the lens. The installation height of the camera is H, the height of the real person is h, and the observed height of the person in the image collected by the camera is h I , the distance from the position of the person's head in the image captured by the camera to the center of the image is dist head .
[0060] According to the similar triangle theorem, we can get:
[0061]
[0062] The height of the person is:
[0063]
[0064] Apply this calculation method to Figure 3 In the scenario shown, the height h1 of the pedestrian is:
[0065]
[0066] Where H′ is the observation height of the camera.
[0067] According to an embodiment of the present disclosure, the target object includes a specific object. When the specific object appears in multiple target images, obtaining the first distance and the second distance includes respectively calculating the specific distance between the head and the feet of the specific object in each of the multiple target images, and determining the target image corresponding to the largest specific distance as the height calculation image; and obtaining the distance between the head and the feet of the specific object in the height calculation image as the first distance, and obtaining the distance between the head of the specific object in the height calculation image and the center of the height calculation image as the second distance.
[0068] This method selects a relatively more accurate height calculation image from multiple target images to avoid measurement errors caused by pedestrians squatting and other postures.
[0069] According to an embodiment of the present disclosure, a specific pedestrian may be, for example, a pedestrian with different postures in multiple target images. For example, during the image acquisition process, a pedestrian may squat, pitch, or perform other actions. According to an embodiment of the present disclosure, specific distances between the heads and scripts of these pedestrians in different images are calculated respectively, and the image corresponding to the largest specific distance is determined to be the height calculation image, so that the height calculation image is used as the image for calculating the height of the pedestrian to obtain the first distance and the second distance.
[0070] Figure 5 A block diagram of a measuring device 500 according to an embodiment of the present disclosure is schematically shown.
[0071] like Figure 5 As shown, the measuring device 500 may include an image acquisition module 510 , an acquisition module 520 and a determination module 530 . The acquisition module 520 includes a first determination submodule 521 , a second determination submodule 522 and a first acquisition submodule 523 .
[0072] The image acquisition module 510, for example, executes the above reference Figure 2A The described operation S210 is used to capture an image of the object by using an image capturing device, wherein the optical axis direction of the lens of the image capturing device is perpendicular to the ground.
[0073] Obtaining module 520, for example, executing the above reference Figure 2A The described operation S220 is used to obtain the distance between the head and the feet of the object in the image as the first distance, and to obtain the distance between the head of the object in the image and the center of the image as the second distance.
[0074] Determine module 530, for example, executes the above reference Figure 2A The described operation S230 is used to determine the height of the object based on the first distance, the second distance, and the vertical distance from the lens to the ground.
[0075] The first determination submodule 521, for example, executes the above reference Figure 2B The described operation S221 is used to determine a bounding box of the object image.
[0076] The second determination submodule 522, for example, executes the above reference Figure 2B The described operation S222 is used to determine the head position and foot position of the target object, wherein the head position is the intersection of the extended line of the line connecting the center of the bounding box and the center of the target image and the bounding box, and the foot position is the intersection of the line connecting the center of the bounding box and the center of the target image and the bounding box.
[0077] The first obtaining submodule 523, for example, executes the above reference Figure 2B The described operation S223 is used to obtain the first distance and the second distance based on the head position and the foot position.
[0078] According to an embodiment of the present disclosure, the lens includes a fisheye lens.
[0079] According to an embodiment of the present disclosure, the first determination submodule 521 includes a determination subunit and a generation subunit. The determination subunit is used to identify the target image and determine the location of the target object. The generation subunit is used to generate a bounding box of the object image in the target image based on the location.
[0080] Figure 6 A block diagram of a measuring device 600 according to an embodiment of the present disclosure is schematically shown.
[0081] like Figure 6 As shown, the measuring device 600 further includes a pre-processing module 610 based on the above-mentioned embodiment.
[0082] The preprocessing module is used to preprocess the target image, and the preprocessing includes correcting the distortion of the target image.
[0083] According to an embodiment of the present disclosure, the target object includes a specific object. When the specific object appears in multiple images, the acquisition module 520 includes a calculation submodule, a third determination submodule, and a second acquisition submodule. The calculation submodule is used to respectively calculate the specific distance between the head and the feet of the specific object in each of the multiple target images, the third determination submodule is used to determine that the target image corresponding to the largest specific distance is the height calculation image, and the second acquisition submodule is used to obtain the distance between the head and the feet of the specific object in the height calculation image as the first distance, and obtain the distance between the head of the specific object in the height calculation image and the center of the height calculation image as the second distance.
[0084] According to an embodiment of the present disclosure, the acquisition module 520 includes a third acquisition sub-module, which is used to obtain a first distance and a second distance when the target object is located in a preset area, wherein the distance between the head and the feet of the target object in the target image is taken as the first distance, and the distance between the head of the target object in the target image and the center of the target image is taken as the second distance.
[0085] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0086] For example, any multiple of the image acquisition module 510, the acquisition module 520, the determination module 530, and the pre-processing module 610 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the image acquisition module 510, the acquisition module 520, the determination module 530, and the pre-processing module 610 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware or in a suitable combination of any of them. Alternatively, at least one of the image acquisition module 510 , the acquisition module 520 , the determination module 530 and the pre-processing module 610 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.
[0087] Figure 7 A block diagram of a computer system suitable for implementing an object processing method and system according to an embodiment of the present disclosure is schematically shown. Figure 7 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0088] like Figure 7As shown, the computer system 700 according to the embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0089] In RAM 703, various programs and data required for the operation of system 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other through bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0090] According to an embodiment of the present disclosure, the system 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The system 700 may further include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0091] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0092] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0093] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0094] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0095] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0096] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A measurement method, comprising: Capturing a target image by an image acquisition device, wherein the target image includes an object image of a target object, wherein an optical axis direction of a lens of the image acquisition device is perpendicular to the ground; Obtaining a first distance and a second distance, wherein the distance between the head and the feet of the target object is taken as the first distance, and the distance between the head of the target object and the center of the target image is taken as the second distance; and Based on the first distance, the second distance and the vertical distance from the lens to the ground, the height of the target object is determined according to the similar triangle theorem, Wherein, obtaining the first distance and the second distance comprises: determining a bounding box of the object image; Determining a head position and a foot position of the target object, wherein the head position is an intersection point of an extension line of a line connecting the center of the bounding box and the center of the target image and the bounding box, and the foot position is an intersection point of a line connecting the center of the bounding box and the center of the target image and the bounding box; and The first distance and the second distance are obtained based on the head position and the foot position.
2. The method according to claim 1, wherein: Determining a bounding box of the object image includes: Identify the target image to determine the location of the target object; and A bounding box of the object image in the target image is generated based on the position.
3. The method according to claim 1, wherein: The obtaining of the first distance and the second distance comprises: When the target object is located in a preset area, a first distance and a second distance are obtained, wherein the distance between the head and feet of the target object in the target image is taken as the first distance, and the distance between the head of the target object in the target image and the center of the target image is taken as the second distance.
4. The method according to claim 1, wherein: The target object includes a specific object. When the specific object appears in multiple target images, obtaining the first distance and the second distance includes: respectively calculating a specific distance between a head and a foot of the specific object in each of the plurality of target images; determining that the target image corresponding to the maximum specific distance is the height calculation image; and A distance between a head and a foot of a specific object in the height calculation image is obtained as a first distance, and a distance between a head of the specific object in the height calculation image and a center of the height calculation image is obtained as a second distance.
5. The method according to claim 1, wherein: The lens comprises a fisheye lens.
6. The method according to claim 1, further comprising: The target image is preprocessed, and the preprocessing includes correcting the distortion of the target image.
7. A measuring device comprising: An image acquisition module, used for acquiring a target image through an image acquisition device, wherein the target image includes an object image of a target object, wherein an optical axis direction of a lens of the image acquisition device is made perpendicular to the ground; an obtaining module, configured to obtain a first distance and a second distance, wherein the distance between the head and the feet of the target object is taken as the first distance, and the distance between the head of the target object and the center of the target image is taken as the second distance; and a determination module, configured to determine the height of the object according to the similar triangle theorem based on the first distance, the second distance and the vertical distance from the lens to the ground, Wherein, the acquisition module includes: A first determination submodule, configured to determine a bounding box of the object image; a second determination submodule, configured to determine a head position and a foot position of the target object, wherein the head position is an intersection point of an extension line of a line connecting the center of the bounding box and the center of the target image and the bounding box, and the foot position is an intersection point of a line connecting the center of the bounding box and the center of the target image and the bounding box; and The first obtaining submodule is used to obtain the first distance and the second distance based on the head position and the foot position.
8. The device according to claim 7, wherein: The first determining submodule includes: a determination subunit, configured to identify the target image and determine the location of the target object; and A generating subunit is used to generate a bounding box of the image of the object in the target image based on the position.
9. The device according to claim 7, wherein: The target object includes a specific object. When the specific object appears in multiple target images, the obtaining module includes: a calculation submodule, configured to respectively calculate a specific distance between a head and a foot of the specific object in each of the plurality of target images; A third determination submodule is used to determine that the target image corresponding to the maximum specific distance is a height calculation image; and The second obtaining submodule is used to obtain the distance between the head and feet of the specific object in the height calculation image as the first distance, and to obtain the distance between the head of the specific object in the height calculation image and the center of the height calculation image as the second distance.
10. A measurement system comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Body height measurement method and body height measurement device based on depth camera
CN106683070A
Method and device for extracting human head image based on deep learning
CN108614994A