CN111292354A - False detection suppression method and electronic device - Google Patents

False detection suppression method and electronic device Download PDF

Info

Publication number
CN111292354A
CN111292354A CN202010075685.1A CN202010075685A CN111292354A CN 111292354 A CN111292354 A CN 111292354A CN 202010075685 A CN202010075685 A CN 202010075685A CN 111292354 A CN111292354 A CN 111292354A
Authority
CN
China
Prior art keywords
mvi
target
image
mvot
mvdd
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
CN202010075685.1A
Other languages
Chinese (zh)
Other versions
CN111292354B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010075685.1A priority Critical patent/CN111292354B/en
Publication of CN111292354A publication Critical patent/CN111292354A/en
Application granted granted Critical
Publication of CN111292354B publication Critical patent/CN111292354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20201Motion blur correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Television Systems (AREA)

Abstract

The embodiment of the invention provides a false detection suppression method and electronic equipment, relates to the technical field of communication, and aims to solve the problem that in a scene of multi-frame image synthesis, the synthesized image effect is poor due to the fact that leaves slightly swinging in a highlight area are detected as a motion area in a false mode. The method comprises the following steps: acquiring M motion vector diagrams (MVI) corresponding to a source image and a target image, wherein the source image is one frame of image in K frames of continuous images acquired by electronic equipment, and the target image is any one frame of image except the source image in the K frames of continuous images; determining whether an image area corresponding to the target MVI is a false detection area or not based on the motion vector overflow number MVOT and the motion vector distribution density MVDD of the target MVI; the target MVI is any one of the M MVIs, M and K are positive integers, and K is larger than 1.

Description

