CN111985266A - Scale map determination method, device, equipment and storage medium - Google Patents

Scale map determination method, device, equipment and storage medium Download PDF

Info

Publication number
CN111985266A
CN111985266A CN201910423356.9A CN201910423356A CN111985266A CN 111985266 A CN111985266 A CN 111985266A CN 201910423356 A CN201910423356 A CN 201910423356A CN 111985266 A CN111985266 A CN 111985266A
Authority
CN
China
Prior art keywords
pixel
distance value
pixel distance
point
scale map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910423356.9A
Other languages
Chinese (zh)
Other versions
CN111985266B (en
Inventor
曾晓嘉
李�杰
蒋丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SF Technology Co Ltd
Original Assignee
SF Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN201910423356.9A priority Critical patent/CN111985266B/en
Priority claimed from CN201910423356.9A external-priority patent/CN111985266B/en
Publication of CN111985266A publication Critical patent/CN111985266A/en
Application granted granted Critical
Publication of CN111985266B publication Critical patent/CN111985266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for determining a scale map, wherein the method comprises the following steps: acquiring a plurality of video frames from the same video stream at intervals; extracting a first characteristic point of a reference object in each frame of the video frame; determining a pixel distance value of the first characteristic point, wherein the pixel distance value is used for representing a distance value between related pixel points corresponding to the first characteristic point; marking the pixel distance value at the pixel point corresponding to the first characteristic point to construct a scale map, wherein each pixel point in the scale map is characterized by the pixel distance value corresponding to the pixel distance value. According to the technical scheme, the pixel distance value corresponding to the first characteristic point of the reference object can be quickly determined, the camera does not need to be manually marked, the pixel distance value can be marked at the pixel point corresponding to the first characteristic point, and therefore the scale map is automatically constructed, and the method and the device are high in operability and high in precision.

Description

Scale map determination method, device, equipment and storage medium
Technical Field
The present invention relates generally to the field of computer vision, and more particularly, to a method, an apparatus, a device, and a storage medium for determining a scale map.
Background
With the rapid development of the logistics industry, in order to pursue timeliness, express delivery workers can have the action of throwing objects, the actions not only damage packages, but also increase various complaints, express delivery operation needs to be monitored in real time to obtain videos, the throwing action is detected based on the videos, and the object can be judged to have the throwing action by determining a scale map of the object and an object in a picture exceeding a preset standard size, so that the method is particularly important for determining the scale information of the object.
At present, the scale information of a target object can be obtained by calibrating the cameras, but when the number of the cameras is large, a large amount of manpower is needed to calibrate each camera, and when the position of the camera changes, the camera needs to be manually re-calibrated, so that the labor cost is high and the operation feasibility is low.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a method, an apparatus, a device and a storage medium for determining a scale map.
In a first aspect, the present invention provides a method for determining a scale map, the method comprising:
acquiring a plurality of video frames from the same video stream at intervals;
Extracting a first characteristic point of a reference object in each frame of the video frame;
determining a pixel distance value of the first characteristic point, wherein the pixel distance value is used for representing a distance value between related pixel points corresponding to the first characteristic point;
marking the pixel distance value at the pixel point corresponding to the first characteristic point to construct a scale map, wherein each pixel point in the scale map is characterized by the pixel distance value corresponding to the pixel distance value.
In one embodiment, before extracting the first feature point of the reference object in each frame of the video frame, the method includes:
determining whether there is a reference object in the video frame;
and when the video frame has a reference object, extracting a first characteristic point of the reference object by adopting a preset algorithm.
In one embodiment, determining the pixel distance value of the first feature point comprises:
determining a first pixel location and a second pixel location of the reference object;
calculating a pixel distance value based on the first pixel location and the second pixel location;
and determining the midpoint of the first pixel position and the second pixel position as the first characteristic point.
In one embodiment, marking the pixel distance value at the pixel point corresponding to the first feature point comprises:
Determining whether a plurality of reference objects are present in the video frame;
if yes, determining a first feature point for each reference object;
and marking the pixel distance value corresponding to the first characteristic point to the pixel position corresponding to the first characteristic point.
In one embodiment, after marking the pixel distance values at the pixel points corresponding to the first feature points to construct a scale map, the method further comprises:
and determining pixel distance values corresponding to other pixel points of the unmarked pixel distance values in the scale map by adopting a linear interpolation algorithm.
In one embodiment, the method further comprises:
searching a first pixel distance value corresponding to a midpoint of a second feature point and a third feature point based on the scale map, wherein the second feature point and the third feature point are feature points of a target object extracted from a first video frame and a second video frame respectively when the target object moves from the first video frame to the second video frame;
determining a second pixel distance value between the second feature point and the third feature point;
and determining the moving distance of the target object in the real space according to the mapping relation between the first pixel distance value and the actual size and the second pixel distance value.
In a second aspect, an embodiment of the present invention provides a scale map determining apparatus, including:
the acquisition module is used for acquiring a plurality of video frames from the same video stream at intervals;
the extraction module is used for extracting a first feature point of a reference object in each frame of the video frame;
a first determining module, configured to determine a pixel distance value of the first feature point, where the pixel distance value is used to represent a distance value between related pixel points corresponding to the first feature point;
and the marking module is used for marking the pixel distance value at the pixel point corresponding to the first characteristic point, and each pixel point in the scale map is represented by the pixel distance value corresponding to the pixel point.
In one embodiment, the apparatus further comprises:
the searching module is used for searching a first pixel distance value corresponding to a midpoint of a second feature point and a third feature point on the basis of the scale map, wherein the second feature point and the third feature point are feature points of a target object, which are extracted from a first video frame and a second video frame respectively when the target object moves from the first video frame to the second video frame;
a second determining module for determining a second pixel distance value between the second feature point and the third feature point;
And the third determining module is used for determining the moving distance of the target object in the real space according to the mapping relation between the first pixel distance value and the actual size and the second pixel distance value.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the scale map determination method when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the scale map determination method described above.
The method, the device, the equipment and the storage medium for determining the scale map acquire a plurality of video frames from the same video stream at intervals, extract a first characteristic point of a reference object in each frame of video frame, determine a pixel distance value of the first characteristic point, and mark the pixel distance value with a pixel point corresponding to the first characteristic point to construct the scale map. This technical scheme can be according to a plurality of video frames of same video stream, and the pixel distance value that the first characteristic point of quick determination reference object corresponds compares with prior art, and it need not to mark the camera through the manual work, can be through the pixel distance value of confirming the reference object to automatically, construct out the yardstick picture, not only maneuverability is high, can be accurate moreover and confirm yardstick information.
Furthermore, the midpoint between the first pixel position and the second pixel position is determined to be the first characteristic point, so that the error of determining the scale map is reduced, and the accuracy of the scale information is improved.
Further, pixel distance values corresponding to other pixel points of the unmarked pixel distance values are determined through a linear interpolation algorithm, so that a scale map can be constructed more quickly and completely.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a schematic flowchart of a method for determining a scale map according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for determining a scale map according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a reference object according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for determining a moving distance of a target object in a real space based on a scale map according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a scale map determining apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As mentioned in the background art, the size and dimension of the same actual object in the picture shot by different cameras are different, and when the same object is in different scenes, the size and dimension of the same object in the picture are also different, and when the same object is in the logistics field, it can be further determined whether the object has a throwing behavior by determining the moving dimension information of the object, and in the conventional technology, the parameters of the cameras can be calibrated, for example: the method comprises the steps of determining the information of parameters such as the ground clearance, the pitch angle and the rotation angle of a camera, and truly restoring a three-dimensional picture to determine whether the object has a throwing action.
Based on the defects, the application provides a method for determining a scale map, multiple video frames are obtained from the same video stream at intervals, a first characteristic point of a reference object in each frame of video frame is extracted, then a pixel distance value of the first characteristic point is determined, and the pixel distance value is marked with a pixel point corresponding to the first characteristic point to construct the scale map.
For convenience of understanding and explanation, the method, the apparatus, the device, and the computer-readable storage medium for determining the scale map provided by the embodiments of the present application are described in detail below with reference to fig. 1 to 6.
Fig. 1 is a schematic flowchart of a method for determining a scale map according to an embodiment of the present application, and as shown in fig. 1, the method includes:
step S101, a plurality of video frames are acquired from the same video stream at intervals.
Specifically, the same video stream is a video stream file shot by the same camera, and the same video stream file can be directly acquired by the camera, downloaded by the cloud, and imported by other devices, wherein the device can be a monitoring device.
Optionally, the plurality of video frames may include one reference object, may not include the reference object, and may further include a plurality of reference objects, where the plurality of video frames may be video frame image information of the same video stream of the camera, which is acquired at intervals.
It should be noted that, when the camera is used to capture an image, the camera should be disposed at a position higher than the image capture area, so that the camera can clearly and comprehensively see the reference object, and the camera may be a camera fixed to the camera.
Optionally, multiple video frames may be obtained at intervals from the same video stream file through video processing software, so as to obtain multiple video frame images, where the video processing software may be matlab, opencv, or the like.
Step S102, extracting a first feature point of the reference object in each frame of video frame.
Specifically, in order to determine the moving distance of the target object in the image in the real space, a reference object needs to be determined, and the reference object has the following attributes:
(1) the actual size of this reference object can be known in measurable units; wherein the measurable units are centimeters, inches, and the like;
(2) This reference object can be easily found in the image, i.e. it is as unobscured as possible.
Wherein the first feature point is a key point for representing a reference object.
For example, the reference object may be an upper body image of a person, and the first feature point is a key point that may represent the upper body image of the person.
It should be noted that before extracting the first feature point of the reference object in the video frame, it may be determined whether there is a reference object in the video frame, and when there is a reference object in the video frame, a preset algorithm is used to extract the first feature point of the reference object, where the preset algorithm may be an openposition algorithm, where the openposition is a body tracking system, which can track the limb movement of a person, including the hand and the face, in real time, and it can process the video frame using computer vision and machine learning techniques.
In addition, in the logistics sorting scene, the upper half of the human body is selected as the reference object because when the human body sorts the parcels, the parts such as hands and feet may be shielded by objects such as tables, so that the calculated pixel distance value has errors, and the probability that the upper half of the human body is generally shielded is smaller than that of other parts of the human body.
Step S103, determining a pixel distance value of the first characteristic point, wherein the pixel distance value is used for representing a distance value between related pixel points corresponding to the first characteristic point.
After each video frame of the same video stream is acquired, when a reference object is determined to exist in the video frame, a first feature point of the reference object in the video frame may be extracted, and a pixel distance value of the first feature point is further determined through calculation.
Optionally, as an implementation manner of step S103, as shown in fig. 2, the method includes:
step S201, determining a first pixel position and a second pixel position of the reference object.
Step S202, calculating a pixel distance value based on the first pixel position and the second pixel position.
Step S203, determining a midpoint between the first pixel position and the second pixel position as a first feature point.
Specifically, the first pixel position and the second pixel position are used to represent a contour of a keypoint of a reference object, where the first pixel position and the second pixel position may be different in number or the same in number, and for a video frame image with the reference object, the first pixel position and the second pixel position of the reference object may be determined first, then a pixel distance value is calculated according to the first pixel position and the second pixel position, and a midpoint of the first pixel position and the second pixel position is determined as a first feature point, so as to obtain a pixel distance value corresponding to the first feature point.
For example, referring to the schematic structural diagram of the key points of the person shown in fig. 3, after a video frame of the same video stream is obtained, a reference object in the video frame, that is, an upper half image of the person, is determined, feature points of the neck and the waist of the person are identified by an openpos algorithm, that is, a key point position 1 of the neck of the person is taken as a first pixel position, a key point position 8 and a key point position 11 of the waist of the person are taken as a second pixel position, a midpoint between the key point position 8 and the key point position 11 is determined, a midpoint between the first pixel position 1 and the second pixel positions 8 and 11 is taken as a first feature point, a distance value from the midpoint to the first pixel position 1 is calculated, and the distance value is taken as a pixel distance value of the reference object at the first feature point.
And step S104, marking the pixel distance value at the pixel point corresponding to the first characteristic point to construct a scale map, wherein each pixel point in the scale map is represented by the pixel distance value corresponding to the pixel distance value.
Specifically, the scale map is a two-dimensional virtual map representing scale information of an object, each pixel point of the two-dimensional virtual map is represented by a pixel distance value corresponding to the pixel point, the scale map is equivalent to a two-dimensional array, and a corresponding pixel distance value is represented at each pixel position of the array, wherein assuming that a video frame picture acquired by a camera has a resolution of 60 × 100, the size of the scale map corresponding to the video frame picture is a two-dimensional map of 60 × 100.
It should be noted that when the pixel distance value is marked to the pixel point corresponding to the first feature point, it may be determined whether a plurality of reference objects exist in the video frame, and if a plurality of reference objects exist, the first feature point may be determined for each reference object, and the pixel distance value corresponding to the first feature point is marked to the pixel position corresponding to the first feature point.
For example, a first video frame of the same video stream may be captured first, the upper body of a person as a reference object of the first video frame may be identified, a first feature point of the upper body of the person may be recognized, and if the pixel position of the first feature point of the upper body of the person is identified as (40, 60) and the corresponding pixel distance value is calculated as 50, the pixel point position corresponding to the first feature point may be found on the scale map as (40, 60), so that the pixel distance value at the pixel position (40, 60) in the scale map may be identified as 50.
Further, a second video frame of the same video stream is captured after a period of time, and then the reference object in the second video frame may be processed according to the method described above, and assuming that when the pixel position of the first feature point in the reference object in the second video frame is determined to be (50, 60) and the corresponding first pixel distance value is 55, the pixel distance value at the pixel position of (50, 60) in the scale map may be determined to be 55.
Similarly, a third video frame of the same video stream may be captured at the same interval, and assuming that there is no reference object in the third video frame, then the scale map is not updated, and when a fourth video frame of the same video stream is acquired at the same time interval, assuming that there are multiple reference objects in the fourth video frame, respectively extracting first characteristic points from the plurality of reference objects, and determining a pixel distance value corresponding to each characteristic point, marking the pixel distance value on the pixel point position corresponding to the first characteristic point, and repeating the steps to determine the pixel distance values of a plurality of pixel positions in the scale map, wherein the first video frame and the second video frame have a reference object, the fourth video frame has a plurality of reference objects, the video frame with the reference object can obtain the pixel distance value of the corresponding pixel position of the scale map.
In addition, due to the fact that deviations may exist in the first characteristic points identified by openposition, calculated pixel distance values may be different, when a plurality of pixel distance values exist in a certain pixel position of the scale map, the pixel distance values can be averaged, and the average value is used as the pixel distance value of the pixel position of the scale map corresponding to the first characteristic point.
Specifically, after the pixel distance value is marked at the pixel point corresponding to the first feature point to construct the scale map, that is, after the pixel distance value is determined at a plurality of pixel positions of the obtained scale map, the pixel distance values at the plurality of pixel positions may be used as the known pixel distance values of the scale map, and for the pixel position without a reference object in the video frame, the pixel distance value corresponding to each pixel coordinate of the scale map may be determined by using a linear interpolation algorithm.
For example, assuming that in a scale map with a size of 60 × 100, pixel distance values of 1000 known pixel positions have been determined, an average value of the pixel distance values of the known pixel positions is calculated, and since it is determined empirically that a pixel distance value close to a camera is large and a pixel distance value far from the camera is small, a pixel distance value corresponding to a bottom edge position of the scale map is large and can be set to be an average value 1.2 times, and a pixel distance value corresponding to a top edge position of the scale map is small and can be set to be an average value 0.8 times, that is, a pixel distance value of an end point pixel position of the scale map is determined, and then other pixel point positions of the remaining unmarked pixel distance values are filled in an incremental manner, so as to further obtain a pixel distance value of each pixel position of the scale map.
The method for determining the scale map obtains a plurality of video frames from the same video stream at intervals, extracts a first characteristic point of a reference object in each frame of video frame, determines a pixel distance value of the first characteristic point, and marks the pixel distance value at a pixel point corresponding to the first characteristic point to construct the scale map. This technical scheme can be according to a plurality of video frames of same video stream, and the pixel distance value that the first characteristic point of quick determination reference object corresponds compares with prior art, and it need not to mark the camera through the manual work, can be through the pixel distance value of confirming the reference object to automatically, construct out the yardstick picture, not only maneuverability is high, can be accurate moreover and confirm yardstick information.
Fig. 4 is a schematic flowchart of a method for determining a moving distance of a target object in a real space based on a scale map according to an embodiment of the present invention, as shown in fig. 4, the method includes:
step S301, searching for a first pixel distance value corresponding to a midpoint between a second feature point and a third feature point based on a scale map, wherein the second feature point and the third feature point are feature points of a target object extracted from a first video frame and a second video frame respectively when the target object moves from the first video frame to the second video frame.
Specifically, when the target object moves from a first video frame to a second video frame, in order to determine the moving distance of the target object in the real space, a second feature point of the target object needs to be extracted from the first video frame, a third feature point needs to be correspondingly extracted from the second video frame, a midpoint between the second feature point and the third feature point needs to be determined, and a first pixel distance value corresponding to the midpoint needs to be found on the scale map based on the obtained scale map.
It should be noted that, after the first pixel distance value of the midpoint in the scale map, since the actual size of the reference object is known, the mapping relationship between the actual size of the reference object and the first pixel distance value may be determined, for example, when the corresponding pixel distance value at the pixel position (40, 60) of the midpoint of the second feature point and the third feature point is 50, and assuming that the actual size of the reference object is 1 meter, the mapping relationship at the pixel position (40, 60) is 1: 50.
and step S302, determining a second pixel distance value between the second characteristic point and the third characteristic point.
Step S303, determining the moving distance of the target object in the real space according to the mapping relation between the first pixel distance value and the actual size and the second pixel distance value.
It should be noted that, based on the second feature point and the third feature point of the target object, a second pixel distance value of the target object between the second feature point and the third feature point may be calculated, and the moving distance of the target object in the real space may be determined according to the second pixel distance value and the mapping relationship.
For example, in a logistics sorting scenario, when the actual size of the reference object person is known to be 1 meter, assuming that when the target object moves from point B to point C, a second pixel distance value from point B to point C can be calculated to be 100, and the midpoint between point B and point C is point a, and it is found through the scale map that the pixel distance value corresponding to point a is 50, it can be determined from 1/50 that the moving distance of the target object in real space is 2 meters per 100.
According to the method for determining the moving distance of the target object in the real space, the moving distance of the target object in the real space is determined by searching a first pixel distance value corresponding to a midpoint between a second characteristic point and a third characteristic point based on a scale map, determining a second pixel distance value between the second characteristic point and the third characteristic point and according to the mapping relation between the first pixel distance value and the actual size and the second pixel distance value. The method can quickly determine the moving distance of the target object in the real space based on the pixel distance value of the scale map, further accurately judge the motion state of the object, is suitable for calculating the distance scene that the object throws away to a great extent, saves a large amount of labor cost and improves the working efficiency.
It should be noted that while the operations of the method of the present invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
Fig. 5 is a schematic structural diagram of a scale map determining apparatus according to an embodiment of the present invention. As shown in fig. 5, the apparatus may implement the methods shown in fig. 1 to 4, and may include:
an obtaining module 10, configured to obtain multiple video frames from the same video stream at intervals;
an extracting module 20, configured to extract a first feature point of a reference object in each frame of the video frame;
a first determining module 30, configured to determine a pixel distance value of the first feature point, where the pixel distance value is used to represent a distance value between related pixel points corresponding to the first feature point;
and the marking module 40 is configured to mark the pixel distance value at a pixel point corresponding to the first feature point, where each pixel point in the scale map is characterized by the pixel distance value corresponding thereto.
Preferably, the apparatus is further configured to:
determining whether there is a reference object in the video frame;
and when the video frame has a reference object, extracting a first characteristic point of the reference object by adopting a preset algorithm.
Preferably, the first determining module 30 includes:
a first determining unit 301 for determining a first pixel position and a second pixel position of the reference object;
a calculating unit 302 for calculating a pixel distance value based on the first pixel position and the second pixel position;
a third determining unit 303, configured to determine a midpoint between the first pixel position and the second pixel position as the first feature point.
Preferably, the marking module 40 includes:
a fourth determining unit 401, configured to determine whether a plurality of reference objects exist in the video frame;
a fifth determining unit 402 configured to determine, when a plurality of reference objects exist, a first feature point for each of the reference objects;
a marking unit 403, configured to mark the pixel distance value corresponding to the first feature point to the pixel position corresponding to the first feature point.
Preferably, the apparatus is further configured to:
and determining pixel distance values corresponding to other pixel points of the unmarked pixel distance values in the scale map by adopting a linear interpolation algorithm.
Preferably, the apparatus further comprises:
a searching module 50, configured to search, based on the scale map, a first pixel distance value corresponding to a midpoint between a second feature point and a third feature point, where the second feature point and the third feature point are feature points of a target object extracted from a first video frame and a second video frame when the target object moves from the first video frame to the second video frame, respectively;
a second determining module 60, configured to determine a second pixel distance value between the second feature point and the third feature point;
a third determining module 70, configured to determine, according to the mapping relationship between the first pixel distance value and the actual size and the second pixel distance value, a moving distance of the target object in the real space.
The scale map determining apparatus provided in this embodiment may implement the embodiments of the method described above, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in fig. 6, a schematic structural diagram of a computer system 600 suitable for implementing the terminal device or the server of the embodiment of the present application is shown.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 606 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 606 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, the processes described above with reference to fig. 1-4 may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method of fig. 1-4. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes an acquisition module, an extraction module, a first determination module, and a labeling module. Where the names of these units or modules do not in some cases constitute a limitation of the unit or module itself, for example, the capture module may also be described as "for capturing multiple video frames at intervals from the same video stream".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the method for determining a scale map as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 1: step S101, a plurality of video frames are acquired from the same video stream at intervals; step S102, extracting a first characteristic point of a reference object in each frame of the video frame; step S103, determining a pixel distance value of the first characteristic point, wherein the pixel distance value is used for representing a distance value between related pixel points corresponding to the first characteristic point; and step S104, marking the pixel distance value with the pixel point corresponding to the first characteristic point to construct a scale map, wherein each pixel point in the scale map is represented by the pixel distance value corresponding to the pixel point. As another example, the electronic device may implement the various steps shown in fig. 2-4.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc. Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware.

Claims (10)

1. A method for determining a scale map, comprising:
acquiring a plurality of video frames from the same video stream at intervals;
extracting a first characteristic point of a reference object in each frame of the video frame;
determining a pixel distance value of the first characteristic point, wherein the pixel distance value is used for representing a distance value between related pixel points corresponding to the first characteristic point;
marking the pixel distance value at the pixel point corresponding to the first characteristic point to construct a scale map, wherein each pixel point in the scale map is characterized by the pixel distance value corresponding to the pixel distance value.
2. The method according to claim 1, wherein before extracting the first feature point of the reference object in each frame of the video frame, the method comprises:
determining whether there is a reference object in the video frame;
and when the video frame has a reference object, extracting a first characteristic point of the reference object by adopting a preset algorithm.
3. The method of scale map determination of claim 1, wherein determining a pixel distance value for the first feature point comprises:
determining a first pixel location and a second pixel location of the reference object;
calculating a pixel distance value based on the first pixel location and the second pixel location;
And determining the midpoint of the first pixel position and the second pixel position as the first characteristic point.
4. The method of scale map determination of claim 1, wherein labeling the pixel distance values at pixel points corresponding to the first feature points comprises:
determining whether a plurality of reference objects are present in the video frame;
if yes, determining a first feature point for each reference object;
and marking the pixel distance value corresponding to the first characteristic point to the pixel position corresponding to the first characteristic point.
5. The method of scale map determination of claim 4, wherein after marking the pixel distance values at pixel points corresponding to the first feature points to construct a scale map, the method further comprises:
and determining pixel distance values corresponding to other pixel points of the unmarked pixel distance values in the scale map by adopting a linear interpolation algorithm.
6. The scale map determination method according to any one of claims 1 to 5, comprising:
searching a first pixel distance value corresponding to a midpoint of a second feature point and a third feature point based on the scale map, wherein the second feature point and the third feature point are feature points of a target object extracted from a first video frame and a second video frame respectively when the target object moves from the first video frame to the second video frame;
Determining a second pixel distance value between the second feature point and the third feature point;
and determining the moving distance of the target object in the real space according to the mapping relation between the first pixel distance value and the actual size and the second pixel distance value.
7. A scale map determination apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a plurality of video frames from the same video stream at intervals;
the extraction module is used for extracting a first feature point of a reference object in each frame of the video frame;
a first determining module, configured to determine a pixel distance value of the first feature point, where the pixel distance value is used to represent a distance value between related pixel points corresponding to the first feature point;
and the marking module is used for marking the pixel distance value at the pixel point corresponding to the first characteristic point, and each pixel point in the scale map is represented by the pixel distance value corresponding to the pixel point.
8. The scale map determining apparatus according to claim 7, comprising:
the searching module is used for searching a first pixel distance value corresponding to a midpoint of a second feature point and a third feature point on the basis of the scale map, wherein the second feature point and the third feature point are feature points of a target object, which are extracted from a first video frame and a second video frame respectively when the target object moves from the first video frame to the second video frame;
A second determining module for determining a second pixel distance value between the second feature point and the third feature point;
and the third determining module is used for determining the moving distance of the target object in the real space according to the mapping relation between the first pixel distance value and the actual size and the second pixel distance value.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-6 when executing the program.
10. A computer-readable storage medium having stored thereon a computer program for:
the computer program, when executed by a processor, implementing the method of any one of claims 1-6.
CN201910423356.9A 2019-05-21 Scale map determining method, device, equipment and storage medium Active CN111985266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910423356.9A CN111985266B (en) 2019-05-21 Scale map determining method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910423356.9A CN111985266B (en) 2019-05-21 Scale map determining method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111985266A true CN111985266A (en) 2020-11-24
CN111985266B CN111985266B (en) 2024-06-07

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149658A (en) * 2020-11-26 2020-12-29 科大讯飞(苏州)科技有限公司 Target size determination method, system, electronic device and storage medium
CN114018589A (en) * 2021-10-25 2022-02-08 中汽研汽车检验中心(天津)有限公司 Method and device for determining air bag ejection speed, electronic equipment and medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177584A (en) * 2013-02-05 2013-06-26 长安大学 Vehicle speed detection method based on enumeration probe
CN103197090A (en) * 2013-03-07 2013-07-10 上海电科智能系统股份有限公司 Video speed measuring method based on feature point change
CN103577875A (en) * 2013-11-20 2014-02-12 北京联合大学 CAD (computer-aided design) people counting method based on FAST (features from accelerated segment test)
CN104268591A (en) * 2014-09-19 2015-01-07 海信集团有限公司 Face key point detecting method and device
CN105654060A (en) * 2016-01-04 2016-06-08 中海网络科技股份有限公司 Method for acquiring vehicle speed from road monitoring video
CN105989593A (en) * 2015-02-12 2016-10-05 杭州海康威视系统技术有限公司 Method and device for measuring speed of specific vehicle in video record
CN106340015A (en) * 2016-08-30 2017-01-18 沈阳东软医疗系统有限公司 Key point positioning method and device
CN107590818A (en) * 2017-09-06 2018-01-16 华中科技大学 A kind of interactive video dividing method
CN108038469A (en) * 2017-12-27 2018-05-15 百度在线网络技术(北京)有限公司 Method and apparatus for detecting human body
CN108229355A (en) * 2017-12-22 2018-06-29 北京市商汤科技开发有限公司 Activity recognition method and apparatus, electronic equipment, computer storage media, program
CN108334863A (en) * 2018-03-09 2018-07-27 百度在线网络技术(北京)有限公司 Identity identifying method, system, terminal and computer readable storage medium
CN108957024A (en) * 2017-05-22 2018-12-07 阿里巴巴集团控股有限公司 A kind of method, apparatus and electronic equipment of tachometric survey

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177584A (en) * 2013-02-05 2013-06-26 长安大学 Vehicle speed detection method based on enumeration probe
CN103197090A (en) * 2013-03-07 2013-07-10 上海电科智能系统股份有限公司 Video speed measuring method based on feature point change
CN103577875A (en) * 2013-11-20 2014-02-12 北京联合大学 CAD (computer-aided design) people counting method based on FAST (features from accelerated segment test)
CN104268591A (en) * 2014-09-19 2015-01-07 海信集团有限公司 Face key point detecting method and device
CN105989593A (en) * 2015-02-12 2016-10-05 杭州海康威视系统技术有限公司 Method and device for measuring speed of specific vehicle in video record
CN105654060A (en) * 2016-01-04 2016-06-08 中海网络科技股份有限公司 Method for acquiring vehicle speed from road monitoring video
CN106340015A (en) * 2016-08-30 2017-01-18 沈阳东软医疗系统有限公司 Key point positioning method and device
CN108957024A (en) * 2017-05-22 2018-12-07 阿里巴巴集团控股有限公司 A kind of method, apparatus and electronic equipment of tachometric survey
CN107590818A (en) * 2017-09-06 2018-01-16 华中科技大学 A kind of interactive video dividing method
CN108229355A (en) * 2017-12-22 2018-06-29 北京市商汤科技开发有限公司 Activity recognition method and apparatus, electronic equipment, computer storage media, program
CN108038469A (en) * 2017-12-27 2018-05-15 百度在线网络技术(北京)有限公司 Method and apparatus for detecting human body
CN108334863A (en) * 2018-03-09 2018-07-27 百度在线网络技术(北京)有限公司 Identity identifying method, system, terminal and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙振国 等: "基于光流和贝叶斯算法的目标跟踪研究", 电子世界, no. 04, pages 22 - 23 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149658A (en) * 2020-11-26 2020-12-29 科大讯飞(苏州)科技有限公司 Target size determination method, system, electronic device and storage medium
CN112149658B (en) * 2020-11-26 2021-03-26 科大讯飞(苏州)科技有限公司 Target size determination method, system, electronic device and storage medium
CN114018589A (en) * 2021-10-25 2022-02-08 中汽研汽车检验中心(天津)有限公司 Method and device for determining air bag ejection speed, electronic equipment and medium
CN114018589B (en) * 2021-10-25 2024-03-15 中汽研汽车检验中心(天津)有限公司 Method and device for determining airbag ejection speed, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN111354042B (en) Feature extraction method and device of robot visual image, robot and medium
Prescott et al. Line-based correction of radial lens distortion
CN109801333B (en) Volume measurement method, device and system and computing equipment
KR102052114B1 (en) Object change detection system for high definition electronic map upgrade and method thereof
CN109472829B (en) Object positioning method, device, equipment and storage medium
CN114119864A (en) Positioning method and device based on three-dimensional reconstruction and point cloud matching
CN112880687A (en) Indoor positioning method, device, equipment and computer readable storage medium
US20160169662A1 (en) Location-based facility management system using mobile device
CN111310753A (en) Meter alignment method and device
KR101469099B1 (en) Auto-Camera Calibration Method Based on Human Object Tracking
CN111444570A (en) Construction error information acquisition method and device
KR102490521B1 (en) Automatic calibration through vector matching of the LiDAR coordinate system and the camera coordinate system
US8274597B2 (en) System and method for measuring a border of an image of an object
US9135715B1 (en) Local feature cameras for structure from motion (SFM) problems with generalized cameras
CN113112551B (en) Camera parameter determining method and device, road side equipment and cloud control platform
KR101574195B1 (en) Auto Calibration Method for Virtual Camera based on Mobile Platform
CN115861407A (en) Safe distance detection method and system based on deep learning
CN116203976A (en) Indoor inspection method and device for transformer substation, unmanned aerial vehicle and storage medium
CN111985266A (en) Scale map determination method, device, equipment and storage medium
CN111985266B (en) Scale map determining method, device, equipment and storage medium
CN115115619A (en) Feature point extraction method, device and equipment based on circle fitting and storage medium
CN115375774A (en) Method, apparatus, device and storage medium for determining external parameters of a camera
CN109284707A (en) Moving target detection method and device
CN110930455B (en) Positioning method, positioning device, terminal equipment and storage medium
CN109087338B (en) Method and device for extracting image sparse optical flow

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant