Disclosure of Invention
The technical problem solved by the present disclosure is to provide a vehicle door motion detection method, so as to at least partially solve the technical problems of low motion recognition efficiency and false recognition in the prior art. In addition, a door motion detection device, a door motion detection hardware device, a computer readable storage medium and a door motion detection terminal are also provided.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
a vehicle door motion detection method includes:
carrying out vehicle door identification on each frame of video image contained in an input video, and determining at least one frame of target video image containing the vehicle door;
respectively carrying out vehicle door state identification on the at least one frame of target video image to obtain the vehicle door state in each frame of target video image;
and determining the door action according to the door state of the at least one frame of target video image.
Further, the determining the door action according to the door state of the at least one frame of target video image includes:
forming a state time sequence according to the vehicle door state of the at least one frame of target video image and the time sequence of the corresponding target video image;
and determining the action of the vehicle door according to the state time sequence.
Further, the determining the door motion according to the state time sequence comprises:
assigning a value to each state contained in the state time series; wherein, the on state and the off state correspond to different values;
detecting a numerical jump in the state time series;
and determining the action of the vehicle door according to the numerical jump.
Further, the determining the door action according to the value jump includes:
determining a first target video image corresponding to the first numerical jump point and a second target video image corresponding to the second numerical jump point; wherein the first numerical trip point and the second numerical trip point are continuous trip points;
determining a target video image frame number of the interval between the first target video image and the second target video image;
determining whether the state of the vehicle door changes or not according to the number of the target video image frames;
and determining the action of the vehicle door according to the change of the state of the vehicle door.
Further, the determining whether the state of the vehicle door changes according to the target video image frame number includes:
if the number of the target video image frames is less than the preset number of frames, determining that the state of the vehicle door is not changed; or
And if the number of the target video image frames is greater than or equal to the preset number of frames, determining that the state of the vehicle door is changed.
In order to achieve the above object, according to still another aspect of the present disclosure, the following technical solutions are also provided:
a door motion detecting device comprising:
the vehicle door identification module is used for identifying the vehicle door of each frame of video image contained in the input video and determining at least one frame of target video image containing the vehicle door;
the state identification module is used for respectively carrying out vehicle door state identification on the at least one frame of target video image to obtain the vehicle door state in each frame of target video image;
and the action determining module is used for determining the action of the vehicle door according to the vehicle door state of the at least one frame of target video image.
Further, the action determination module comprises:
the sequence forming unit is used for forming a state time sequence according to the vehicle door state of the at least one frame of target video image and the time sequence of the corresponding target video image;
and the action determining unit is used for determining the action of the vehicle door according to the state time sequence.
Further, the action determining unit is specifically configured to: assigning a value to each state contained in the state time series; wherein, the on state and the off state correspond to different values; detecting a numerical jump in the state time series; and determining the action of the vehicle door according to the numerical jump.
Further, the action determining unit is specifically configured to: determining a first target video image corresponding to the first numerical jump point and a second target video image corresponding to the second numerical jump point; wherein the first numerical trip point and the second numerical trip point are continuous trip points; determining a target video image frame number of the interval between the first target video image and the second target video image; determining whether the state of the vehicle door changes or not according to the number of the target video image frames; and determining the action of the vehicle door according to the change of the state of the vehicle door.
Further, the action determining unit is specifically configured to: if the number of the target video image frames is less than the preset number of frames, determining that the state of the vehicle door is not changed; or if the number of the target video image frames is greater than or equal to the preset number of frames, determining that the state of the vehicle door is changed.
In order to achieve the above object, according to still another aspect of the present disclosure, the following technical solutions are also provided:
an electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and
and the processor is used for operating the computer readable instructions, so that the processor can realize the steps in any one of the above technical solutions of the vehicle door motion detection method when executing.
In order to achieve the above object, according to still another aspect of the present disclosure, the following technical solutions are also provided:
a computer readable storage medium storing non-transitory computer readable instructions which, when executed by a computer, cause the computer to perform the steps of any of the above described vehicle door motion detection method aspects.
In order to achieve the above object, according to still another aspect of the present disclosure, the following technical solutions are also provided:
a vehicle door motion detection terminal comprises any vehicle door motion detection device.
According to the embodiment of the invention, the vehicle door identification is carried out on each frame of video image contained in the input video, at least one frame of target video image containing the vehicle door is determined, the vehicle door state identification is carried out on at least one frame of target video image respectively, the vehicle door state in each frame of target video image is obtained, the vehicle door action is determined according to the vehicle door state of at least one frame of target video image, and the vehicle door action identification efficiency and the identification accuracy can be improved.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Detailed Description
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
In order to solve the technical problems of low motion recognition efficiency and false recognition in the prior art, the embodiment of the disclosure provides a vehicle door motion detection method. As shown in fig. 1, the door motion detection method mainly includes steps S1 to S3. Wherein:
step S1: and carrying out vehicle door identification on each frame of video image contained in the input video, and determining at least one frame of target video image containing the vehicle door.
The input video may be a video pre-stored locally or a real-time input video.
Specifically, the vehicle door detection may be performed by using an object recognition algorithm in the prior art to determine the image containing the vehicle door in the video, for example, the available algorithms include an object recognition algorithm based on deep learning, an ssd (single shot detectors) target detection algorithm, and the like.
Step S2: and respectively carrying out vehicle door state identification on the at least one frame of target video image to obtain the vehicle door state in each frame of target video image.
Wherein the door state includes an open state and a closed state.
Step S3: and determining the door action according to the door state of the at least one frame of target video image.
Wherein the door action includes an action of opening the door and an action of closing the door.
Specifically, in two consecutive frames of the target video image, when the state of the door changes from the open state to the closed state, the door operation is determined as the door closing operation, and when the state of the door changes from the closed state to the open state, the door operation is determined as the door opening operation.
In the embodiment, the vehicle door identification is performed on each frame of video image contained in the input video, at least one frame of target video image containing the vehicle door is determined, the vehicle door state identification is performed on the at least one frame of target video image respectively to obtain the vehicle door state in each frame of target video image, the vehicle door action is determined according to the vehicle door state of the at least one frame of target video image, and the vehicle door action identification efficiency and the identification accuracy can be improved.
In an optional embodiment, step S3 specifically includes:
step S31: and forming a state time sequence according to the vehicle door state of the at least one frame of target video image and the time sequence of the corresponding target video image.
The state time sequence is composed of the vehicle door states in each frame of target video image and can be represented by a one-dimensional vector.
Step S32: and determining the action of the vehicle door according to the state time sequence.
In an optional embodiment, step S32 specifically includes:
step S321: assigning a value to each state contained in the state time series; wherein, the on state and the off state correspond to different values.
Specifically, the on state may be assigned to 1 and the off state may be assigned to 0, or the on state may be assigned to 0 and the off state may be assigned to 1, or other values may be used.
Step S322: detecting a jump in value in the state time series.
Specifically, if the on state is assigned to 1 and the off state is assigned to 0, the state time sequence is [ 000011 ], and when the value is detected to change from 0 to 1, it is determined that a value jump occurs.
Step S323: and determining the action of the vehicle door according to the numerical jump.
Specifically, referring to the example in step S322, if it is detected that the value is changed from 0 to 1, it may be determined that the door is changed from the closed state to the open state, and the door operation is determined as the door opening operation.
Further, step S323 specifically includes:
determining a first target video image corresponding to the first numerical jump point and a second target video image corresponding to the second numerical jump point; wherein the first numerical trip point and the second numerical trip point are continuous trip points;
determining a target video image frame number of the interval between the first target video image and the second target video image;
determining whether the state of the vehicle door changes or not according to the number of the target video image frames;
and determining the action of the vehicle door according to the change of the state of the vehicle door.
Further, the determining whether the state of the vehicle door changes according to the target video image frame number includes:
if the number of the target video image frames is less than the preset number of frames, determining that the state of the vehicle door is not changed; or
And if the number of the target video image frames is greater than or equal to the preset number of frames, determining that the state of the vehicle door is changed.
The preset frame number can be set by self.
Specifically, if the preset frame number is not reached and the vehicle door state is not changed after the vehicle door is jumped, the vehicle door state is considered to be not changed, and the vehicle door state is identified as the vehicle door state to be changed only when the jump is continued to exceed the preset frame number, so that the vehicle door action identification efficiency can be further improved.
It will be appreciated by those skilled in the art that obvious modifications (e.g., combinations of the enumerated modes) or equivalents may be made to the above-described embodiments.
In the above, although the steps in the embodiment of the method for detecting the door motion are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiment of the present disclosure are not necessarily performed in the above sequence, and may also be performed in other sequences such as reverse, parallel, and cross, and further, on the basis of the above steps, those skilled in the art may also add other steps, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
For convenience of description, only the relevant parts of the embodiments of the present disclosure are shown, and details of the specific techniques are not disclosed, please refer to the embodiments of the method of the present disclosure.
In order to solve the technical problem that erroneous judgment is easily caused by simultaneous blinking of two eyes in the prior art, the embodiment of the present disclosure provides a vehicle door motion detection device. The device may perform the steps in the above described vehicle door motion detection method embodiments. As shown in fig. 2, the apparatus mainly includes: a door identification module 21, a state identification module 22 and an action determination module 23; wherein the content of the first and second substances,
the vehicle door identification module 21 is configured to perform vehicle door identification on each frame of video image included in the input video, and determine at least one frame of target video image including the vehicle door;
the state identification module 22 is configured to perform vehicle door state identification on the at least one frame of target video image respectively to obtain a vehicle door state in each frame of target video image;
the action determining module 23 is configured to determine a door action according to the door state of the at least one frame of target video image.
Further, the action determining module 23 includes: a sequence forming unit 231 and an action determining unit 232; wherein the content of the first and second substances,
the sequence forming unit 231 is used for forming a state time sequence according to the door state of the at least one frame of target video image and the time sequence of the corresponding target video image;
the action determining unit 232 is used for determining the action of the vehicle door according to the state time sequence.
Further, the action determining unit 232 is specifically configured to: assigning a value to each state contained in the state time series; wherein, the on state and the off state correspond to different values; detecting a numerical jump in the state time series; and determining the action of the vehicle door according to the numerical jump.
Further, the action determining unit 232 is specifically configured to: determining a first target video image corresponding to the first numerical jump point and a second target video image corresponding to the second numerical jump point; wherein the first numerical trip point and the second numerical trip point are continuous trip points; determining a target video image frame number of the interval between the first target video image and the second target video image; determining whether the state of the vehicle door changes or not according to the number of the target video image frames; and determining the action of the vehicle door according to the change of the state of the vehicle door.
Further, the action determining unit 232 is specifically configured to: if the number of the target video image frames is less than the preset number of frames, determining that the state of the vehicle door is not changed; or if the number of the target video image frames is greater than or equal to the preset number of frames, determining that the state of the vehicle door is changed.
For detailed descriptions of the working principle, the realized technical effect, and the like of the embodiment of the vehicle door motion detection apparatus, reference may be made to the description of the embodiment of the vehicle door motion detection method, and further description is omitted here.
Referring now to FIG. 3, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: carrying out vehicle door identification on each frame of video image contained in an input video, and determining at least one frame of target video image containing the vehicle door; respectively carrying out vehicle door state identification on the at least one frame of target video image to obtain the vehicle door state in each frame of target video image; and determining the door action according to the door state of the at least one frame of target video image.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: carrying out vehicle door identification on each frame of video image contained in an input video, and determining at least one frame of target video image containing the vehicle door; respectively carrying out vehicle door state identification on the at least one frame of target video image to obtain the vehicle door state in each frame of target video image; and determining the door action according to the door state of the at least one frame of target video image.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.