False detection suppression method and electronic device
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a false detection suppression method and electronic equipment.
Background
With the wide application of photographing, more and more specialized functions are integrated into electronic devices, such as high-dynamic range (HDR), multi-frame noise reduction, and multi-resolution imaging.
At present, the professional function is mainly to collect multiple frames of images for synthesis. In the process of synthesizing the multi-frame images, because moving objects exist in the multi-frame images, the moving object estimation and motion compensation processing are required during synthesis. When a large number of leaves exist in a shooting scene, the leaves slightly swing and can be mistakenly detected as a motion area, and if the leaves in a highlight area are subjected to motion compensation at present, a phenomenon of burning or blurring can be generated, namely, a large amount of blurring can be generated, so that the final synthesized image is poor in effect.
Disclosure of Invention
The embodiment of the invention provides a false detection suppression method and electronic equipment, which can solve the problem that in a scene of multi-frame image synthesis, the synthesized image effect is poor due to the fact that leaves slightly swinging in a highlight area are detected as a motion area in a false mode.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides a false detection suppression method, where the method includes: acquiring M Motion Vector Images (MVI) corresponding to a source image and a target image, wherein the source image is one frame of image in K frames of continuous images acquired by electronic equipment, and the target image is any frame of image except the source image in the K frames of continuous images; determining whether an image area corresponding to the target MVI is a false detection area or not based on a Motion Vector Over Threshold (MVOT) and a Motion Vector Distribution Density (MVDD) of the target MVI; the target MVI is any one of the M MVIs, M and K are positive integers, and K is larger than 1.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes: the device comprises an acquisition module and a determination module; the acquisition module is used for acquiring M MVIs corresponding to a source image and a target image, wherein the source image is one frame of image in K frames of continuous images acquired by electronic equipment, and the target image is any frame of image except the source image in the K frames of continuous images; the determination module is used for determining whether an image area corresponding to the target MVI is a false detection area or not based on the MVOT and the MVDD of the target MVI; the target MVI is any one of the M MVIs, M and K are positive integers, and K is larger than 1.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the false detection suppression method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the false detection suppression method according to the first aspect.
In the embodiment of the invention, the electronic device can acquire M MVIs corresponding to a source image and a target image, the source image is one frame of image in the K frames of continuous images, the target image is any one frame of image except the source image in the K frames of images, and the electronic device determines whether an image area corresponding to the target MVI is a false detection area of highlight leaves or not according to the overflow number of motion vectors and the distribution density of the motion vectors of the target MVI. That is, in the scene of high dynamic range imaging, multi-frame noise reduction, super-resolution imaging, and the like, during the process of synthesizing the acquired multi-frame images, the electronic device may determine the motion characteristics and distribution density characteristics of the moving object according to the motion vector diagram corresponding to the target image close to the source image after performing motion estimation on the multi-frame images, thereby determining whether the moving object is a slightly jittered object, a slightly jittered leaf, a slightly fluctuated water surface, slightly moved sand, and the like, and if the slightly jittered leaf and the slightly fluctuated water surface are determined, the regions in the image may be determined as misdetected motion regions, so that corresponding image processing may be performed on the misdetected regions, for example, if the moving object obtained by motion estimation is determined to be a slightly jittered leaf, no motion compensation processing may be performed on the slightly jittered leaf in a high light region, therefore, the problem of poor image synthesis effect caused by the fact that highlight leaves are mistakenly detected as moving objects to perform motion compensation can be avoided, the accuracy of motion detection is improved, and image processing is enabled to obtain a better effect.
Drawings
FIG. 1 is a block diagram of a possible operating system according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a false detection suppression method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a correspondence between an MVI size and a threshold according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a pixel point deviation direction according to an embodiment of the present invention;
fig. 5 is a diagram of a motion vector distribution characteristic provided by an embodiment of the present invention;
FIG. 6 is a second schematic flowchart of a false detection suppression method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 8 is a second schematic structural diagram of an electronic device according to an embodiment of the invention;
fig. 9 is a third schematic structural diagram of an electronic apparatus according to an embodiment of the invention;
fig. 10 is a hardware schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that "/" in this context means "or", for example, A/B may mean A or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. "plurality" means two or more than two.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first threshold value and the second threshold value, etc. are used to distinguish different threshold values, rather than to describe a particular order of the threshold values.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The electronic device in the embodiment of the present invention may be an electronic device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
Next, a software environment applied by the false detection suppression method provided by the embodiment of the present invention is described by taking the operating system shown in fig. 1 as an example.
Fig. 1 is a schematic diagram of a possible operating system according to an embodiment of the present invention. In fig. 1, the architecture of the operating system includes 4 layers, respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application layer comprises various application programs (including system application programs and third-party application programs) in an operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes a library (also referred to as a system library) and an operating system runtime environment. The library mainly provides various resources required by the operating system. The operating system runtime environment is used to provide a software environment for the operating system.
The kernel layer is the operating system layer of the operating system and belongs to the lowest layer of the operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the operating system based on the Linux kernel.
Taking the operating system shown in fig. 1 as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the false detection suppression method provided in the embodiment of the present invention based on the system architecture of the operating system shown in fig. 1, so that the false detection suppression method may operate based on the operating system shown in fig. 1. That is, the processor or the electronic device may implement the false detection suppression method provided by the embodiment of the present invention by running the software program in the operating system.
The false detection suppression method provided by the embodiment of the invention can be applied to scenes such as high dynamic range imaging, multi-frame noise reduction, super-resolution imaging and the like, and in the process of synthesizing the collected multi-frame images, if slightly-jittered leaves are detected as moving objects, after motion estimation, if motion compensation is performed on the image area where the leaves in the highlight area are located, the phenomena of 'scorching' and 'blurriness' can be caused in the area where the high-light leaves are located in the finally synthesized image of the multi-frame images, namely, a large piece of blur can be generated in the synthesized image. After the motion estimation is performed on the multiple images, the motion characteristics and the distribution density characteristics of the moving object determined by the motion estimation can be obtained according to the motion vector diagram corresponding to the target image close to the source image, so as to determine whether the moving object is a slightly-jittered leaf, a slightly-fluctuated water surface, slightly-moved sand, and the like, if the moving object is a slightly-jittered leaf or a slightly-fluctuated water surface, the slightly-moved sand can determine the regions in the images as misdetected motion regions, so that corresponding image processing can be performed on the misdetected regions, for example, if the moving object is a slightly-jittered leaf, the slightly-jittered leaf in a high light region can be not subjected to motion compensation processing, thereby avoiding motion compensation due to misdetection of the high-gloss leaf as the moving object, the accuracy of motion detection is improved, and the result of image synthesis effect is poor.
The false detection suppression method according to the embodiment of the present invention will be described below with reference to fig. 2. Fig. 2 is a schematic flow chart of a false detection suppression method according to an embodiment of the present invention, as shown in fig. 2, the false detection suppression method includes the following steps 201 and 202:
step 201, the electronic device acquires M MVIs corresponding to a source image and a target image.
The source image is one frame of image in K frames of continuous images acquired by electronic equipment, the target image is any one frame of image except the source image in the K frames of continuous images, M and K are positive integers, and K is larger than 1.
In the embodiment of the present invention, the source image may also be referred to as a reference image or a reference frame, and may be any one of K consecutive images.
For example, the source image may be a first frame image of K consecutive images, may be a last frame image of the K consecutive images, or may be one frame image between the first frame image and the last frame image. The target image is any other frame image except the source image in the K frames of continuous images.
In the embodiment of the present invention, the electronic device may perform motion detection and motion estimation on the source image and the target image first, and specifically may perform the following operations on the source image and the target image: the M MVIs are obtained by image global alignment, gray value bidirectional mapping, multi-frame gray difference, self-adaptive morphological filtering, motion vector calculation and the like.
For example, in the process of motion vector calculation, a dense optical flow algorithm may be adopted, the similarity degree of patch blocks in the source image and the target image is calculated through the Sum of Absolute Differences (SAD) of the pixel value differences of each pixel, whether the patch blocks are motion regions is determined, and then the offset value and the offset direction of each pixel are determined through minimizing the SAD distance, so as to obtain the MVI corresponding to the similar patch blocks.
In the embodiment of the present invention, the MVI may include a motion direction corresponding to the pixel point and a motion amplitude of the pixel point. That is, each pixel point in the MVI corresponds to and stores a group of motion vectors, where the group of motion vectors includes a horizontal motion vector Δ x and a vertical motion vector Δ y of the pixel point.
Step 202, the electronic device determines whether an image area corresponding to the target MVI is a false detection area based on the MVOT and MVDD of the target MVI.
Wherein, the target MVI is any one of the M MVIs.
It should be noted that the motion vector overflow number and the motion vector distribution density may represent key distribution features of the object micro-motion, and may indicate motion characteristics such as a direction of motion of small amplitude jitter, an amplitude of motion, a proportion in each direction, and the like. For example, key distribution characteristics of micro-motion such as leaf type, quicksand type, water wave type and the like can be characterized, and motion characteristics such as direction of motion of small amplitude jitter, amplitude of motion, proportion in each direction and the like can be indicated.
It should be noted that, in the related art, a gaussian mixture background modeling method may be used to suppress false detection of highlight leaves, a large amount of static pixel point data is needed to model the background in an image, and multiple iterations are needed, and in the process of acquiring an image, an electronic device usually selects 3 to 5 frames of images to perform image synthesis, so that the gaussian mixture background modeling method cannot meet the requirements of a user on the rapidity and the real-time property of the image captured by the electronic device. In the embodiment of the invention, the false detection suppression processing of the highlight tree leaves can be established on the basis of motion detection, a global background does not need to be modeled, and only the motion vector distribution characteristics of the detected interested area (namely MVI) are counted and processed, so that the complexity of an algorithm is reduced and the operation speed of the electronic equipment is greatly improved.
According to the false detection suppression method provided by the embodiment of the invention, the electronic device can obtain M MVIs corresponding to the source image and the target image, the source image is one frame of image in the K frames of continuous images, the target image is any one frame of image except the source image in the K frames of images, and the electronic device determines whether the image area corresponding to the target MVI is the false detection area of highlight leaves or not according to the overflow number of the motion vectors and the distribution density of the motion vectors of the target MVI. That is, in the scene of high dynamic range imaging, multi-frame noise reduction, super-resolution imaging, and the like, during the process of synthesizing the acquired multi-frame images, the electronic device may determine the motion characteristics and distribution density characteristics of the moving object according to the motion vector diagram corresponding to the target image close to the source image after performing motion estimation on the multi-frame images, thereby determining whether the moving object is a slightly jittered object, a slightly jittered leaf, a slightly fluctuated water surface, slightly moved sand, and the like, and if the slightly jittered leaf and the slightly fluctuated water surface are determined, the regions in the image may be determined as misdetected motion regions, so that corresponding image processing may be performed on the misdetected regions, for example, if the moving object obtained by motion estimation is determined to be a slightly jittered leaf, no motion compensation processing may be performed on the slightly jittered leaf in a high light region, therefore, the problem of poor image synthesis effect caused by the fact that highlight leaves are mistakenly detected as moving objects to perform motion compensation can be avoided, the accuracy of motion detection is improved, and image processing is enabled to obtain a better effect.
Optionally, before the step 202, the method for suppressing false detection according to the embodiment of the present invention may further include the following step 203:
step 203, the electronic device calculates the MVOT and MVDD of the target MVI.
Further, the step 202 can be specifically executed by the following steps 202a and 202 b:
step 202a, the electronic device compares the MVOT of the target MVI with the MVOT threshold, and compares the MVDD of the target MVI with the MVDD threshold.
Specifically, the electronic device may compare the MVOT of the target MVI with the MVOT threshold, and compare the MVDD of the target MVI with the MVDD threshold.
Step 202b, the electronic device determines whether the image area corresponding to the target MVI is a false detection area according to the comparison result of the MVOT of the target MVI and the MVOT threshold value and the comparison result of the MVDD of the target MVI and the MVDD threshold value.
It should be noted that the MVOT threshold and the MVDD threshold may be selected according to empirical values.
Optionally, after determining the comparison result, the electronic device may determine which type of object is the object in the image area corresponding to the target MVI, for example, leaves, quicksand, and a water surface, and then determine whether the object is the false detection area.
For example, the electronic device may determine, according to a comparison result between an MVOT of the target MVI and an MVOT threshold, and a comparison result between an MVDD of the target MVI and an MVDD threshold, whether a motion vector in the target MVI is characterized by a minute motion of leaf trembling, and if a matching result is characterized by a minute motion of leaf trembling and leaves of the minute motion are located in the highlight area, the electronic device may determine that an image area corresponding to the MVI is a false detection area of highlight leaves.
In the embodiment of the present invention, the highlight region may refer to a region in the image where the exposure amount exceeds a threshold value. Highlight foliage may represent foliage located in highlight regions in an image.
It should be noted that, in the embodiment of the present invention, if the highlight tree leaf is false detected, the electronic device may determine, after determining the M MVIs corresponding to the source image and the target image, whether an image region corresponding to the target MVI is a highlight region, and if it is determined that the image region corresponding to the target MVI is the highlight region, continue to execute step 202. Of course, the electronic device may also determine whether the target MVI is in the highlight region after step 202 a.
Based on the scheme, the electronic device may first calculate the MVOT of the target MVI and the MVDD of the target MVI, then compare the MVOT of the target MVI with the MVDD threshold, and compare the MVDD of the target MVI with the MVDD threshold, and finally determine whether the image area corresponding to the target MVI is the false detection area according to a comparison result of the MVOT of the target MVI with the MVDD threshold and a comparison result of the MVDD of the target MVI with the MVDD threshold. By combining the threshold, the electronic device can accurately determine whether the image area corresponding to the target MVI is the false detection area, and the accuracy of false detection suppression can be improved.
It can be understood that after the motion estimation, since the size of the patch block corresponding to each estimated moving object is different, the size of the corresponding MVI is also different, and accordingly, the specific values of the MVOT threshold and the MVDD threshold are different for different MVI sizes. Therefore, after the target MVI is determined, the values of the threshold values corresponding to the MVOT and the MVDD respectively need to be adjusted. Optionally, the method for suppressing false detection according to the embodiment of the present invention may further include, after step 201, the following step 204:
and step 204, the electronic equipment adjusts at least one of the MVOT threshold value and the MVDD threshold value according to the size of the target MVI.
It should be noted that, in the embodiment of the present invention, the MVOT threshold and the MVDD threshold (MDVV threshold and MDVSD threshold) are related to the size of the MVI. As the MVI size changes, the threshold value range may include a linearly changing region and a non-linearly changing region. Therefore, in the area where the size of the MVI varies nonlinearly with respect to the threshold, the corresponding threshold may be adjusted according to the size of the target MVI.
It can be appreciated that if the size of the target MVI corresponds to within the linear variation interval of the MVOT threshold, the electronic device does not need to adjust the MVOT threshold. The electronic device may select or calculate an MVOT threshold corresponding to the target MVI size according to a linear correspondence between the target MVI size and the MVOT threshold. And if the size of the target MVI corresponds to the MVOT threshold nonlinear change area, adjusting the MVOT threshold according to the size of the target MVI.
Similarly, if the size of the target MVI corresponds to the linear change interval of the MVDD threshold, the electronic device does not need to adjust the MVDD threshold. The electronic device may select or calculate an MVOT threshold corresponding to the target MVI size according to the linear correspondence between the target MVI size and the MVDD threshold. And if the size of the target MVI corresponds to the nonlinear change area of the MVDD threshold, adjusting the MVDD threshold according to the size of the target MVI.
Based on the scheme, the electronic device can adjust the size of the corresponding MVOT threshold value and the size of the MVDD threshold value according to the size of the target MVI, so that the matching result is more accurate.
Optionally, in the embodiment of the present invention, when the size of the target MVI is greater than the first preset size and smaller than the second preset size, the MVOT threshold is increased along with an increase in the size of the target MVI. The MVOT threshold is a first threshold in a case where the size of the target MVI is less than or equal to a first preset size. And in the case that the size of the target MVI is larger than or equal to a second preset size, the MVOT threshold value is a second threshold value.
Optionally, in this embodiment of the present invention, when the size of the target MVI is greater than the third preset size and smaller than the fourth preset size, the MVDD threshold is increased along with the increase of the size of the target MVI. And under the condition that the size of the target MVI is smaller than or equal to a third preset size, the MVDD threshold value is a third threshold value. And under the condition that the size of the target MVI is larger than or equal to a fourth preset size, the MVDD threshold value is a fourth threshold value.
For example, fig. 3 is a schematic diagram of a correspondence relationship between an MVI size and a threshold, as shown in fig. 3, for the correspondence relationship between the MVOT threshold and the MVI size, a first preset size is size 1, a second preset size is size 3, the first threshold is a minimum value of T _ MVOT, and the second threshold is a maximum value of T _ MVOT. If the size of the MVI is less than or equal to size 1, the MVI threshold is adjusted to the minimum value of T _ MVOT, and if the size of the MVI is greater than size 3, the MVI threshold is adjusted to the maximum value of T _ MVOT. For the corresponding relationship between the MVDD threshold and the MVI size, the first preset size is size 2, the second preset size is size 4, the first threshold is the minimum value of T _ MVDD, and the second threshold is the maximum value of T _ MVDD. If the size of the MVI is smaller than or equal to the size 2, the MVDD threshold value is adjusted to be the minimum value of the T _ MVDD, and if the size of the MVI is larger than the size 4, the MVDD threshold value is adjusted to be the maximum value of the T _ MVDD.
Based on the scheme, the electronic device can store the mapping relationship between the size of the MVI and the MVOT threshold value and the mapping relationship between the size of the MVI and the MVDD threshold value, and when the method in the embodiment of the invention is executed, the threshold values corresponding to different sizes of the MVI can be rapidly determined according to the mapping relationship, so that whether the image area corresponding to the target MVI is the false detection area or not can be accurately determined according to the proper threshold value.
It is understood that if the electronic device adjusts at least one of the threshold of MVDD and the threshold of MVOT, the electronic device needs to compare with the adjusted threshold. Furthermore, the step 202a may be performed by one of the steps 202a1 to 202a 3:
step 202a1, in the case of adjusting the MVOT threshold, the electronic device compares the MVOT of the target MVI with the adjusted MVOT threshold, and compares the MVDD of the target MVI with the MVDD threshold.
Step 202a2, in the case of adjusting the MVDD threshold, the electronic device compares the MVOT of the target MVI with the MVOT threshold, and compares the MVDD of the target MVI with the adjusted MVDD threshold.
Step 202a3, in the case of adjusting the MVOT threshold and the MVDD threshold, the electronic device compares the MVOT of the target MVI with the adjusted MVOT threshold, and compares the MVDD of the target MVI with the adjusted MVDD threshold.
Based on the scheme, the electronic equipment can compare the adjusted threshold value after adjusting the threshold value, so that the determined result is more accurate, and the accuracy of the electronic equipment in inhibiting the false detection can be improved.
Optionally, in the false detection suppression method provided in the embodiment of the present invention, in step 203, the calculating the MVOT of the target MVI may be performed by the following steps 203a and 203 b:
step 203a, the electronic device calculates a Motion Vector Offset (MVO) of each pixel point corresponding to the target MVI according to the first target preset formula.
The first target preset formula is any one of a first preset formula, a second preset formula and a third preset formula. The first preset formula is the following formula (1), the second preset formula is the following formula (2), and the third preset formula is the following formula (3).
Figure BDA0002378438680000061
MVOij=|Δxij|+|ΔyijEquation (2)
MVOij=MAX(|Δxij|,|ΔyijEquation (3)
Wherein, MVOijThe MVO value, delta x, of the pixel point at the ith column and the jth line in the MVI is representedijRepresents the transverse motion vector, deltay, of the pixel point at the ith column and the jth lineijDenotes the ith column and jth rowAnd (4) processing the longitudinal motion vector of the pixel point.
It should be noted that, the above equations (1) to (2) to (3) gradually decrease the accuracy and increase the operation speed, and one equation selected from the above equations (1), (2) and (3) may be used to calculate the MVO according to at least one of the accuracy requirement and the performance supported by the electronic device.
And 203b, the electronic equipment determines the MVOT of the target MVI according to the MVO and the MVO threshold value of each pixel point corresponding to the target MVI.
Specifically, after the target MVI is obtained, the electronic device may count the number of pixel points in the target MVI, where the MVO is smaller than the MVO threshold.
Fig. 5 is a distribution characteristic diagram of motion vectors according to an embodiment of the present invention. As shown in fig. 5, the radius of the circle is the MVO threshold, and each dot represents a group of motion vectors, as shown in (a) in fig. 5, the dots are substantially distributed within the circle, and the distribution density in four directions (i.e., four quadrants) is relatively similar, i.e., the distribution of the motion vectors is relatively uniform, and the magnitude of the motion vectors is relatively small, which can represent the distribution characteristics of small magnitude and irregular and non-dominant direction, for example, can represent the irregular shaking of leaves. As shown in fig. 5 (b), the dots are substantially distributed in quadrant 1, that is, the distribution density in a certain direction is concentrated, most of the dots are distributed outside the circle, the magnitude of the motion vector is large, and the distribution characteristic of the large magnitude and the main direction of the motion direction can be represented.
Based on the scheme, the electronic device can select one formula from the formula (1), the formula (2) and the formula (3) to calculate the MVO in the MVI, and then determine the MVOT of the target MVI according to the MVO corresponding to each pixel point in the MVI and the MVO threshold value, so that the offset characteristic of the moving object can be determined, and whether the object in the image area corresponding to the target MVI is the misdetected moving object can be accurately determined.
Alternatively, the motion vector distribution density may be: motion vector distribution variance (MDVV), or motion vector distribution standard deviation (MDVSD).
It should be noted that, if the MDVV is selected to represent the distribution density of the motion vectors, the computation complexity is lower than that of the MDVSD, the computation can be faster, and the distribution density of the motion vectors can be approximately represented, that is, the accuracy is lower. If the MDVSD is selected to represent the distribution density of the motion vectors, the calculation complexity is higher relative to the MDVV, the calculation speed is slower relative to the MDVV, and the distribution density of the motion vectors can be more accurately represented. The corresponding parameters characterizing the distribution density of the motion vectors can be selected as desired.
Furthermore, in the false detection suppression method provided in the embodiment of the present invention, the calculating the MVDD of the target MVI in step 203 may be performed in step 203c or step 203d as follows:
and 203c, the electronic device calculates the MDVV of the target MVI according to a fourth preset formula.
The fourth preset formula is the following formula (4).
Figure BDA0002378438680000071
Where N denotes N offset directions, MDRepresenting the number of pixels shifted towards D in N shift directions, MwidthDenotes the width of MVI, MlengthThe length of the MVI is shown as,
Figure BDA0002378438680000072
it should be noted that N directions may be divided, and then the number M of pixel points in each direction may be counted1To MNThe normalization of MDVV may be achieved by calculating the number of directions, the size of the MVI (e.g., the length of the MVI multiplied by the width of the MVI) at the denominator of equation (4).
It should be noted that, in the embodiment of the present invention, the number of shifted pixel points in each direction may be determined through MVI, and a specific value of the number N of directions may be selected according to the requirement of precision and the performance of the device, for example, 4 directions, 8 directions, 16 directions, and the like may be selected.
In an embodiment of the present invention, each of the N offset directions may correspond to an area, for example, the directions may correspond to quadrants in a coordinate system.
Fig. 4 is a schematic diagram of a pixel shift direction according to an embodiment of the present invention, where the shift direction schematic diagram shown in (a) in fig. 4 can represent shifts in four directions, and the shift direction schematic diagram shown in (b) in fig. 4 can represent shifts in eight directions, where in (a) in fig. 4, the number M of pixels shifted to the 1 st quadrant in MVI can be counted1Number M of pixels shifted into quadrant 22Number M of pixels shifted into quadrant 33Number M of pixels shifted into quadrant 44. In (b) of fig. 4, the number M of pixel points shifted to quadrant 1 in MVI may be counted1Number M of pixels shifted into quadrant 22Number M of pixels shifted into quadrant 33Number M of pixels shifted into quadrant 44Number M of pixels shifted to quadrant 55Number M of pixels shifted to quadrant 66Number M of pixels shifted to quadrant 77Number M of pixels shifted to quadrant 88
It should be noted that, in fig. 4, the description is given by taking an example that the angle value of each corresponding quadrant in the coordinate system is equal, and certainly, there may be two quadrants with different angle values in the adopted coordinate system, which is not specifically limited in this embodiment of the present invention.
And step 203d, the electronic device calculates the first MDVSD according to a fifth preset formula.
Wherein the fifth predetermined formula is the following formula (5):
Figure BDA0002378438680000081
for example, in the case where N is 4, in combination with (a) in fig. 4, the formula (4) may be specifically the following formula (4-1), and the formula (5) may be specifically the following formula (5-1).
Figure BDA0002378438680000082
Figure BDA0002378438680000083
Wherein the content of the first and second substances,
Figure BDA0002378438680000084
for example, in the case where N is 8, in conjunction with (b) in fig. 4, the formula (4) may be specifically the following formula (4-2), and the formula (5) may be specifically the following formula (5-2).
Figure BDA0002378438680000085
Figure BDA0002378438680000086
Wherein the content of the first and second substances,
Figure BDA0002378438680000091
based on the scheme, the electronic device can use the MDVV determined by the formula (4) or the MDVSD determined by the formula (5) as a parameter for representing the distribution density of the motion vectors, different calculation modes can be selected according to different requirements, and different numbers of offset directions can be selected according to different calculation accuracies, so that the mode for determining the distribution density of the motion vectors is more flexible.
Alternatively, in the false detection suppression method according to the embodiment of the present invention, when N is 4, the above equation (4) may be equation (4-3) below, and the above equation (5) may be equation (5-3) below.
Figure BDA0002378438680000092
Figure BDA0002378438680000093
Wherein M isupM representing the amount of deviation of the pixel points to the first directiondownM, representing the amount of the pixel point to be deviated to the second directionleftM representing the amount of the deviation of the pixel points to the third directionrightIndicating the amount of the shift of the pixel point to the fourth direction,
Figure BDA0002378438680000094
in the embodiment of the present invention, a target coordinate system may be used to divide the offset direction, an x axis and a y axis in the target coordinate system intersect, and an included angle between the x axis and the y axis may be a right angle or may not be a right angle. In the case where the angle between the x-axis and the y-axis is a right angle, the target coordinate system may be a rectangular coordinate system. When the x axis of the target coordinate system is a coordinate axis in the horizontal direction, the y axis in the target coordinate system may be a coordinate axis in the vertical direction or a coordinate axis in a non-vertical direction; when the y-axis is a coordinate axis in the vertical direction, the x-axis may be a coordinate axis in the horizontal direction or a coordinate axis in a direction other than the horizontal direction. Of course, when the x-axis is a coordinate axis in a non-horizontal direction, the y-axis may be a coordinate axis in a non-vertical direction.
For example, if the x-axis is a coordinate axis in the horizontal direction in the target coordinate system, the y-axis is a coordinate axis in the vertical direction in the target coordinate system, and the x-axis is perpendicular to the y-axis, the MVI may be divided into an up-shift (i.e., the first direction is toward the upper side of the x-axis), a down-shift (i.e., the second direction is toward the lower side of the x-axis), a left-shift (i.e., the third direction is toward the left side of the y-axis), a right-shift (i.e., the fourth direction is toward the right side of the y-axis), and with reference to (a) in fig. 4, the middle pixel points in the 1 st quadrant and the 2 nd quadrant belong to the up-shift, the 3 rd and the 4 th quadrant belong to the down-shift, the 2 nd and the 3 rd belong toupRepresenting the number of upward shifts of a pixel, MdownRepresenting the number of downward shifts of a pixel, MleftRepresenting the number of leftwards shifted pixel points, MrightIndicating the amount of pixel shift to the right.
Specifically, the formula (4) may be the following formula (4-4), and the formula (4) may be the following formula (5-4).
Figure BDA0002378438680000095
Figure BDA0002378438680000096
Wherein the content of the first and second substances,
Figure BDA0002378438680000097
based on the scheme, in the case that N is 4, the electronic device can also use the MDVSD determined according to the above formula (4-3) or formula (5-3) as a parameter for representing the distribution density of the motion vector, so that the electronic device determines the distribution density of the motion vector more variously.
Optionally, in the false detection suppressing method provided in the embodiment of the present invention, the step 202b may be specifically executed by the following step 202b 1:
step 202b1, the electronic device compares the MVOT of the target MVI with the MVOT threshold value, and compares the MVDD of the target MVI with the MVDD threshold value according to a sixth preset formula.
Wherein, the sixth preset formula is the following formula (6):
Figure BDA0002378438680000101
wherein, T _ MVOT represents MVOT threshold, and T _ MVDD represents MVDD threshold; when Mis is equal to 0, the image block corresponding to the target MVI is a false detection area; in the case where Mis is equal to 1, the image block corresponding to the target MVI is a motion area.
For example, in the case that Mis is equal to 0, the image block corresponding to the target MVI is a highlight leaf false detection area; in the case where Mis is equal to 1, the image block corresponding to the target MVI is a motion area.
Note that, if the MVOT threshold is the adjusted threshold, T _ MVOT represents the adjusted MVOT threshold, and if the MVOT threshold is the adjusted threshold, T _ MVOT represents the adjusted MVOT threshold.
Fig. 6 is a schematic flow chart of a method for suppressing false detection according to an embodiment of the present invention. The electronic equipment inputs an image into a motion detection module to obtain a first processing result, the first processing result is input into a motion estimation module after processing to obtain MVI, the MVI is input into an adaptive threshold value constraint module, an MVOT threshold value and an MVDD threshold value are adjusted, the MVI is input into a motion vector calculation module, the MVOT and the MDVV are calculated, the adjusted MVOT threshold value and the adjusted MDVV threshold value are input into a matching module to be compared, whether a motion area corresponding to the MVI is a highlight leaf misdetection area or not is determined, a matching result is input into a motion compensation module, if the motion area corresponding to the MVI is determined to be the highlight leaf misdetection area according to the comparison result, motion compensation is not needed, and if the motion area corresponding to the MVI is determined to be a real motion area according to the comparison result, the motion compensation is performed.
Based on the scheme, the electronic device can determine whether the motion area corresponding to the target MVI is a highlight leaf false detection area or a real motion area according to the comparison result of the MVOT and the MVOT threshold value, the comparison result of the MVDD and the MVDD threshold value corresponding to the target MVI and the formula (6), so that the false detection inhibition is more accurate.
Fig. 7 is a schematic diagram of a possible structure of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, an electronic device 700 includes: an acquisition module 701 and a determination module 702; an obtaining module 701, configured to obtain M MVIs corresponding to a source image and a target image, where the source image is one frame of image in K continuous frames of images acquired by an electronic device, and the target image is any frame of image except the source image in the K continuous frames of images, and a determining module 702, configured to determine whether an image area corresponding to the target MVI is a false detection area based on MVOT and MVDD of the target MVI; the target MVI is any one of the M MVIs, M and K are positive integers, and K is larger than 1.
The embodiment of the invention provides electronic equipment, which can acquire M MVIs corresponding to a source image and a target image, wherein the source image is one frame of image in a K frame of continuous images, the target image is any one frame of image except the source image in the K frame of image, and the electronic equipment determines whether an image area corresponding to the target MVI is a false detection area of highlight leaves or not according to the overflow number of motion vectors and the distribution density of the motion vectors of the target MVI. That is, in the scene of high dynamic range imaging, multi-frame noise reduction, super-resolution imaging, and the like, during the process of synthesizing the acquired multi-frame images, the electronic device may determine the motion characteristics and distribution density characteristics of the moving object according to the motion vector diagram corresponding to the target image close to the source image after performing motion estimation on the multi-frame images, thereby determining whether the moving object is a slightly jittered object, a slightly jittered leaf, a slightly fluctuated water surface, slightly moved sand, and the like, and if the slightly jittered leaf and the slightly fluctuated water surface are determined, the regions in the image may be determined as misdetected motion regions, so that corresponding image processing may be performed on the misdetected regions, for example, if the moving object obtained by motion estimation is determined to be a slightly jittered leaf, no motion compensation processing may be performed on the slightly jittered leaf in a high light region, therefore, the problem of poor image synthesis effect caused by the fact that highlight leaves are mistakenly detected as moving objects to perform motion compensation can be avoided, the accuracy of motion detection is improved, and image processing is enabled to obtain a better effect.
Optionally, with reference to fig. 7, as shown in fig. 8, the electronic device 700 further includes: a calculation module 703; a calculating module 703, configured to calculate an MVOT and an MVDD of the target MVI; a determining module 702, configured to compare an MVOT threshold of the target MVI and compare an MVDD threshold of the target MVI with an MVDD threshold; and determining whether the image area corresponding to the target MVI is a false detection area or not according to the comparison result of the MVOT and the MVOT threshold value of the target MVI and the comparison result of the MVDD and the MVDD threshold value of the target MVI.
The embodiment of the invention provides electronic equipment, which can calculate MVOT of a target MVI and MVDD of the target MVI, then compare MVOT and MVOT thresholds of the target MVI, compare MVDD and MVDD thresholds of the target MVI, and finally determine whether an image area corresponding to the target MVI is a false detection area or not according to a comparison result of MVOT and MVOT thresholds of the target MVI and a comparison result of MVDD and MVDD thresholds of the target MVI. By combining the threshold, the electronic device can accurately determine whether the image area corresponding to the target MVI is the false detection area, and the accuracy of false detection suppression can be improved.
Optionally, with reference to fig. 8, as shown in fig. 9, the electronic device 700 further includes: an adjustment module 704; an adjusting module 704, configured to, after the obtaining module 701 obtains M MVIs corresponding to the source image and the target image, adjust at least one of an MVOT threshold and an MVDD threshold according to a size of the target MVI.
The embodiment of the invention provides electronic equipment, which can adjust the size of a corresponding MVOT threshold value and the size of a corresponding MVDD threshold value according to the size of a target MVI, so that a matching result is more accurate.
Optionally, in a case that the size of the target MVI is larger than a first preset size and smaller than a second preset size, the MVOT threshold increases with an increase in the size of the target MVI; under the condition that the size of the target MVI is smaller than or equal to a first preset size, the MVOT threshold value is a first threshold value; under the condition that the size of the target MVI is larger than or equal to a second preset size, the MVOT threshold value is a second threshold value; under the condition that the size of the target MVI is larger than a third preset size and smaller than a fourth preset size, the MVDD threshold value is increased along with the increase of the size of the target MVI; under the condition that the size of the target MVI is smaller than or equal to a third preset size, the MVDD threshold value is a third threshold value; and under the condition that the size of the target MVI is larger than or equal to a fourth preset size, the MVDD threshold value is a fourth threshold value.
The embodiment of the invention provides electronic equipment, wherein the mapping relation between the size of an MVI and an MVOT threshold value and the mapping relation between the size of the MVI and an MVDD threshold value can be stored in the electronic equipment.
Optionally, the calculating module 703 is specifically configured to: according to the first targetThe method comprises the steps of presetting a formula, calculating MVO of each pixel point corresponding to a target MVI, wherein the first target preset formula is any one of a first preset formula, a second preset formula and a third preset formula; determining MVOT of the target MVI according to MVO and MVO threshold values of each pixel point corresponding to the target MVI; the first predetermined formula is:
Figure BDA0002378438680000111
the second predetermined formula is: MVOij=|Δxij|+|ΔyijL, |; the third preset formula is: MVOij=MAX(|Δxij|,|ΔyijI)); wherein, MVOijThe MVO value, delta x, of the pixel point at the ith column and the jth line in the MVI is representedijRepresents the transverse motion vector, deltay, of the pixel point at the ith column and the jth lineijAnd the vertical motion vector of the pixel point at the ith column and the jth line is represented.
According to the electronic device provided by the embodiment of the invention, the electronic device can select one formula from a first preset formula, a second preset formula and a third preset formula to calculate the MVO in the MVI, and then determine the MVOT of the target MVI according to the MVO corresponding to each pixel point in the MVI and the MVO threshold value, so that the offset characteristic of the moving object can be determined, and whether the object in the image area corresponding to the target MVI is the misdetected moving object can be accurately determined.
Optionally, the MVDD is MDVV or MDVSD; the calculation module 703 is specifically configured to: according to a fourth preset formula, calculating the MDVV of the target MVI, wherein the fourth preset formula is as follows:
Figure BDA0002378438680000121
or, according to a fifth preset formula, calculating the MDVSD of the target MVI, where the fifth preset formula is:
Figure BDA0002378438680000122
where N denotes N offset directions, MDRepresenting the number of pixels, M, that are shifted in the D direction in the N shift directionswidthDenotes the width of MVI, MlengthThe length of the MVI is shown as,
Figure BDA0002378438680000123
according to the electronic device provided by the embodiment of the invention, the MDVV determined based on the fourth preset formula or the MDVSD determined based on the fifth preset formula can be used as a parameter for representing the distribution density of the motion vector, different calculation modes can be selected according to different requirements, and different amounts of offset directions can be selected according to different calculation accuracies, so that the mode for determining the distribution density of the motion vector is more flexible.
Optionally, the determining module 702 is specifically configured to: according to a sixth preset formula, comparing the MVOT and the MVOT threshold value of the target MVI, and comparing the MVDD and the MVDD threshold value of the target MVI, wherein the sixth preset formula is as follows:
Figure BDA0002378438680000124
wherein, T _ MVOT represents MVOT threshold, and T _ MVDD represents MVDD threshold; when Mis is equal to 0, the image block corresponding to the target MVI is a false detection area; in the case where Mis is equal to 1, the image block corresponding to the target MVI is a motion area.
Alternatively, in the case where N ═ 4,
Figure BDA0002378438680000125
Figure BDA0002378438680000126
wherein M isupM representing the amount of deviation of the pixel points to the first directiondownM, representing the amount of the pixel point to be deviated to the second directionleftM representing the amount of the deviation of the pixel points to the third directionrightIndicating the amount of the shift of the pixel point to the fourth direction,
Figure BDA0002378438680000127
according to the electronic device provided by the embodiment of the invention, the electronic device can determine whether the motion area corresponding to the target MVI is a highlight leaf false detection area or a real motion area according to the comparison result of the MVOT and the MVOT threshold value, the comparison result of the MVDD and the MVDD threshold value and the sixth preset formula, so that the false detection inhibition is more accurate.
The electronic device 700 provided in the embodiment of the present invention can implement each process implemented by the electronic device in the above method embodiments, and is not described here again to avoid repetition.
Fig. 10 is a hardware schematic diagram of an electronic device 100 according to an embodiment of the present invention, where the electronic device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 10 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, a pedometer, and the like.
The processor 110 is configured to obtain M MVIs corresponding to a source image and a target image, where the source image is one frame of image in K frames of continuous images acquired by an electronic device, and the target image is any frame of image except the source image in the K frames of continuous images; determining whether an image area corresponding to the target MVI is a false detection area or not based on the MVOT and the MVDD of the target MVI; the target MVI is any one of the M MVIs, M and K are positive integers, and K is larger than 1.
According to the electronic device provided by the embodiment of the invention, the electronic device can acquire M MVIs corresponding to a source image and a target image, the source image is one frame of image in the K frames of continuous images, the target image is any one frame of image except the source image in the K frames of images, and the electronic device determines whether an image area corresponding to the target MVI is a false detection area of highlight leaves or not according to the overflow number of motion vectors and the distribution density of the motion vectors of the target MVI. That is, in the scene of high dynamic range imaging, multi-frame noise reduction, super-resolution imaging, and the like, during the process of synthesizing the acquired multi-frame images, the electronic device may determine the motion characteristics and distribution density characteristics of the moving object according to the motion vector diagram corresponding to the target image close to the source image after performing motion estimation on the multi-frame images, thereby determining whether the moving object is a slightly jittered object, a slightly jittered leaf, a slightly fluctuated water surface, slightly moved sand, and the like, and if the slightly jittered leaf and the slightly fluctuated water surface are determined, the regions in the image may be determined as misdetected motion regions, so that corresponding image processing may be performed on the misdetected regions, for example, if the moving object obtained by motion estimation is determined to be a slightly jittered leaf, no motion compensation processing may be performed on the slightly jittered leaf in a high light region, therefore, the problem of poor image synthesis effect caused by the fact that highlight leaves are mistakenly detected as moving objects to perform motion compensation can be avoided, the accuracy of motion detection is improved, and image processing is enabled to obtain a better effect.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 102, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the electronic apparatus 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The electronic device 100 also includes at least one sensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the electronic device 100 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 10, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the electronic apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 100 or may be used to transmit data between the electronic apparatus 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the electronic device. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The electronic device 100 may further include a power source 111 (such as a battery) for supplying power to each component, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 100 includes some functional modules that are not shown, and are not described in detail herein.
Optionally, an electronic device is further provided in an embodiment of the present invention, and with reference to fig. 10, the electronic device includes a processor 110, a memory 109, and a computer program that is stored in the memory 109 and is executable on the processor 110, and when the computer program is executed by the processor 110, the electronic device implements each process of the foregoing false detection suppression method embodiment, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the foregoing false detection suppression method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A false detection suppression method applied to an electronic device, the method comprising:
acquiring M motion vector graphics (MVI) corresponding to a source image and a target image, wherein the source image is one frame of image in K frames of continuous images acquired by the electronic equipment, and the target image is any one frame of image except the source image in the K frames of continuous images;
determining whether an image area corresponding to a target MVI is a false detection area or not based on a motion vector overflow number MVOT and a motion vector distribution density MVDD of the target MVI;
the target MVI is any one of the M MVIs, M and K are positive integers, and K is larger than 1.
2. The method according to claim 1, wherein before determining whether the image region corresponding to the target MVI is a false detection region based on the MVOT and MVDD of the target MVI, the method further comprises:
calculating MVOT and MVDD of the target MVI;
the determining whether an image area corresponding to the target MVI is a false detection area based on the motion vector overflow number MVOT and the motion vector distribution density MVDD of the target MVI includes:
comparing the MVOT and the MVOT threshold value of the target MVI, and comparing the MVDD and the MVDD threshold value of the target MVI;
and determining whether the image area corresponding to the target MVI is a false detection area or not according to the comparison result of the MVOT of the target MVI and the MVOT threshold value and the comparison result of the MVDD of the target MVI and the MVDD threshold value.
3. The method of claim 2, wherein after obtaining the M MVIs corresponding to the source image and the target image, the method further comprises:
and adjusting at least one of the MVOT threshold value and the MVDD threshold value according to the size of the target MVI.
4. The method of claim 3,
in the case that the size of the target MVI is larger than a first preset size and smaller than a second preset size, the MVOT threshold increases with the increase in the size of the target MVI; the MVOT threshold is a first threshold when the size of the target MVI is smaller than or equal to the first preset size; when the size of the target MVI is larger than or equal to the second preset size, the MVOT threshold value is a second threshold value;
in the case that the size of the target MVI is larger than a third preset size and smaller than a fourth preset size, the MVDD threshold value increases with the increase of the size of the target MVI; when the size of the target MVI is smaller than or equal to the third preset size, the MVDD threshold is a third threshold; and when the size of the target MVI is larger than or equal to the fourth preset size, the MVDD threshold value is a fourth threshold value.
5. The method of claim 2, wherein said calculating the MVOT of the target MVI comprises:
calculating the motion vector offset MVO of each pixel point corresponding to the target MVI according to a first target preset formula, wherein the first target preset formula comprises any one of a first preset formula, a second preset formula and a third preset formula;
determining MVOT of the target MVI according to MVO and MVO threshold of each pixel point corresponding to the target MVI;
the first preset formula is as follows:
Figure FDA0002378438670000011
the second preset formula is as follows: MVOij=|Δxij|+|Δyij|;
The third preset formula is as follows: MVOij=MAX(|Δxij|,|Δyij|);
Wherein, MVOijThe MVO value, delta x, of the pixel point at the ith column and the jth line in the MVI is representedijRepresents the transverse motion vector, deltay, of the pixel point at the ith column and the jth lineijAnd the vertical motion vector of the pixel point at the ith column and the jth line is represented.
6. The method of claim 2, wherein MVDD is a motion vector orientation variance MDVV or a motion vector orientation standard deviation MDVSD;
the calculating of the MVDD of the target MVI comprises:
calculating the MDVV of the target MVI according to a fourth preset formula, wherein the fourth preset formula is as follows:
Figure FDA0002378438670000021
or, according to a fifth preset formula, calculating the MDVSD of the target MVI, where the fifth preset formula is:
Figure FDA0002378438670000022
where N denotes N offset directions, MDRepresenting the number of pixels shifted towards D-shift direction among N shift directions, MwidthDenotes the width of MVI, MlengthThe length of the MVI is shown as,
Figure FDA0002378438670000023
7. the method of claim 2, wherein comparing the MVOT and MVOT thresholds of the target MVI and comparing the MVDD and MVDD thresholds of the target MVI comprises:
according to a sixth preset formula, comparing the MVOT of the target MVI with the MVOT threshold, and comparing the MVDD of the target MVI with the MVDD threshold, where the sixth preset formula is:
Figure FDA0002378438670000024
wherein T _ MVOT represents the MVOT threshold value and T _ MVDD represents the MVDD threshold value; when Mis is equal to 0, the image block corresponding to the target MVI is a false detection area; in the case that Mis is equal to 1, the image block corresponding to the target MVI is a motion area.
8. The method of claim 6, wherein, in the case of N-4,
Figure FDA0002378438670000025
Figure FDA0002378438670000026
wherein M isupM representing the amount of deviation of the pixel points to the first directiondownM, representing the amount of the pixel point to be deviated to the second directionleftM representing the amount of the deviation of the pixel points to the third directionrightIndicating the amount of the shift of the pixel point to the fourth direction,
Figure FDA0002378438670000027
9. an electronic device, characterized in that the electronic device comprises: the device comprises an acquisition module and a determination module;
the acquisition module is used for acquiring M motion vector diagrams (MVI) corresponding to a source image and a target image, wherein the source image is one frame of image in K frames of continuous images acquired by the electronic equipment, and the target image is any frame of image except the source image in the K frames of continuous images;
the determining module is configured to determine whether an image area corresponding to a target MVI is a false detection area based on a motion vector overflow number MVOT and a motion vector distribution density MVDD of the target MVI;
the target MVI is any one of the M MVIs, M and K are positive integers, and K is larger than 1.
10. An electronic device, characterized in that the electronic device comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the false detection suppression method according to any one of claims 1 to 8.
CN202010075685.1A 2020-01-22 2020-01-22 False detection suppression method and electronic equipment Active CN111292354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010075685.1A CN111292354B (en) 2020-01-22 2020-01-22 False detection suppression method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010075685.1A CN111292354B (en) 2020-01-22 2020-01-22 False detection suppression method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111292354A true CN111292354A (en) 2020-06-16
CN111292354B CN111292354B (en) 2023-07-28

