CN109741363B - Motion judgment method and device based on block difference value and electronic equipment - Google Patents
Motion judgment method and device based on block difference value and electronic equipment Download PDFInfo
- Publication number
- CN109741363B CN109741363B CN201910029797.0A CN201910029797A CN109741363B CN 109741363 B CN109741363 B CN 109741363B CN 201910029797 A CN201910029797 A CN 201910029797A CN 109741363 B CN109741363 B CN 109741363B
- Authority
- CN
- China
- Prior art keywords
- pixel point
- current
- previous
- block
- filtering
- 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.)
- Active
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a motion judgment method and device based on block difference values and electronic equipment, wherein the method comprises the following steps: obtaining a current pixel point of a current frame image and a previous pixel point corresponding to the current pixel point in a previous frame image; obtaining first difference information between a current pixel point and a previous pixel point through absolute difference sum operation based on a current block corresponding to the current pixel point; obtaining second difference information between the current filtering pixel point and the previous filtering pixel point through absolute difference sum operation based on the current filtering block; and obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information. The technical problem of inaccurate judgment of the motion condition of each pixel point in the current frame image in the prior art is solved, and the technical effect of improving the accuracy of judging the motion condition of each pixel point in the current frame image is achieved.
Description
Technical Field
The present invention relates to the field of image processing, and in particular, to a motion determination method and apparatus based on block difference values, and an electronic device.
Background
Currently, motion estimation of a target object in an image is mainly based on motion vectors of blocks in the image. Specifically, the motion vector of the block can be estimated by a sum of absolute differences (Sum of absolute difference, SAD) operation. The SAD operation equally accumulates the absolute differences between pixels in each reference block in the current frame image and the previous frame image one by one. The motion matching block is judged by searching the block with the minimum SAD output value, so that the motion vector of the current block is obtained, and the motion condition of the current block is judged.
However, this method has poor noise immunity, so that the judgment based on the motion condition of each pixel point in the current frame image is inaccurate, and thus the motion judgment result of the current frame image cannot be accurately obtained.
Disclosure of Invention
The invention aims to provide a motion judgment method and device based on a block difference value and electronic equipment, which are used for solving the technical problem that the judgment of the motion condition of each pixel point in a current frame image is inaccurate in the prior art.
In a first aspect, an embodiment of the present invention provides a motion determination method based on a block difference, including:
obtaining a current pixel point of a current frame image and a previous pixel point corresponding to the current pixel point in a previous frame image;
obtaining first difference information between the current pixel point and the previous pixel point through absolute difference sum operation based on the current block and the previous block corresponding to the current pixel point;
obtaining second difference information between a current filtering pixel point and a previous filtering pixel point through absolute difference sum operation based on a current filtering block, wherein the current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is carried out on the current block, the current pixel point and the previous pixel point respectively;
and obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information.
Optionally, before the obtaining, based on the current block corresponding to the current pixel point, first difference information between the current pixel point and the previous pixel point through an absolute difference sum operation, the method further includes:
in the previous frame image, a previous block corresponding to the current block position is obtained, and each pixel point in the current block corresponds to each pixel point in the previous block in a one-to-one position.
Optionally, the current block corresponding to the current pixel point is a rectangular block with the current pixel point as a center and set to a size;
the obtaining, based on a current block and a previous block corresponding to the current pixel point, first difference information between the current pixel point and the previous pixel point through an absolute difference sum operation includes:
for each pixel point in the current block, obtaining a difference value between the value of each pixel point and the value of the pixel point corresponding to the position of each pixel point in the previous block;
and carrying out summation operation on the absolute value of the difference value to obtain the first difference value information.
Optionally, the obtaining the motion determination result of the current pixel point based on the first difference information and the second difference information includes:
acquiring the ratio of the second difference information to the first difference information;
if the ratio is within the set range, judging that the current pixel point generates motion;
and if the ratio is not in the set range, judging that the current pixel point does not move.
Optionally, before the obtaining, based on the current block corresponding to the current pixel point, first difference information between the current pixel point and the previous pixel point through an absolute difference sum operation, the method further includes:
the formats of the previous frame image and the previous frame image are converted into YUV format.
Optionally, the YUV format includes a Y channel, a U channel, and a V channel, and the method further includes:
obtaining motion judgment results of the current pixel point in the Y channel, the U channel and the V channel respectively;
and judging the motion condition of the current pixel point based on the motion judgment results of the Y channel, the U channel and the V channel.
Optionally, after the motion determination result of the current pixel point is obtained based on the first difference information and the second difference information, the method further includes:
and sequentially obtaining a motion judgment result of each pixel point in the current frame image according to the sequence of raster scanning each pixel point in the previous frame image.
In a second aspect, an embodiment of the present invention provides a motion determination apparatus based on a block difference, which is characterized by including:
the acquisition module is used for acquiring a current pixel point of a current frame image and a previous pixel point corresponding to the current pixel point position in a previous frame image;
the processing module is used for obtaining first difference information between the current pixel point and the previous pixel point through absolute difference sum operation based on the current block and the previous block corresponding to the current pixel point; obtaining second difference information between a current filtering pixel point and a previous filtering pixel point through absolute difference sum operation based on a current filtering block, wherein the current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is carried out on the current block, the current pixel point and the previous pixel point respectively; and obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information.
In a third aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the methods described above.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of any one of the methods described above when the processor executes the program.
Compared with the prior art, the invention has the following beneficial effects:
the embodiment of the invention provides a motion judgment method and device based on block difference values and electronic equipment, wherein the method comprises the following steps: obtaining a current pixel point of a current frame image and a previous pixel point corresponding to the current pixel point in a previous frame image; obtaining first difference information between the current pixel point and the previous pixel point through absolute difference sum operation based on the current block and the previous block corresponding to the current pixel point; obtaining second difference information between a current filtering pixel point and a previous filtering pixel point through absolute difference sum operation based on the current filtering block, wherein the current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is carried out on the current block, the current pixel point and the previous pixel point respectively; and obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information. The method comprises the steps of obtaining first difference information between a current pixel point and a previous pixel point based on a current block which is not subjected to filtering processing, obtaining second difference information between the current filtering pixel point and the previous filtering pixel point based on the current filtering block obtained by filtering processing the current block, so that the motion judgment result of the current pixel point obtained based on the first difference information and the second difference information removes interference of noise on judging the motion condition of the current pixel point, the motion judgment result can accurately represent the motion condition of the current pixel point, the current pixel point represents a certain pixel point in a current frame image, and the accuracy of judging the motion condition of each pixel point in the current frame image is improved. The technical problem of inaccurate judgment of the motion condition of each pixel point in the current frame image in the prior art is solved, and the technical effect of improving the accuracy of judging the motion condition of each pixel point in the current frame image is achieved.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a motion determination method based on block difference according to an embodiment of the present invention.
Fig. 2 is a flowchart of another motion determination method based on block difference according to an embodiment of the present invention.
Fig. 3 is a block diagram illustrating a motion determination apparatus 200 based on block difference according to an embodiment of the invention.
Fig. 4 is a schematic block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a motion judgment method and device based on block difference values and electronic equipment, which are used for solving the technical problem that the judgment of the motion condition of each pixel point in a current frame image is inaccurate in the prior art.
Examples
The motion judging method based on the block difference value provided by the embodiment of the invention comprises S100-S400 shown in fig. 1, and the S100-S400 are explained below with reference to fig. 1.
S100: a current pixel point of a current frame image and a previous pixel point corresponding to the current pixel point in a previous frame image are obtained.
Wherein the current frame image and the previous frame image are two adjacent frames.
S200: based on the current block and the previous block corresponding to the current pixel point, first difference information between the current pixel point and the previous pixel point is obtained through absolute difference sum operation.
S300: and obtaining second difference information between the current filtering pixel point and the previous filtering pixel point through absolute difference sum operation based on the current filtering block.
The current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is performed on the current block, the current pixel point and the previous pixel point respectively.
S400: and obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information.
By adopting the scheme, the first difference information between the current pixel point and the previous pixel point is obtained based on the current block which is not subjected to filtering processing, and the second difference information between the current filtering pixel point and the previous filtering pixel point is obtained based on the current filtering block obtained by filtering processing the current block, so that the interference of noise on the motion condition of judging the current pixel point is removed based on the motion judgment result of the current pixel point obtained by the first difference information and the second difference information, the motion condition of the current pixel point can be accurately represented by the motion judgment result, the motion condition of the current pixel point is represented by a certain pixel point in the current frame image, and the scheme can be adopted for judging the motion condition of each pixel point in the current frame image, thereby improving the accuracy of judging the motion condition of each pixel point in the current frame image. The technical problem of inaccurate judgment of the motion condition of each pixel point in the current frame image in the prior art is solved, and the technical effect of improving the accuracy of judging the motion condition of each pixel point in the current frame image is achieved.
It should be noted that, as an alternative embodiment, the current frame image and the previous frame image have a sequence, and the shooting time of the previous frame image is before the shooting time of the current frame image, which may be specifically that the current frame image is a frame image subsequent to the previous frame image.
In the embodiment of the present invention, the current block includes a plurality of pixels. The current block corresponding to the current pixel point is a rectangular block with a set size centered on the current pixel point, for example, the current block is a 5x5 block, a 7x7 block, or the like rectangular block. If the position of the current pixel is at the edge of the current frame image, the current block takes the current pixel as the center, a plurality of pixels adjacent to the pixel are obtained, and a determined block formed by the pixels is the current block. For example, the current pixel is (0, 0), and the current block is a block composed of (0, 0), (0, 1), (1, 0), and (1, 1). The current pixel point is (5, 5), and the current block is a block composed of points (4, 4), (4, 5), (4, 6), (5, 4), (5, 5), (5, 6), (6, 4), (6, 5) and (6, 6).
As an alternative embodiment, for S200, specifically: for each pixel point in the current block, obtaining a difference value between the value of each pixel point and the value of the pixel point corresponding to the position of each pixel point in the previous block; and carrying out summation operation on the absolute value of the difference value to obtain first difference value information. Wherein, each pixel point in each current block corresponds to a difference value, and specifically, the absolute value of each difference value is summed. In order to obtain a previous block corresponding to the current block position in the previous frame image, as an optional implementation manner, before S200, the motion determination method based on the block difference value further includes: in the previous frame image, a previous block corresponding to the current block position is obtained, and each pixel point in the current block corresponds to each pixel point in the previous block in a one-to-one position. The position correspondence refers to one-to-one correspondence between positions, for example, the position of the current pixel is the same as the position of the previous pixel, which is specifically shown that the value of the position of the current pixel is the same as the value of the position of the previous pixel, for example, if the value of the position of the current pixel is (1, 2) and the value of the position of the previous pixel is (1, 2), the current pixel corresponds to the position of the previous pixel. In this way, the current block and the previous block are identical in size.
As an alternative embodiment, the first difference information is obtained by the following formula (1).
Wherein a (i, j) represents the value of a pixel (i, j) in the current block corresponding to the current pixel (m, n), b (i, j) represents the value of a pixel corresponding to the position of the pixel (i, j) in the previous block, k represents the number of pixels of the current block in the horizontal axis direction, and s1 (m, n) represents the first difference information. The value of each pixel point in the current block corresponding to the current pixel point is subtracted by adopting the value of each pixel point in the current block corresponding to the current pixel point, the value of each pixel point in the previous block corresponding to the current block one by one is subtracted, the absolute value of the obtained difference value is obtained, the absolute values corresponding to the pixel points are summed, first difference value information is obtained, and the first difference value information can accurately represent the motion condition of the current pixel point.
As an alternative implementation manner, before S300, the motion determining method based on the block difference value further includes: and filtering the current frame image and the previous frame image, specifically, respectively filtering the current block and the previous block corresponding to the current block position to obtain a current filtering block and a previous filtering block. It can be understood that the current pixel point is in the current block, the previous pixel point is in the previous block, and the filtering processing is performed on the current block and the previous block, that is, the filtering processing is performed on the current pixel point and the previous pixel point, correspondingly, the current pixel point after the filtering processing is called the current filtering pixel point, and the previous pixel point after the filtering processing is called the previous filtering pixel point. The current filtering block comprises current filtering pixel points, and the previous filtering block comprises previous filtering pixel points. Because the current pixel point corresponds to the previous pixel point, the current filtering pixel point and the previous filtering pixel point are obtained by filtering the current pixel point and the previous pixel point, respectively, and thus the current filtering pixel point corresponds to the previous filtering pixel point. Similarly, each pixel point in the prior filtering block corresponds to each pixel point in the prior filtering block in a one-to-one position. Alternatively, the filtering process may be low-pass filtering, high-pass filtering, median filtering, average filtering, or the like.
For S300, specifically: for each pixel point in the current filtering block, obtaining a difference value between the value of each pixel point and the value of the pixel point corresponding to the position of each pixel point in the previous filtering block; and carrying out summation operation on the absolute values of the differences to obtain second difference information, wherein each pixel point in each current filtering block corresponds to one difference value, and specifically carrying out summation operation on the absolute value of each difference value. As an alternative embodiment, the second difference information is obtained by the following formula (2).
Wherein af (i, j) represents the value of a pixel (i, j) in the current filtering block corresponding to the current pixel (m, n), bf (i, j) represents the value of a pixel corresponding to the position of the pixel (i, j) in the previous filtering block, k represents the number of pixels of the current filtering block in the horizontal axis direction, and s2 (m, n) represents the second difference information. The value of each pixel point in the current filtering block corresponding to the current pixel point is subtracted from the value of each pixel point in the previous filtering block corresponding to the current pixel point, which corresponds to each pixel point of the current filtering block one by one, the absolute value of the obtained difference value is obtained, the absolute values corresponding to the pixel points are summed to obtain second difference value information, the influence of noise is removed, and the accuracy of judging the motion condition of the current pixel point is improved.
After the first difference information and the second difference information are obtained, a motion judgment result capable of accurately judging the motion condition of the current pixel point is obtained through the steps described in S400.
As an alternative implementation manner, for S400, specifically, a ratio of the second difference information to the first difference information is obtained; if the ratio is within the set range, judging that the current pixel point generates motion; if the ratio is not in the set range, judging that the current pixel point does not move. Specifically, the ratio of the second difference information to the first difference information is obtained according to the formula (3), and the motion judgment result capable of digitally representing the motion condition of the previous pixel point is obtained according to the formula (4).
Wherein r (m, n) represents a ratio of the second difference information corresponding to the current pixel point (m, n) to the first difference information, f (m, n) represents a motion judgment result of the current pixel point (m, n), the motion judgment result can digitally represent a motion condition of the current pixel point (m, n), thr represents a infinitesimal boundary of a set range [ thr, + ].
In the embodiment of the present invention, the value may refer to a pixel value.
By adopting the scheme, the first difference information between the current pixel point and the previous pixel point is obtained based on the current block which is not subjected to filtering processing, and the second difference information between the current filtering pixel point and the previous filtering pixel point is obtained based on the current filtering block obtained by filtering processing of the current block, so that the interference of noise on the motion condition of the current pixel point is removed by the motion judgment result of the current pixel point obtained based on the first difference information and the second difference information, and the motion condition of the current pixel point can be accurately and digitally represented by the motion judgment result.
As an optional implementation manner, the motion determination method based on the block difference value obtains a motion determination result of the current pixel point based on the image in the YUV format. Then, before S200, the motion determination method based on the block difference value further includes: and converting formats of the previous frame image and the previous frame image into YUV formats to obtain a YUV current frame image and a YUV previous frame image. In the embodiment of the invention, the YUV format comprises a Y channel, a U channel and a V channel, and the data proportion of the image in the YUV format in the Y channel, the U channel and the V channel is 4:4:4 respectively. After converting the formats of the previous frame image and the previous frame image into YUV format, the motion determination method based on the block difference further includes S500 and S600 shown in fig. 2, specifically:
s500: and obtaining motion judgment results of the current pixel point in the Y channel, the U channel and the V channel respectively.
S500: and judging the motion state of the current pixel point based on the motion judgment results of the Y channel, the U channel and the V channel.
In the embodiment of the present invention, with respect to S500, the motion determination results of the current pixel point in the Y channel, the U channel, and the V channel are obtained by the methods described in S100 to S400. The method comprises the following steps: obtaining a current pixel point of a current frame image in YUV format and a previous pixel point corresponding to the current pixel point position in a previous frame image in YUV format; based on a first channel included in the YUV format, based on a current block corresponding to a current pixel point, obtaining first difference information between the current pixel point and a previous pixel point in the first channel through absolute difference sum operation. Obtaining second difference information between a current filtering pixel point and a previous filtering pixel point in a first channel through absolute difference sum operation based on a current filtering block, wherein the current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is carried out on the current block, the current pixel point and the previous pixel point respectively; and obtaining a motion judgment result of the current pixel point in the first channel based on the first difference information and the second difference information. The values in S100 to S400 are values of the pixel points in the first channel. And similarly, obtaining the motion judgment results of the current pixel point in the second channel and the third channel. The first channel represents any one of a Y channel, a U channel, and a V channel, and the second channel and the third channel represent two other channels in YUV format, respectively, other than the first channel. After the motion judgment results of the current pixel point in the Y channel, the U channel and the V channel are obtained, the motion condition of the current pixel point is judged based on the motion judgment results of the current pixel point in the Y channel, the U channel and the V channel. For S600, as an optional implementation manner, the motion determination result capable of determining the motion condition of the current pixel point is obtained by performing exclusive OR operation on the motion determination results of the current pixel point in the Y channel, the U channel and the V channel respectivelyThe motion determination result may be digitized as a determination result of the motion condition of the current pixel point. For example, use f y (m,n)、f u (m, n) and f v And (m, n) respectively represent the motion judgment results of the current pixel point in the Y channel, the U channel and the V channel. The motion determination result is obtained by the formula (5).
f(m,n)=f y (m,n)|f u (m,n)|f v (m,n) (5)
Where f (m, n) represents the motion determination result of the current pixel point.
In order to determine the motion situation of the current frame image relative to the previous frame image, as an optional implementation manner, after S400, specifically after S600, the motion determination method based on the block difference value further includes: and sequentially obtaining the motion judgment result of each pixel point in the current frame image according to the sequence of raster scanning each pixel point in the previous frame image. Specifically, the motion determination result of each pixel point in the current frame image is obtained according to the above method. Based on the motion determination result of each pixel point, the motion condition of the current frame image with respect to the previous frame image can be determined. Since the accuracy of the motion determination result of each pixel point in the current frame image is high, the accuracy of determining the motion condition of the current frame image relative to the previous frame image based on the motion determination result of each pixel point in the current frame image is high. Because the motion condition of each pixel point in the current frame image is judged accurately, the motion condition of the whole current frame image is judged accurately. The accuracy of judging the motion condition of each pixel point in the current frame image is improved. Therefore, the technical problem of inaccurate judgment of the motion condition of each pixel point in the current frame image in the prior art is solved, and the technical effect of improving the accuracy of judging the motion condition of each pixel point in the current frame image is achieved.
For the above embodiment, a motion determining method based on a block difference is provided, and the embodiment of the present application also correspondingly provides an execution body for executing the above steps, where the execution body may be the motion determining device 200 based on a block difference in fig. 3. Referring to fig. 3, the apparatus includes:
an obtaining module 210, configured to obtain a current pixel of a current frame image and a previous pixel corresponding to the current pixel in a previous frame image;
a processing module 220, configured to obtain first difference information between the current pixel point and the previous pixel point through an absolute difference sum operation based on a current block and a previous block corresponding to the current pixel point; obtaining second difference information between a current filtering pixel point and a previous filtering pixel point through absolute difference sum operation based on a current filtering block, wherein the current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is carried out on the current block, the current pixel point and the previous pixel point respectively; and obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information.
As an alternative embodiment, the processing module 220 is further configured to: in the previous frame image, a previous block corresponding to the current block position is obtained, and each pixel point in the current block corresponds to each pixel point in the previous block in a one-to-one position.
As an alternative embodiment, the processing module 220 is further configured to: for each pixel point in the current block, obtaining a difference value between the value of each pixel point and the value of the pixel point corresponding to the position of each pixel point in the previous block; and carrying out summation operation on the absolute value of the difference value to obtain the first difference value information.
As an alternative embodiment, the processing module 220 is further configured to: acquiring the ratio of the second difference information to the first difference information; if the ratio is within the set range, judging that the current pixel point generates motion; and if the ratio is not in the set range, judging that the current pixel point does not move.
As an alternative embodiment, the processing module 220 is further configured to: the formats of the previous frame image and the previous frame image are converted into YUV format.
As an alternative embodiment, the processing module 220 is further configured to: obtaining motion judgment results of the current pixel point in the Y channel, the U channel and the V channel respectively; and judging the motion condition of the current pixel point based on the motion judgment results of the Y channel, the U channel and the V channel.
As an alternative embodiment, the processing module 220 is further configured to: and sequentially obtaining a motion judgment result of each pixel point in the current frame image according to the sequence of raster scanning each pixel point in the previous frame image.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a memory 504, a processor 502, and a computer program stored in the memory 504 and capable of running on the processor 502, where the processor 502 implements the steps of any one of the above-described motion determination methods based on block difference values when executing the program.
Where in FIG. 4 a bus architecture (represented by bus 500), bus 500 may include any number of interconnected buses and bridges, with bus 500 linking together various circuits, including one or more processors, represented by processor 502, and memory, represented by memory 504. Bus 500 may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., as are well known in the art and, therefore, will not be described further herein. Bus interface 505 provides an interface between bus 500 and receiver 501 and transmitter 503. The receiver 501 and the transmitter 503 may be the same element, i.e. a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 502 is responsible for managing the bus 500 and general processing, while the memory 504 may be used to store data used by the processor 502 in performing operations.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of any one of the block difference-based motion determination methods described above.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components in an apparatus according to embodiments of the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus or device program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
Claims (9)
1. A motion estimation method based on block difference, comprising:
obtaining a current pixel point of a current frame image and a previous pixel point corresponding to the current pixel point in a previous frame image;
obtaining first difference information between the current pixel point and the previous pixel point through absolute difference sum operation based on the current block and the previous block corresponding to the current pixel point;
obtaining second difference information between a current filtering pixel point and a previous filtering pixel point through absolute difference sum operation based on a current filtering block, wherein the current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is carried out on the current block, the current pixel point and the previous pixel point respectively;
obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information;
the obtaining the motion judgment result of the current pixel point based on the first difference information and the second difference information includes:
acquiring the ratio of the second difference information to the first difference information;
if the ratio is within the set range, judging that the current pixel point generates motion;
and if the ratio is not in the set range, judging that the current pixel point does not move.
2. The method of claim 1, wherein prior to the obtaining first difference information between the current pixel point and the previous pixel point by an absolute difference sum operation based on the current block corresponding to the current pixel point, the method further comprises:
in the previous frame image, a previous block corresponding to the current block position is obtained, and each pixel point in the current block corresponds to each pixel point in the previous block in a one-to-one position.
3. The method of claim 2, wherein the current block corresponding to the current pixel is a rectangular block with a size set centered on the current pixel;
the obtaining, based on a current block and a previous block corresponding to the current pixel point, first difference information between the current pixel point and the previous pixel point through an absolute difference sum operation includes:
for each pixel point in the current block, obtaining a difference value between the value of each pixel point and the value of the pixel point corresponding to the position of each pixel point in the previous block;
and carrying out summation operation on the absolute value of the difference value to obtain the first difference value information.
4. The method of claim 1, wherein prior to the obtaining first difference information between the current pixel point and the previous pixel point by an absolute difference sum operation based on the current block corresponding to the current pixel point, the method further comprises:
the formats of the previous frame image and the previous frame image are converted into YUV format.
5. The method of claim 4, wherein the YUV format includes a Y channel, a U channel, and a V channel, the method further comprising:
obtaining motion judgment results of the current pixel point in the Y channel, the U channel and the V channel respectively;
and judging the motion condition of the current pixel point based on the motion judgment results of the Y channel, the U channel and the V channel.
6. The method according to claim 1, wherein after the motion determination result of the current pixel point is obtained based on the first difference information and the second difference information, the method further comprises:
and sequentially obtaining a motion judgment result of each pixel point in the current frame image according to the sequence of raster scanning each pixel point in the previous frame image.
7. A motion estimation device based on block difference, comprising:
the acquisition module is used for acquiring a current pixel point of a current frame image and a previous pixel point corresponding to the current pixel point position in a previous frame image;
the processing module is used for obtaining first difference information between the current pixel point and the previous pixel point through absolute difference sum operation based on the current block and the previous block corresponding to the current pixel point; obtaining second difference information between a current filtering pixel point and a previous filtering pixel point through absolute difference sum operation based on a current filtering block, wherein the current filtering block, the current filtering pixel point and the previous filtering pixel point are obtained after filtering processing is carried out on the current block, the current pixel point and the previous pixel point respectively; obtaining a motion judgment result of the current pixel point based on the first difference information and the second difference information;
the processing module is further used for obtaining the ratio of the second difference information to the first difference information; if the ratio is within the set range, judging that the current pixel point generates motion; and if the ratio is not in the set range, judging that the current pixel point does not move.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any of claims 1-6.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 1-6 when the program is executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910029797.0A CN109741363B (en) | 2019-01-11 | 2019-01-11 | Motion judgment method and device based on block difference value and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910029797.0A CN109741363B (en) | 2019-01-11 | 2019-01-11 | Motion judgment method and device based on block difference value and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109741363A CN109741363A (en) | 2019-05-10 |
CN109741363B true CN109741363B (en) | 2023-07-14 |
Family
ID=66364587
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910029797.0A Active CN109741363B (en) | 2019-01-11 | 2019-01-11 | Motion judgment method and device based on block difference value and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109741363B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114018253B (en) * | 2021-10-25 | 2024-05-03 | 珠海一微半导体股份有限公司 | Robot with vision positioning function and positioning method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100020068A (en) * | 2008-08-12 | 2010-02-22 | 엘지전자 주식회사 | Apparatus for removing noise using moving estimation |
KR20110080395A (en) * | 2010-01-05 | 2011-07-13 | 주식회사 코아로직 | Motion detection device and method, and image processing apparatus comprising the same device |
CN103793921A (en) * | 2012-10-29 | 2014-05-14 | 浙江大华技术股份有限公司 | Moving object extraction method and moving object extraction device |
CN103985140A (en) * | 2014-05-22 | 2014-08-13 | 中国人民解放军国防科学技术大学 | Anti-noise moving object detecting method based on frequency domain processing |
EP3128485A1 (en) * | 2015-08-05 | 2017-02-08 | Thomson Licensing | Method and apparatus for hierarchical motion estimation using dfd-based image segmentation |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8488676B2 (en) * | 2007-05-14 | 2013-07-16 | Himax Technologies Limited | Motion estimation method |
CN101266689B (en) * | 2008-04-23 | 2010-09-29 | 北京中星微电子有限公司 | A mobile target detection method and device |
CN102760296B (en) * | 2011-04-29 | 2014-12-10 | 华晶科技股份有限公司 | Movement analyzing method for objects in multiple pictures |
CN103095966B (en) * | 2011-10-28 | 2016-04-27 | 浙江大华技术股份有限公司 | A kind of video jitter quantization method and device |
CN102915543B (en) * | 2012-09-12 | 2015-01-07 | 西安电子科技大学 | Figure motion change detecting method based on extracting function and three-channel separation |
CN103024248B (en) * | 2013-01-05 | 2016-01-06 | 上海富瀚微电子股份有限公司 | The video image noise reducing method of Motion Adaptive and device thereof |
CN103269412B (en) * | 2013-04-19 | 2017-03-08 | 华为技术有限公司 | A kind of noise-reduction method of video image and device |
US9953431B2 (en) * | 2016-04-04 | 2018-04-24 | Sony Corporation | Image processing system and method for detection of objects in motion |
TW201742001A (en) * | 2016-05-30 | 2017-12-01 | 聯詠科技股份有限公司 | Method and device for image noise estimation and image capture apparatus |
CN106097398B (en) * | 2016-07-27 | 2019-01-29 | 维沃移动通信有限公司 | A kind of detection method and mobile terminal of Moving Objects |
-
2019
- 2019-01-11 CN CN201910029797.0A patent/CN109741363B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100020068A (en) * | 2008-08-12 | 2010-02-22 | 엘지전자 주식회사 | Apparatus for removing noise using moving estimation |
KR20110080395A (en) * | 2010-01-05 | 2011-07-13 | 주식회사 코아로직 | Motion detection device and method, and image processing apparatus comprising the same device |
CN103793921A (en) * | 2012-10-29 | 2014-05-14 | 浙江大华技术股份有限公司 | Moving object extraction method and moving object extraction device |
CN103985140A (en) * | 2014-05-22 | 2014-08-13 | 中国人民解放军国防科学技术大学 | Anti-noise moving object detecting method based on frequency domain processing |
EP3128485A1 (en) * | 2015-08-05 | 2017-02-08 | Thomson Licensing | Method and apparatus for hierarchical motion estimation using dfd-based image segmentation |
Non-Patent Citations (2)
Title |
---|
A new adaptive Kalman filtering method for block-based motion estimation;Yi Luo;《2008 15th International Conference on Systems, Signals and Image Processing》;第1-4页 * |
基于运动估计的电子稳像的设计与软件实现;李沙;《中国优秀硕士学位论文全文数据库(信息科技编辑)》(第03期);I138-7073 * |
Also Published As
Publication number | Publication date |
---|---|
CN109741363A (en) | 2019-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109583391B (en) | Key point detection method, device, equipment and readable medium | |
CN109005368B (en) | High dynamic range image generation method, mobile terminal and storage medium | |
US20210227139A1 (en) | Video stabilization method and apparatus and non-transitory computer-readable medium | |
KR20180122548A (en) | Method and apparaturs for processing image | |
JP2014527210A (en) | Content adaptive system, method and apparatus for determining optical flow | |
CN111340732B (en) | Low-illumination video image enhancement method and device | |
CN109214996B (en) | Image processing method and device | |
KR20150032822A (en) | Method and apparatus for filtering an image | |
CN113029128A (en) | Visual navigation method and related device, mobile terminal and storage medium | |
CN111105452A (en) | High-low resolution fusion stereo matching method based on binocular vision | |
CN115393815A (en) | Road information generation method and device, electronic equipment and computer readable medium | |
CN110689014B (en) | Method and device for detecting region of interest, electronic equipment and readable storage medium | |
CN109741363B (en) | Motion judgment method and device based on block difference value and electronic equipment | |
CN110717864B (en) | Image enhancement method, device, terminal equipment and computer readable medium | |
CN113344820B (en) | Image processing method and device, computer readable medium and electronic equipment | |
CN110569698A (en) | Image target detection and semantic segmentation method and device | |
CN110222652B (en) | Pedestrian detection method and device and electronic equipment | |
JP7384158B2 (en) | Image processing device, moving device, method, and program | |
CN115439509B (en) | Multi-target tracking method and device, computer equipment and storage medium | |
JP5928465B2 (en) | Degradation restoration system, degradation restoration method and program | |
JP2006215657A (en) | Method, apparatus, program and program storage medium for detecting motion vector | |
CN112949423A (en) | Object recognition method, object recognition device, and robot | |
CN114596210A (en) | Noise estimation method, device, terminal equipment and computer readable storage medium | |
US20210150723A1 (en) | Image processing device, image processing method, and program | |
CN109685824B (en) | Motion judgment method and device based on singular value decomposition characteristics and electronic equipment |
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 |