Family

ID=71029220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010075685.1A Active CN111292354B (en) 2020-01-22 2020-01-22 False detection suppression method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111292354B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01219509A (en) * 1988-02-26 1989-09-01 Matsushita Electric Ind Co Ltd Motion vector detecting device
JPH05236455A (en) * 1992-02-25 1993-09-10 Nec Corp Motion vector detector for moving image
JPH11113003A (en) * 1997-08-07 1999-04-23 Matsushita Electric Ind Co Ltd Motion vector detector and motion vector detection method
JP2000059796A (en) * 1998-06-03 2000-02-25 Matsushita Electric Ind Co Ltd Motion detecting device, motion detecting method and recording medium with motion detection program recorded therein
CN101102504A (en) * 2007-07-24 2008-01-09 中兴通讯股份有限公司 A mixing motion detection method combining with video encoder
WO2008023466A1 (en) * 2006-08-24 2008-02-28 Mitsubishi Electric Corporation Moving vector detecting bdevice
JP2009147807A (en) * 2007-12-17 2009-07-02 Fujifilm Corp Image processing apparatus
US20110044502A1 (en) * 2009-04-28 2011-02-24 Hisense State Key Laboratory Of Digital Multi-Media Technology Co., Ltd. Motion detection method, apparatus and system
JP2012034225A (en) * 2010-07-30 2012-02-16 Canon Inc Motion vector detection device, motion vector detection method and computer program
JP2012073971A (en) * 2010-09-30 2012-04-12 Fujifilm Corp Moving image object detection device, method and program
JP2013239011A (en) * 2012-05-15 2013-11-28 Nippon Telegr & Teleph Corp <Ntt> Motion vector on moving object detection device, motion vector on moving object detection method and program
US20140072241A1 (en) * 2012-09-12 2014-03-13 Canon Kabushiki Kaisha Image processing apparatus and image processing method
CN103679749A (en) * 2013-11-22 2014-03-26 北京奇虎科技有限公司 Moving target tracking based image processing method and device
US20150139504A1 (en) * 2013-11-19 2015-05-21 Renesas Electronics Corporation Detecting apparatus, detecting system, and detecting method
JP2017138379A (en) * 2016-02-02 2017-08-10 キヤノン株式会社 Image shake correction device and method for controlling the same, imaging device, program, and storage medium
CN107437257A (en) * 2017-08-08 2017-12-05 重庆信络威科技有限公司 Moving object segmentation and dividing method under a kind of mobile background
CN108596109A (en) * 2018-04-26 2018-09-28 济南浪潮高新科技投资发展有限公司 A kind of object detection method and device based on neural network and motion vector

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01219509A (en) * 1988-02-26 1989-09-01 Matsushita Electric Ind Co Ltd Motion vector detecting device
JPH05236455A (en) * 1992-02-25 1993-09-10 Nec Corp Motion vector detector for moving image
JPH11113003A (en) * 1997-08-07 1999-04-23 Matsushita Electric Ind Co Ltd Motion vector detector and motion vector detection method
JP2000059796A (en) * 1998-06-03 2000-02-25 Matsushita Electric Ind Co Ltd Motion detecting device, motion detecting method and recording medium with motion detection program recorded therein
WO2008023466A1 (en) * 2006-08-24 2008-02-28 Mitsubishi Electric Corporation Moving vector detecting bdevice
CN101102504A (en) * 2007-07-24 2008-01-09 中兴通讯股份有限公司 A mixing motion detection method combining with video encoder
JP2009147807A (en) * 2007-12-17 2009-07-02 Fujifilm Corp Image processing apparatus
US20110044502A1 (en) * 2009-04-28 2011-02-24 Hisense State Key Laboratory Of Digital Multi-Media Technology Co., Ltd. Motion detection method, apparatus and system
JP2012034225A (en) * 2010-07-30 2012-02-16 Canon Inc Motion vector detection device, motion vector detection method and computer program
JP2012073971A (en) * 2010-09-30 2012-04-12 Fujifilm Corp Moving image object detection device, method and program
JP2013239011A (en) * 2012-05-15 2013-11-28 Nippon Telegr & Teleph Corp <Ntt> Motion vector on moving object detection device, motion vector on moving object detection method and program
US20140072241A1 (en) * 2012-09-12 2014-03-13 Canon Kabushiki Kaisha Image processing apparatus and image processing method
US20150139504A1 (en) * 2013-11-19 2015-05-21 Renesas Electronics Corporation Detecting apparatus, detecting system, and detecting method
CN103679749A (en) * 2013-11-22 2014-03-26 北京奇虎科技有限公司 Moving target tracking based image processing method and device
JP2017138379A (en) * 2016-02-02 2017-08-10 キヤノン株式会社 Image shake correction device and method for controlling the same, imaging device, program, and storage medium
CN107437257A (en) * 2017-08-08 2017-12-05 重庆信络威科技有限公司 Moving object segmentation and dividing method under a kind of mobile background
CN108596109A (en) * 2018-04-26 2018-09-28 济南浪潮高新科技投资发展有限公司 A kind of object detection method and device based on neural network and motion vector

Also Published As

Publication number Publication date
CN111292354B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN107592466B (en) Photographing method and mobile terminal
CN110896451B (en) Preview picture display method, electronic device and computer readable storage medium
CN111223143B (en) Key point detection method and device and computer readable storage medium
CN110505400B (en) Preview image display adjustment method and terminal
CN110784651B (en) Anti-shake method and electronic equipment
CN111147752B (en) Zoom factor adjusting method, electronic device, and medium
CN111031234B (en) Image processing method and electronic equipment
CN109462745B (en) White balance processing method and mobile terminal
CN107730460B (en) Image processing method and mobile terminal
CN110213484B (en) Photographing method, terminal equipment and computer readable storage medium
CN111083386B (en) Image processing method and electronic device
CN111601032A (en) Shooting method and device and electronic equipment
CN111083375B (en) Focusing method and electronic equipment
CN108307123B (en) Exposure adjusting method and mobile terminal
CN111145151B (en) Motion area determining method and electronic equipment
CN110769154B (en) Shooting method and electronic equipment
CN109104573B (en) Method for determining focusing point and terminal equipment
CN111131722A (en) Image processing method, electronic device, and medium
CN110708475A (en) Exposure parameter determination method, electronic equipment and storage medium
CN111031265B (en) FSR (frequency selective response) determining method and electronic equipment
CN107798662B (en) Image processing method and mobile terminal
CN110913133B (en) Shooting method and electronic equipment
CN111026263B (en) Audio playing method and electronic equipment
CN110769162B (en) Electronic equipment and focusing method
CN111147754B (en) Image processing method and electronic device

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
GR01 Patent grant