WO2020113419A1 - 一种图像处理方法和装置 - Google Patents

一种图像处理方法和装置 Download PDF

Info

Publication number
WO2020113419A1
WO2020113419A1 PCT/CN2018/119162 CN2018119162W WO2020113419A1 WO 2020113419 A1 WO2020113419 A1 WO 2020113419A1 CN 2018119162 W CN2018119162 W CN 2018119162W WO 2020113419 A1 WO2020113419 A1 WO 2020113419A1
Authority
WO
WIPO (PCT)
Prior art keywords
rectangular
value
average pixel
rectangular window
window
Prior art date
Application number
PCT/CN2018/119162
Other languages
English (en)
French (fr)
Other versions
WO2020113419A9 (zh
Inventor
莊哲綸
潘積桂
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/119162 priority Critical patent/WO2020113419A1/zh
Priority to CN201880088083.0A priority patent/CN111684489B/zh
Publication of WO2020113419A1 publication Critical patent/WO2020113419A1/zh
Publication of WO2020113419A9 publication Critical patent/WO2020113419A9/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Definitions

  • the present application relates to the field of image processing technology, and in particular, to an image processing method and device.
  • the phenomenon of blurred images will be produced for the moving objects, which will result in a lower film formation rate and poor shooting results.
  • the detection method of moving objects one of them is based on image processing algorithms.
  • image processing algorithms In the process of detecting the motion of an object based on an image processing algorithm, most of them select a series of feature points in the captured image and determine the motion vector of the object through the detection and analysis of these feature points.
  • the motion of the object can be judged by comparing the difference between the two images of the current frame and the previous frame.
  • the device stores the previous frame of image, it is necessary to save all pixel information of the previous frame of image, which in turn requires a large amount of storage space, which increases the hardware cost.
  • the present application provides an image processing method and device, which uses a method of low memory access to determine the motion status of an object and reduce hardware costs.
  • the present application provides an image processing method, which can be executed by a terminal device.
  • the method includes: taking a first frame image and a second frame image of a moving object;
  • the frame image is divided into MxN first rectangular windows
  • the second frame image is divided into MxN second rectangular windows
  • M represents the number of horizontal rectangular windows
  • N represents the number of vertical rectangular windows
  • M and N Both are positive integers
  • each of the MxN first rectangular windows and the MxN second rectangular windows includes m times n pixels, m is the number of pixels in the horizontal direction, and n is the number of pixels in the vertical direction Number, and m and n are positive integers
  • Each of the average pixel values includes m average pixel values in the horizontal direction and n average pixel values in the vertical direction; according to the first average pixel value of the MxN first rectangular windows and the MxN second
  • the averaging algorithm of pixel values is used to simplify all pixel values of the original image to average values, and only the average value can be cached or saved without storing all pixel values, thereby achieving a small storage resource occupation and saving hardware Cost benefit.
  • the method uses a motion detection algorithm with low computational memory access to quickly determine at least one motion window, and also improves calculation efficiency.
  • the calculating the first average pixel value of each first rectangular window and the second average pixel value of each second rectangular window includes: determining A first pixel area and a second pixel area of each first rectangular window, and a third pixel area and a fourth pixel area that determine each second rectangular window, the first pixel area includes the A rectangular window and at least one first rectangular window horizontally adjacent to each first rectangular window, and the second pixel area includes each first rectangular window and is perpendicular to each first rectangular window Adjacent at least one first rectangular window, the third pixel area includes each second rectangular window and at least one second rectangular window horizontally adjacent to each second rectangular window, the fourth The pixel area includes each of the second rectangular windows and at least one second rectangular window vertically adjacent to each of the second rectangular windows; calculating m average pixel values in the horizontal direction in the first pixel area to obtain the M horizontal average pixel values in the first average pixel value; calculating n vertical average pixel values in the second pixel area to obtain
  • the accuracy of the calculation is improved, that is, using the accumulation
  • the projected histogram of adjacent windows achieves the noise reduction effect, making the calculation result more accurate.
  • the pixel value determining at least one moving window among the MxN rectangular windows includes: calculating the first average pixel value of each first rectangular window and the second of the second rectangular window corresponding to each first rectangular window The correlation coefficient of the average pixel value; determining whether the correlation coefficient is less than the first threshold; if so, determining that the second rectangular window corresponding to the correlation coefficient is a moving window.
  • the correlation coefficient includes confidence.
  • the method further includes: using an absolute error and a SAD algorithm to calculate the SAD values of all two adjacent pixels in the search range; Select the minimum SAD value among the values, and determine the speed of each moving window according to the minimum SAD value; wherein the speed is determined by the number of pixels horizontally displaced or vertically displaced within each moving window At least one of the number of pixels is determined.
  • the method further includes: calculating a gradient value of each second rectangular window, the gradient value Including the sum of the horizontal gradient value and the vertical gradient value in each second rectangular window, the horizontal gradient value being the sum of the difference between every two adjacent pixel values in the m horizontal pixel values, the vertical
  • the gradient value is the sum of the difference between each two adjacent pixel values in the n vertical pixel values; the probability value of each second rectangular window is determined according to the gradient value of each second rectangular window; the probability is determined Whether the value is greater than the second threshold; if it is, then reduce the correlation coefficient of the second rectangular window corresponding to the probability value.
  • all low-texture areas of the current frame image can be determined by calculating the gradient value, and the confidence of these low-texture areas is reduced, thereby improving the overall The accuracy of motion information.
  • the method further includes: performing spatial domain filtering processing on the MxN second rectangular windows in the second frame image to obtain M'x N'third rectangular windows, and the speed and confidence of each third rectangular window, wherein M'and N'are both positive integers, and M'is less than M, and N'is less than N.
  • the spatial information filtering process on the motion information is used to obtain a more stable displacement and confidence, thereby improving the accuracy of calculating the speed and direction of the motion, and reducing the interference of noise.
  • the present application also provides an image processing apparatus, the apparatus including a functional unit for performing the foregoing first aspect and the method in various implementations of the first aspect.
  • the functional unit includes an acquisition unit and a processing unit.
  • it may also include a sending unit, a storage unit, and the like.
  • an embodiment of the present application further provides a communication device.
  • the communication device includes a processor.
  • the processor is coupled to a memory.
  • the memory is used to store instructions.
  • the processor is used to execute the memory. Instructions to cause the communication device to execute the aforementioned first aspect and the image processing method in various implementations of the first aspect.
  • the communication device includes hardware equipment, such as terminal equipment.
  • an embodiment of the present application further provides a computer-readable storage medium that stores instructions, and when the instructions run on a computer or a processor, it is used to perform the foregoing first aspect and the first
  • image processing methods in various implementations.
  • an embodiment of the present application further provides a computer program product.
  • the computer program product includes computer instructions. When the instructions are executed by a computer or a processor, the foregoing first aspect and various aspects of the first aspect can be implemented Image processing method in implementation.
  • an embodiment of the present application further provides a chip system.
  • the chip system includes a processor and an interface circuit.
  • the interface circuit is coupled to the processor.
  • the processor is used to execute a computer program or instruction.
  • the interface circuit is used to communicate with other modules than the chip system.
  • the present application provides an image processing method and device.
  • the method uses an algorithm for averaging pixel values to simplify all pixel values of the original image to an average value, and may only cache or save the average value without storing all pixel values , So as to achieve the beneficial effects of small storage resource occupation and hardware cost savings.
  • the method uses a motion detection algorithm with low computational memory access to quickly determine at least one motion window, which improves computational efficiency.
  • FIG. 1 is an overall flowchart of an image processing method provided by an embodiment of the present application
  • FIG. 2 is a flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a correspondence relationship between pixel values and weight values provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of dividing a pixel area provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of calculating an average pixel value of a rectangular window using pixel values according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of a low memory storage projection histogram provided by an embodiment of this application.
  • FIG. 7 is a schematic diagram of using the SAD algorithm to scan and search for the minimum SAD value according to an embodiment of the present application
  • FIG. 8 is a schematic diagram of calculating and determining a minimum SAD value provided by an embodiment of the present application.
  • FIG. 9 is a flowchart of a method for determining a texture area provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a correspondence between a gradient value and a probability value provided by an embodiment of this application;
  • FIG. 11 is a schematic diagram of a relationship between displacement and confidence provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of multi-dimensional filtering provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of an image processing device according to an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of a hardware device according to an embodiment of the present application.
  • the present application is applied to the field of image processing technology, and particularly relates to the processing of images taken by moving objects, to obtain and calculate the information of moving objects to determine the motion status of the objects, and to reduce the amount of calculation in the process of calculating the motion information of the objects , The effect of reducing memory storage information and reducing hardware costs.
  • the method provided in this embodiment involves processing a series of images including two adjacent frames of images.
  • the two frames of images include: a first frame image captured at a previous moment and a second frame image captured at a current moment.
  • the objects captured by the first frame image and the second frame image are the same, but the content of the two frame images will be different due to the movement of the object.
  • by acquiring two frames of images and processing the two frames of images Can get the movement status of the object.
  • FIG. 1 is an overall flowchart of an image processing method according to an embodiment of the present application
  • the process mainly includes three parts of a processing process, which are a first part (S1), a second part (S2), and The third part (S3).
  • S1 Image pre-processing process. It mainly includes: performing low-pass filtering on the acquired second frame image, and cutting and dividing into multiple (for example, M ⁇ N) rectangular windows.
  • S2 Projection histogram calculation. It mainly includes: calculating the projected histogram of the cut M ⁇ N rectangular windows, obtaining the average pixel value of each rectangular window, and storing the calculated average pixel value in random access memory (random access memory, RAM) in.
  • random access memory random access memory
  • S3 Motion information estimation. It mainly includes: motion information estimation and multi-dimensional filtering processing, where motion information estimation can determine the displacement and direction of the object in the two frames before and after the image, and the multi-dimensional filtering processing is to further process the calculated displacement and direction, To improve the stability of the calculation.
  • it also includes storing the calculated projection histogram of the second frame image, the motion information of the second frame image in the RAM, and obtaining the correlation of the first frame image from the RAM Information, such as the projected histogram of the first frame image and the motion information of the first frame image, etc., for use in the S3 "motion information estimation" process.
  • the image processing method provided by the embodiment of the present application can solve the calculation problem of how to generate motion information with high precision and high stability by designing with low hardware cost.
  • an image processing method is provided, and the method may be executed by a terminal including a camera, such as a user equipment (UE).
  • a terminal including a camera
  • the form of the terminal includes but is not limited to a mobile phone, a computer, or a mobile device. Wear the device.
  • the execution subject of the method may be other devices including cameras, such as network monitoring devices or servers.
  • the method includes:
  • Step 201 Acquire the first frame image and the second frame image of the moving object.
  • the first frame image is the image captured at time t-1 or the previous frame image; the second frame image is the image captured at time t or the current frame image.
  • the first frame image and the second frame image are used to determine the motion status of the object, so before acquiring the second frame image, the party further includes performing a low-pass filtering process on the second frame image to Reduce noise and increase the resolution of the second image.
  • S1 specifically includes: processing the second frame image using a two-dimensional low-pass filter (lowpass filter).
  • the pixels of the second frame image are represented by 9 pixels P 00 to P 22 , where each pixel corresponds to a pixel value. Pixels are also referred to as pixels.
  • the denoising process includes: calculating a target pixel value (for example, P 11 ′) to replace the noise point.
  • the calculation process is: Multiple pixel values related to points are multiplied by their corresponding convolution weight values, and then averaged,
  • the convolution weight corresponding to each pixel can be set according to the ambient brightness or camera parameters, such as ISO (International Standards Organization) value, so as to obtain the best denoising effect; in addition, the low-pass filter can use a multiplier, Adder, displacement calculator to achieve, help reduce hardware costs.
  • ISO International Standards Organization
  • Step 202 Divide the first frame image into MxN first rectangular windows, and divide the second frame image into MxN second rectangular windows.
  • M represents the number of rectangular windows in the horizontal direction
  • N represents the number of rectangular windows in the vertical direction
  • M and N are both positive integers
  • each of the MxN first rectangular windows and the MxN second rectangular windows includes m is multiplied by n pixels
  • m is the number of pixels in the horizontal direction
  • n is the number of pixels in the vertical direction
  • m and n are both positive integers.
  • Step 203 Calculate the first average pixel value of each first rectangular window and the second average pixel value of each second rectangular window, each of the first average pixel value and the second average pixel value includes m average pixel values in the horizontal direction and n vertical average pixel values.
  • step 202 specifically includes: determining a first pixel area and a second pixel area of each first rectangular window, and determining a third pixel area and a fourth pixel area of each second rectangular window, the A pixel area includes each of the first rectangular windows and at least one first rectangular window horizontally adjacent to each of the first rectangular windows, and the second pixel area includes each of the first rectangular windows and At least one first rectangular window vertically adjacent to each first rectangular window, and the third pixel area includes each second rectangular window and at least one horizontally adjacent to each second rectangular window A second rectangular window, the fourth pixel area includes each of the second rectangular windows and at least one second rectangular window vertically adjacent to each of the second rectangular windows.
  • Step 203 includes: calculating m horizontal average pixel values in the first pixel area to obtain m horizontal average pixel values among the first average pixel values.
  • There are nine first rectangular windows in the first frame image namely: P1, P2, P3, P4, P5, P6, P7, P8 and P9.
  • Each of these nine rectangular windows is divided into a first pixel area and a second pixel area.
  • the first rectangular window P5 as an example, the two first rectangular windows horizontally adjacent to P5 are P4 and P6, respectively, then the first pixel area includes P5, P4, and P6.
  • the first rectangular window vertically adjacent to P5 has P2 and P8, then the second pixel area includes P5, P2, and P8.
  • the first pixel areas are P1 and P2, and the second pixel areas are P1 and P4; for the first rectangular window in the edge area, such as P4, the The first pixel areas are P4 and P5, and the second pixel areas are P4, P1 and P7.
  • the same number of 3x3 second rectangular windows is divided, and the method and procedure for determining the third pixel area and the fourth pixel area of each rectangular window are the same as the first pixel area of this embodiment. It is the same as the second pixel area, which will not be repeated in this embodiment.
  • the average pixel value of the first pixel area of each first rectangular window is calculated according to the following formula (1), and the average pixel value of the second pixel area of each first rectangular window is calculated according to the formula (2).
  • X j represents the average pixel value in the horizontal direction
  • Y i represents the average pixel value in the vertical direction
  • int represents the rounding
  • P represents the pixel value
  • i, j are constants
  • the value range of i is [0, m- 1]
  • the range of j is [0, n-1], and both include the end value.
  • the X j may also be expressed as “PorjHist_X”, and the Y i may also be expressed as “PorjHist_Y”.
  • the first rectangular window P5 calculates the average pixel values in the three vertical directions in the second pixel area to obtain the average pixel values in the three vertical directions (Y1, Y2, and Y3) in the first average pixel value, specifically:
  • the formulas (1) and (2) can calculate the corresponding average pixel value.
  • an algorithm for averaging pixel values is used to simplify the original pixel values from multiple pixels to an average value, and only the average value may be cached or saved without storing all pixel values, for example, for the first rectangular window P5, Only 7 average pixel values need to be stored. Compared with the pixel values corresponding to the original need to store 12 pixels, the storage space is saved, and the corresponding calculation amount will also be reduced, thereby reducing storage resources and saving hardware costs. Beneficial effect.
  • this method replaces a large number of pixel values in each row or column by calculating the average pixel value, which is equivalent to storing the horizontal and vertical projection values of each column of pixel values, ie
  • the pixel information of a frame of image can be represented by projecting a histogram. Referring to FIG. 6, each rectangular window is projected in the x-axis direction and the y-axis direction, respectively.
  • the number of average pixel values to be stored is 63 (7 ⁇ 9), which saves storage space compared to the original storage of 108 (12 ⁇ 9) pixel values , Reducing hardware costs.
  • Step 204 Determine at least one moving window among the MxN second rectangular windows according to the first average pixel value of the MxN first rectangular windows and the second average pixel value of the MxN second rectangular windows .
  • Step 204 specifically includes: calculating a correlation coefficient between the first average pixel value of each first rectangular window and the second average pixel value of the second rectangular window corresponding to each first rectangular window; and determining the correlation coefficient Whether it is smaller than the first threshold, if yes, it is determined that the second rectangular window corresponding to the correlation coefficient is a moving window; if not, that is, the correlation coefficient is greater than or equal to the first threshold, it is determined that it is not a moving window.
  • the motion window can be understood as a region where the displacement of the object in the current image changes compared to the previous frame of image.
  • calculating the correlation coefficient between the first average pixel value of each first rectangular window and the second average pixel value of the second rectangular window corresponding to each first rectangular window includes:
  • the correlation coefficients are calculated using the following formula (3) to formula (6), and the correlation coefficients include correlation coefficients in the horizontal direction and the vertical direction. Further, the correlation coefficient is a confidence level, represented by "Q", where "Qx” indicates a confidence level in the horizontal direction, and "Qy” indicates a confidence level in the vertical direction.
  • the first frame (Pre) image determines whether the second rectangular window of the current frame image is a moving window according to the above formula, including:
  • the correlation coefficient that is, the range of the confidence Q is [-1,1], including the end value. If the calculated correlation coefficient is closer to 1, it means that the two signals are similar; otherwise, the closer to -1, It means that the difference between the two signals is greater. In this embodiment, assuming that the first threshold is 0.9, compare 0.753 ⁇ 0.9, that is, the correlation coefficient is less than the first threshold, and then determine that the rectangular window is a moving window.
  • the correlation coefficient (confidence) of each rectangular window is traversed and compared with the first threshold to determine all the moving windows of the second frame image compared to the first frame image.
  • each rectangular window is respectively calculated as moving windows.
  • the horizontal and vertical confidence levels of the currently calculated rectangular window are greater than or equal to the first threshold To determine that the rectangular window is not a moving window. Otherwise, if the confidence in at least one direction is less than the first threshold, the rectangular window is considered to be a moving window.
  • the first threshold may be obtained through experiments or experience of those skilled in the art.
  • the above-mentioned third part S3 "Motion Information Estimation" process also includes determining the motion information of each rectangular window, where the motion information includes the speed and direction of the displacement of the object.
  • the method includes: using the sum of absolute difference (SAD) algorithm to calculate the SAD values of all two adjacent pixels in the search range; selecting the smallest SAD value among all the SAD values, and according to The minimum SAD value determines the speed of each of the moving windows; wherein the speed is determined by at least one of the number of pixels horizontally displaced or the number of pixels vertically displaced within each moving window.
  • SAD sum of absolute difference
  • the search range is related to the hardware device, and may be preset.
  • the time interval between the first frame image and the second frame image is 1/30 seconds, then all processing procedures should be completed within the 1/30 second time interval, and at least two rectangular windows estimated as the search range, this embodiment 7 shows the search range of 7 rectangular windows, which can also be 3, 4 or other, which is not limited in this embodiment.
  • the amount of displacement in the x direction of the rectangular window is The number of pixels with the minimum SAD value, as shown in FIG. 7 shows a schematic diagram of searching for the minimum SAD value by using the SAD algorithm.
  • the search range includes three rectangular windows that extend horizontally along the positive direction of the x-axis and three rectangular windows that extend along the negative direction of the x-axis, then a total of six rectangular window ranges.
  • each rectangular window includes four horizontal pixel values.
  • the displacement of the rectangular window in the y direction is similar to the x direction. That is, replace the projected histogram in the x direction with the projected histogram in the y direction, and search within the upper and lower ranges to determine the minimum SAD value. The number of pixels.
  • the search range may be set and determined in advance.
  • the set of pixels in the horizontal direction shown in FIG. 7 is 7 pixels.
  • the SAD algorithm is:
  • Pre PorjHist_X j represents the average pixel value in the horizontal direction of the previous frame image
  • Pre PorjHist_Y j represents the average pixel value in the vertical direction of the previous frame image
  • Curr PorjHist_X j represents the average pixel value in the horizontal direction of the current frame image Value
  • Curr PorjHist_Y j represents the average pixel value in the vertical direction of the current frame image.
  • the calculated SAD values are:
  • the horizontal displacement of the rectangular frame is 3 pixels, which is the current motion window.
  • the horizontal displacement is 3 pixels, and the direction is horizontal to the right.
  • the process of calculating the horizontal displacement and vertical displacement of each moving window using formula (7) and formula (8) can refer to the above calculation process of the four average pixel values of a moving window in the horizontal direction. Repeat in detail.
  • M ⁇ N rectangular windows can also be traversed to calculate the speed of each rectangular window.
  • the horizontal displacement or vertical displacement may be zero.
  • the displacement and direction of the motion window are calculated by the SAD algorithm and the average pixel value of each rectangular window.
  • the motion detection algorithm with non-feature point detection, low computational complexity, and low memory access is used, compared to The existing feature point sampling algorithm reduces the calculation amount and improves the calculation efficiency.
  • the movement of the object can also be represented by "displacement”, which includes horizontal displacement and vertical displacement.
  • the horizontal displacement of the motion window in this embodiment is 3 pixels
  • the vertical displacement can also represent the number of pixels that the moving window moves in the vertical direction.
  • a flat area determination method is also provided in this embodiment, which can identify the low-texture area of the image, and improve the accuracy of the motion information by adjusting the correlation coefficient of the low-texture area, such as the confidence level.
  • the method further includes:
  • Step 301 Calculate the gradient value of each second rectangular window.
  • the gradient value includes the sum of the horizontal gradient value and the vertical gradient value in each second rectangular window
  • the horizontal gradient value is the difference between every two adjacent pixel values in the m horizontal pixel values
  • the vertical gradient value is the sum of the difference between every two adjacent pixel values in the n vertical pixel values.
  • the gradient value is calculated using the following formula (9) to formula (11):
  • Gradient_X represents the difference between the two values of the pixel values of pixels in the horizontal direction and each of adjacent
  • Curr ProjHist_X j denotes an average pixel value of the current frame in the horizontal direction of the j th pixel
  • Curr ProjHist_X j-1 represents the current frame The average pixel value of j-1 pixels in the horizontal direction
  • Gradient_Y represents the sum of the difference between each adjacent two pixel values in the vertical pixel value
  • Curr ProjHist_Y represents the average pixel value in the vertical direction of the jth pixel of the current frame
  • Curr ProjHist_Y j-1 represents the average pixel value in the vertical direction of the j-1 pixel in the current frame
  • Gradient represents the gradient value.
  • the process of calculating the gradient value includes:
  • the gradient value of a second rectangular window in the above image is 32.
  • Step 302 Determine the probability value of each second rectangular window according to the gradient value of each second rectangular window.
  • each gradient value is between 30 and 40 is [1,0], inclusive.
  • the smaller the gradient value the greater the probability value corresponding to this area; otherwise, the larger the gradient value, the smaller the corresponding probability value.
  • the corresponding probability value is 0.8.
  • this embodiment only exemplifies the probability value of the low-texture region converted into a total gradient value by a non-linear function in FIG. 10, and may also include other corresponding relationships.
  • the gradient value and probability The form of correspondence of values is not limited.
  • Step 303 Determine whether the probability value is greater than the second threshold.
  • the second threshold may be a number or a range of values.
  • the second threshold is 0.5, or 0.4 to 0.6.
  • Step 304 If it is determined that the probability value is greater than the second threshold, reduce the correlation coefficient of the second rectangular window corresponding to the probability value.
  • the calculated probability value is 0.8 greater than the second threshold value 0.5, that is, the probability value is higher than the second threshold value, then the confidence of this area is reduced, a specific way is to reduce the correlation coefficient of this area, The correlation coefficient is the confidence of the second rectangular window.
  • the probability value is less than or equal to the second threshold, which indicates that the rectangular window corresponding to the probability value is a low-texture area.
  • the method provided in this embodiment further includes the "multi-dimensional filter processing" process in S3, which can be applied to high-resolution images, and an anti-noise multi-dimensional filter algorithm: for the amount of displacement calculated for each window, If there is a large difference between the displacement of the adjacent area, or the displacement of the two frames before and after the image at the same position is large, then the unstable movement of the moving object speed or the frame of the moving object window is easy to overcome this.
  • the flow of the "multi-dimensional filtering process” may include the following steps:
  • the displacement of the target window in the horizontal direction x and y and the vertical direction are different from the average displacement of the adjacent multiple (such as 8) directional windows, for example, when the difference is greater than a threshold, you can calculate the The average displacement of the target window replaces the current displacement to achieve the denoising effect.
  • the process is similar to the process of noise reduction using a two-dimensional low-pass filter (lowpass filter) in the foregoing S1, and reference may be made to the above specific calculation process, which is not described here in this embodiment by way of example.
  • the method further includes: performing spatial domain filtering on the MxN second rectangular windows in the second frame image to obtain M'xN' third rectangular windows, and the speed of each third rectangular window And confidence, where both M'and N'are positive integers, and M'is less than M, and N'is less than N.
  • the displacement and confidence of every 2x2 rectangular windows are subjected to the maximum likelihood estimation (Maximum Likelihood Estimation) method to generate a displacement and confidence with a higher stability in the spatial domain.
  • the number of small original rectangular windows for example, if the original window number is 32x32 rectangular windows, it will be reduced to 16x16 after processing.
  • the maximum likelihood estimation method is to use a known sample result in statistics and use a certain model to derive a reliable result.
  • a weight sum model is used, with confidence as the The weight value is used to estimate a higher stability displacement, and the confidence level uses the average confidence level to estimate a higher stability confidence level.
  • the calculated displacement and confidence of the third rectangular window are [5.7, 0.675], and the displacement and confidence of the third rectangular window replace the original displacement and confidence of the 2 ⁇ 2 second rectangular windows, Therefore, the number of second rectangular windows is reduced, and the stability of spatial motion information is improved.
  • formula (14) and formula (15) can also be used in the vertical y-axis to calculate the displacement and confidence of the third rectangular window.
  • (W y ) ij (Q y ) ij
  • (W y ) ij represents the confidence of the rectangular window in the i-th row and j-th column of the vertical y-axis
  • (V y ) ij represents the i-th in the vertical y-axis
  • the displacement amount of the rectangular window in row j column, the displacement amount is the number of pixels moved
  • V y represents the target speed synthesized by the y-axis in the vertical direction
  • Q y represents the target confidence corresponding to the target speed V y .
  • a total of 32 ⁇ 32 second rectangular windows are included, and the weighted average is performed in units of 4 (2 ⁇ 2) rectangular windows, for example, V 00 , V 01 , V 10 , V 11
  • the four second rectangular windows are spatially filtered to obtain a third rectangular window V, and then the last four second rectangular windows such as V 02 , V 03 , V 12 and V 13 are weighted and combined to obtain another A third rectangular window, and so on, by traversing all the second rectangular windows, 16 ⁇ 16 third rectangular windows can be obtained, thereby improving the stability of the second image.
  • this embodiment only uses 4 second rectangular windows for merging as an example, and may also include more or less rectangular window combinations, such as combining 8 or 2 second rectangular windows into 1 third Rectangular windows and the like are not limited in this embodiment.
  • the multi-dimensional filtering process provided in this embodiment also includes time-domain filtering. As shown in Fig. 12, it can be realized by a time domain filter.
  • the displacement and confidence of the target window in the current frame and the window in the same position of the previous frame are subjected to a moving average to generate a displacement and confidence with higher stability in the time domain.
  • This moving average may be a weighted moving average Or an exponential moving average, this embodiment includes but is not limited to this.
  • the displacement amount (V t ) of the target window of the current frame and the displacement amount (V t-1 ) of the same position window of the previous frame are weighted to generate a moving average (SV t-1 ).
  • the motion detection method using the average pixel value as the projected histogram provided by the embodiment of the present application, because the projected histogram has a smaller memory space and a lower operation complexity than the feature point detection method in the prior art, so It has a significant improvement in reducing costs and power consumption.
  • the embodiments of the present application provide a motion detection algorithm with low memory access and high stability, including the use of projected histograms to detect low-texture areas, and the use of multi-dimensional filters to improve the stability of motion information.
  • the applied products provide functional services based on information such as image motion signs, directions, strength and location.
  • the method provided by the embodiments of the present application solves the problem of instability caused by noise in the detection of the direction and speed of motion at high resolution, including noise reduction processing that affects low-pass filtering, and motion information Multi-dimensional filter processing, and these processing methods can be implemented using simple multipliers, adders, and displacement operators, which has a significant improvement in reducing costs and power consumption.
  • this embodiment provides an image processing apparatus.
  • the apparatus 130 is used to implement the image processing method in the foregoing embodiment.
  • the device 130 may include an acquisition unit 1301 and a processing unit 1302.
  • the device 130 may also include more or fewer components, such as a sending unit, a storage unit, etc. Be limited.
  • the obtaining unit 1301 is configured to obtain the first frame image and the second frame image of the moving object.
  • the processing unit 1302 is configured to divide the first frame image into MxN first rectangular windows, divide the second frame image into MxN second rectangular windows, and calculate the first average pixel of each first rectangular window Value and the second average pixel value of each second rectangular window, each of the first average pixel value and the second average pixel value includes m average pixel values in the horizontal direction and an average value in n vertical directions Pixel value; at least one of the MxN second rectangular windows is determined according to the first average pixel value of the MxN first rectangular windows and the second average pixel value of the MxN second rectangular windows Sports window.
  • M represents the number of rectangular windows in the horizontal direction
  • N represents the number of rectangular windows in the vertical direction
  • M and N are positive integers
  • each of the MxN first rectangular windows and the MxN second rectangular windows The number includes m times n pixels, m is the number of pixels in the horizontal direction, n is the number of pixels in the vertical direction, and m and n are both positive integers.
  • the captured first frame image and second frame image may be implemented by hardware, such as a camera or a camera device.
  • the processing unit 1302 is specifically configured to: determine the first pixel area and the second pixel area of each first rectangular window, and determine each The third pixel area and the fourth pixel area of the second rectangular window; calculating m average pixel values in the horizontal direction in the first pixel area to obtain m horizontal average pixel values in the first average pixel value; calculating N vertical average pixel values in the second pixel area to obtain n vertical average pixel values in the first average pixel value; calculating m horizontal average pixel values in the third pixel area to obtain M average pixel values in the horizontal direction in the second average pixel value; calculating n average pixel values in the vertical direction in the fourth pixel area to obtain n average pixel values in the vertical direction in the second average pixel value .
  • first pixel area includes each first rectangular window and at least one first rectangular window horizontally adjacent to each first rectangular window
  • second pixel area includes each first A rectangular window and at least one first rectangular window vertically adjacent to each of the first rectangular windows
  • third pixel area includes each of the second rectangular windows and the horizontal phase of each of the second rectangular windows Adjacent at least one second rectangular window
  • fourth pixel area includes each second rectangular window and at least one second rectangular window vertically adjacent to each second rectangular window.
  • the processing unit 1302 is specifically configured to: calculate a first average pixel value of each first rectangular window and a value corresponding to each first rectangle The correlation coefficient of the second average pixel value of the second rectangular window of the window; determining whether the correlation coefficient is less than the first threshold; if so, determining that the second rectangular window corresponding to the correlation coefficient is a moving window.
  • the processing unit 1302 is further used to: calculate the SAD values of all adjacent two pixels in the search range using absolute error and the SAD algorithm; Select the smallest SAD value among the SAD values, and determine the speed of each of the moving windows according to the smallest SAD value; wherein the speed is determined by the number of pixels that are horizontally displaced or vertically At least one of the number of displaced pixels is determined.
  • the processing unit 1302 is further configured to: after calculating the correlation coefficient, calculate the gradient value of each second rectangular window, the The gradient value includes the sum of the horizontal gradient value and the vertical gradient value in each second rectangular window, and the horizontal gradient value is the sum of the difference between every two adjacent pixel values in the m horizontal pixel values, so The vertical gradient value is the sum of the difference between each adjacent two pixel values in the n vertical pixel values; the probability value of each second rectangular window is determined according to the gradient value of each second rectangular window; Whether the probability value is greater than a second threshold; if it is, reduce the correlation coefficient of the second rectangular window corresponding to the probability value.
  • the processing unit 1302 is further configured to: perform spatial domain filtering on the MxN second rectangular windows in the second frame image to obtain M 'xN' third rectangular windows, and the speed and confidence of each third rectangular window, where M'and N'are both positive integers, and M'is less than M, and N'is less than N.
  • the processing unit 1302 is further configured to: perform each rectangular window of the current frame image and each rectangular window at the same position of the previous frame image
  • Time domain filtering generates displacements and confidences with high stability in the time domain.
  • the time domain filtering for each rectangular window specifically includes moving average, such as weighted moving average or exponential moving average. No restrictions.
  • the units in the above device embodiments may be implemented by software, hardware, or a combination of software and hardware.
  • the software can run on a computer or processor.
  • an embodiment of the present application further provides a communication device.
  • the communication device may be a hardware device that is used to implement part or all of the steps of the image processing method described in the foregoing embodiment.
  • the communication device may be replaced by another device with a camera function.
  • the hardware device is a terminal.
  • the hardware device includes: a processor 1401, a memory 1402, and an image collector 1403.
  • the hardware device may include more or fewer components, or combine some components, or different components Arrangement, this application does not limit.
  • the processor 1401 may be used to implement the entire method flow of the first part S1, the second part S2, and the third part S3 in FIG. 1 of the embodiment of the present application.
  • the memory 1402 may be used as a random access memory RAM for storing in S2.
  • the image collector 1403 is used to capture images of objects, such as acquiring the first frame image and the second frame image.
  • the processor 1401 is the control center of the hardware device, and uses various interfaces and lines to connect the various parts of the entire hardware device, by running or executing the software programs and/or modules stored in the memory 1402, and calling the stored in the memory Data to perform various functions of the hardware device.
  • the processor 1401 may be composed of an integrated circuit (IC), for example, may be composed of a single packaged IC, or may be composed of multiple packaged ICs connected with the same function or different functions.
  • the processor may include only the CPU, or a combination of a GPU, a digital signal processor (DSP), and a control chip in the transceiver module.
  • DSP digital signal processor
  • the memory 1402 is used to store program code for executing the technical solution of the present application, and is controlled and executed by the processor 1401.
  • the processor 1401 is used to execute the program code stored in the memory 1402 to implement the image processing method in the foregoing embodiment.
  • the memory 1402 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM), or can store information and instructions
  • the other types of dynamic storage devices can also be electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), read-only disc (Compact Disc Read-Only Memory, CD-ROM) or other disc storage , Optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and Any other media that can be accessed by the computer, but not limited to this.
  • the memory may exist independently or may be integrated with the processor.
  • the image collector 1403 may include a camera or other unit or module with a shooting function.
  • the hardware device is the image processing apparatus provided in the above embodiment.
  • the function to be implemented by the acquiring unit 1301 may be implemented by the device
  • the processor 1401 controls the image collector 1403 to realize; the function to be realized by the processing unit 1302 can be realized by the processor 1401 of the device.
  • the hardware device may be a terminal device, and further, the terminal device may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (mobile terminal, MT) etc.
  • Terminal devices can be mobile phones, tablets, computers with wireless transceiver functions, virtual reality (virtual reality, VR) terminal devices, augmented reality (Augmented Reality, AR) terminal devices, industrial control (industrial control) ), wireless terminal in self-driving, wireless terminal in remote surgery, wireless terminal in smart grid, transportation terminal in transportation safety Wireless terminals, wireless terminals in smart cities, wireless terminals in smart homes, smart meters with wireless communication functions, smart water meters, environmental sensors, device tags, positioning tags, etc.
  • VR virtual reality
  • AR Augmented Reality
  • industrial control industrial control
  • the terminal device is connected to the network device in a wireless manner, and the network device can be connected to the core network device in a wireless or wired manner.
  • the core network device and the wireless access network device may be independent and different physical devices, or they may integrate the functions of the core network device and the logical function of the wireless access network device on the same physical device, or may be a physical device It integrates the functions of some core network devices and some of the wireless access network devices.
  • the terminal device may be fixed or mobile.
  • the terminal device provided in this embodiment can obtain motion detection information with high accuracy and high stability under the condition of low hardware cost, and cooperate with other algorithm modules to complete the following features:
  • the present application also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, it may include some or all of the steps in the embodiments of the image processing method provided by the present application.
  • the storage medium may be a magnetic disk, an optical disk, a read-only storage memory ROM, or a random storage memory RAM.
  • all or part can be implemented by software, hardware, firmware, or any combination thereof.
  • software When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer loads and executes the computer program, all or part of the processes or functions described in the above embodiments of the present application are generated.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a network node, computer, server or data center Transmission to another site, computer or server via wired or wireless means.
  • plural means two or more than two.
  • the words “first” and “second” are used to distinguish the same or similar items that have substantially the same functions and functions. Those skilled in the art may understand that the words “first” and “second” do not limit the number and execution order, and the words “first” and “second” do not necessarily mean different.

Abstract

公开了一种图像处理方法和装置,所述方法包括:获取拍摄运动物体的第一帧图像和第二帧图像;将所述第一帧图像分割成MxN个第一矩形窗,将所述第二帧图像分割成MxN个第二矩形窗,计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,所述第一平均像素值和所述第二平均像素值中的每个包括m个水平方向的平均像素值和n个垂直方向的平均像素值;根据MxN个第一矩形窗的第一平均像素值和MxN个第二矩形窗的第二平均像素值确定所述MxN个第二矩形窗中的至少一个运动窗。本方法利用求像素值的平均值算法,将原来图像的所有像素值简化为平均值并保存,从而达到了存储资源占用小,节约硬件成本的有益效果。

Description

一种图像处理方法和装置 技术领域
本申请涉及图像处理技术领域,尤其是涉及一种图像处理方法和装置。
背景技术
在拍照时,对于拍摄运动的物体会产生影像模糊的现象,进而使得成片率较低,拍摄效果不佳。为了提高抓拍运动物体的成片率,降低对运动物体拍摄的模糊度,需要实时地检测运动物体的速度和方向,然后再根据运动物体的速度和方向来控制曝光参数或者采用其它算法处理,比如在自动对焦的过程中,根据检测到的物体的运动速度和方向来控制对焦参数进而能够实时地持续追焦,达到拍摄出清晰图像的效果。
一般对于运动物体的检测方法,其中的一种是基于图像处理算法来实现。在这种基于图像处理算法检测物体运动的过程中,大部份是在拍摄图像中选取一系列的特征点,并通过对这些特征点的检测和分析来确定物体的运动向量。具体地,可以通过比较当前帧和前一帧两个图像的差别来判断物体的运动情况。在设备存储前一帧图像时,需要保存前一帧图像的所有像素信息,进而需要占用大量的存储空间,增加了硬件成本。
发明内容
本申请提供了一种图像处理方法和装置,通过使用低内存存取量的方法来确定物体的运动状况,并降低硬件成本。
第一方面,本申请提供了一种图像处理方法,该方法可以由终端设备执行,具体地,所述方法包括:取拍摄运动物体的第一帧图像和第二帧图像;将所述第一帧图像分割成MxN个第一矩形窗,将所述第二帧图像分割成MxN个第二矩形窗,M表示水平方向矩形窗的个数,N表示垂直方向矩形窗的个数,M和N均为正整数,所述MxN个第一矩形窗和所述MxN个第二矩形窗中的每个包括m乘以n个像素,m为水平方向的像素个数,n为垂直方向的像素个数,且m和n均为正整数;计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,所述第一平均像素值和所述第二平均像素值中的每个包括m个水平方向的平均像素值和n个垂直方向的平均像素值;根据MxN个第一矩形窗的所述第一平均像素值和所述MxN个第二矩形窗的所述第二平均像素值确定所述MxN个第二矩形窗中的至少一个运动窗。
本方面中,利用求像素值的平均值算法,将原来图像的所有像素值简化为平均值,可以仅缓存或保存平均值而不需要存储所有像素值,从而达到了存储资源占用小,节约硬件成本的有益效果。此外,本方法利用低运算量内存存取的运动检测算法可以快速地确定至少一个运动窗,还提高了计算效率。
结合第一方面,在第一方面的一种可能的实现方式中,所述计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,包括:确定每个第一矩形窗的第一像素区域和第二像素区域、以及确定所述每个第二矩形窗的第三像素区域和第四像素区域,所述第一像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗水平相邻的至少一 个第一矩形窗,所述第二像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗垂直相邻的至少一个第一矩形窗,所述第三像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗水平相邻的至少一个第二矩形窗,所述第四像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗垂直相邻的至少一个第二矩形窗;计算第一像素区域内m个水平方向的平均像素值,得到所述第一平均像素值中的m个水平方向的平均像素值;计算第二像素区域内n个垂直方向的平均像素值,得到所述第一平均像素值中的n个垂直方向的平均像素值;计算第三像素区域内m个水平方向的平均像素值,得到所述第二平均像素值中的m个水平方向的平均像素值;计算第四像素区域内n个垂直方向的平均像素值,得到所述第二平均像素值中的n个垂直方向的平均像素值。
本实现方式中,在确定每个第一矩形窗的第一像素区域和第二像素区域时,通过计算当前窗与相邻窗的各个像素的平均值,进而提高计算的精确度,即利用累加相邻窗的投影直方图来达到降噪效果,使得计算结果更准确。
结合第一方面,在第一方面的另一种可能的实现方式中,所述根据MxN个第一矩形窗的所述第一平均像素值和所述MxN个第二矩形窗所述第二平均像素值确定所述MxN个矩形窗中的至少一个运动窗,包括:计算每个第一矩形窗的第一平均像素值与对应于所述每个第一矩形窗的第二矩形窗的第二平均像素值的相关系数;判断所述相关系数是否小于第一阈值;如果是,则确定所述相关系数所对应的所述第二矩形窗为运动窗。可选的,所述相关系数包括置信度。
结合第一方面,在第一方面的又一种可能的实现方式中,所述方法还包括:利用绝对误差和SAD算法计算搜索范围内所有相邻两个像素的SAD值;在所有所述SAD值中选择最小的SAD值,并根据所述最小的SAD值确定每个所述运动窗的速度;其中所述速度由所述每个运动窗内发生水平位移的像素个数或发生垂直位移的像素个数中的至少一个确定。
结合第一方面,在第一方面的又一种可能的实现方式中,在计算所述相关系数后,所述方法还包括:计算所述每个第二矩形窗的梯度值,所述梯度值包括所述每个第二矩形窗内的水平梯度值与垂直梯度值之和,所述水平梯度值为m个水平方向像素值中每相邻的两个像素值之差的和,所述垂直梯度值为n个垂直方向像素值中每相邻的两个像素值之差的和;根据所述每个第二矩形窗的梯度值确定每个第二矩形窗的概率值;判断所述概率值是否大于第二阈值;如果是,则降低所述概率值对应的所述第二矩形窗的相关系数。
本实现方式中,由于低纹理区域的运动信息的精确度较低,所以通过计算梯度值的方法能够确定当前帧图像的所有低纹理区域,并降低这些低纹理区域的置信度,从而提高了整体运动信息的精确度。
结合第一方面,在第一方面的又一种可能的实现方式中,所述方法还包括:对所述第二帧图像中的MxN个第二矩形窗进行空间域滤波处理,得到M’x N’个第三矩形窗,以及每个第三矩形窗的速度和置信度,其中所述M’和N’均为正整数,且M’小于M,N’小于N。
本实现方式中,通过对运动信息进行的空间域滤波处理,以得到较稳定的位移量和置信度,从而提高了计算运动速度和方向的准确性,减少了噪声的干扰。
第二方面,本申请还提供了一种图像处理装置,所述装置包括用于执行前述第一方面以及第一方面各种实现方式中的方法的功能单元。
可选的,所述功能单元包括获取单元和处理单元。此外,还可以包括发送单元、存储单元等。
第三方面,本申请实施例还提供了一种通信装置,所述通信装置包括处理器,所述处理器与存储器耦合,所述存储器用于存储指令;所述处理器用于执行所述存储器中的指令,使得所述通信装置执行前述第一方面以及第一方面各种实现方式中的图像处理方法。
可选的,所述通信装置包括硬件设备,例如终端设备。
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述存储介质中存储有指令,当所述指令在计算机或处理器上运行时,用于执行前述第一方面以及第一方面各种实现方式中的图像处理方法。
第五方面,本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,当所述指令被计算机或处理器执行时,可实现前述第一方面以及第一方面各种实现方式中的图像处理方法。
第六方面,本申请实施例还提供了一种芯片系统,所述芯片系统包括处理器和接口电路,所述接口电路与所述处理器耦合,所述处理器用于执行计算机程序或指令,以实现前述第一方面以及第一方面各种实现方式中的方法;所述接口电路用于与所述芯片系统之外的其它模块进行通信。
本申请提供了一种图像处理方法和装置,所述方法利用求像素值的平均值算法,将原来图像的所有像素值简化为平均值,可以仅缓存或保存平均值而不需要存储所有像素值,从而达到了存储资源占用小,节约硬件成本的有益效果。本方法利用低运算量内存存取的运动检测算法可以快速地确定至少一个运动窗,提高了计算效率。
附图说明
图1为本申请实施例提供的一种图像处理方法的整体流程图;
图2为本申请实施例提供的一种图像处理方法的流程图;
图3为本申请实施例提供的一种像素值与权重值的对应关系的示意图;
图4为本申请实施例提供的一种划分像素区域的示意图;
图5为本申请实施例提供的一种利用像素值计算矩形窗的平均像素值的示意图;
图6为本申请实施例提供的一种低内存存储投影直方图的示意图;
图7为本申请实施例提供的一种利用SAD算法扫描搜索最小SAD值的示意图;
图8为本申请实施例提供的一种计算确定最小SAD值的示意图;
图9为本申请实施例提供的一种纹理区确定方法的流程图;
图10为本申请实施例提供的一种梯度值与概率值对应关系的示意图;
图11为本申请实施例提供的一种位移量与置信度的关系示意图;
图12为本申请实施例提供的一种经过多维滤波的示意图;
图13为本申请实施例提供的一种图像处理装置的结构示意图;
图14为本申请实施例提供的一种硬件设备的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请实施例中的技术方案,并使本申请实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本申请实施例中的技术方案 作进一步详细的说明。
在对本申请实施例的技术方案说明之前,首先对本申请实施例的技术场景做简要说明。
本申请应用于图像处理技术领域,尤其涉及对运动物体拍摄的图像的处理,通过获取和计算运动物体的信息,来确定物体的运动状况,并且在计算物体的运动信息过程中,达到减少计算量、降低内存存储信息、降低硬件成本的效果。
本实施例提供的方法涉及对包括相邻的两帧图像的一系列图像进行处理,所述两帧图像包括:前一时刻拍摄获得的第一帧图像和当前时刻拍摄获得的第二帧图像。所述第一帧图像和第二帧图像拍摄的物体相同,但物体由于运动,所以两帧图像的内容会有不同,本实施例中,通过获取两帧图像并对这两帧图像进行处理,能够得到物体的运动状况。
具体地,参见图1所示,为本申请实施例的一种图像处理方法的整体流程图,该流程中主要包括三部分处理过程,分别是第一部分(S1)、第二部分(S2)和第三部分(S3)。
其中,以对当前时刻获取的第二帧图像为例,在处理整体的流程中:
S1:图像前处理过程。主要包括:对获取的第二帧图像进行低通滤波处理,以及切割划分成多个(例如M×N个)矩形窗的过程。
S2:投影直方图计算。主要包括:对切割后的M×N个矩形窗进行投影直方图的计算,得到每个矩形窗的平均像素值,以及将计算的平均像素值保存在随机存取存储器(random access memory,RAM)中。
S3:运动信息估算。主要包括:运动信息估算和多维滤波处理,其中,运动信息估算可以确定物体在前后两帧图像发生的位移和方向,所述多维滤波处理则是对计算得到的位移和方向做进一步地的处理,来提高计算的稳定度。
在上述S1至S3的过程图中,还包括将计算获得的第二帧图像的投影直方图、第二帧图像的运动信息存储在RAM中,以及从所述RAM中获取第一帧图像的相关信息,例如第一帧图像的投影直方图和第一帧图像的运动信息等,以便在S3“运动信息估算”流程中使用。
下面对本实施例涉及的S1至S3中的各个部分流程进行详细说明。
本申请实施例提供的图像处理方法,可解决如何用低硬件成本的设计产生高精度与高稳定度的运动信息的计算问题。
如图2所示,提供的一种图像处理方法,该方法的执行主体可以是包括照相机的终端,比如用户设备(user equipment,UE),该终端的形态包括并不限于手机、电脑、或可穿戴设备。可替换的,该方法的执行主体可以是包括照相机的其他设备,例如网络监控设备或服务器等。所述方法包括:
步骤201:获取拍摄运动物体的第一帧图像和第二帧图像。
所述第一帧图像为t-1时刻拍摄的图像或前一帧图像;所述第二帧图像为t时刻拍摄的图像或当前帧图像。
本实施例中利用对第一帧图像和第二帧图像来确定物体的运动状况,所以在获取第二帧图像前,所述方还包括对所述第二帧图像进行低通滤波处理,来降低噪声,提高第二帧图像的分辨率。
S1具体包括:利用二维的低通滤波器(lowpass filter)对所述第二帧图像进行处理。如图3所示,将第二帧图像的像素用P 00至P 22这9个像素点表示,其中每个像素点对应一 个像素值。像素点也简称像素。例如P 00=P 01=P 02=P 10=P 12=P 20=P 21=P 22=100,P 11=150,由于P 11远大于周围的其它像素值,所以可以认为该像素值P 11为一个噪声点。
需要通过低通滤波器为这一噪声点去噪,所述去噪的过程包括:计算一个目标像素值(例如P 11′表示)来替换该噪声点,所述计算过程为:将与该噪声点相关的多个像素值分别乘以各自对应的卷积权重值,再求平均值,
Figure PCTCN2018119162-appb-000001
将计算得到目标像素值P 11′=112替换原P 11=150,使得所述目标像素值与周围其他像素值相近似,通过去噪操作使得后续计算得到准确的运动相关信息。可以理解地,其他的噪声点也可以采用相同的方法去噪,本实施例对此不再赘述。
其中,所述每个像素所对应卷积权重可依据环境亮度或相机参数,如ISO(国际标准组织)值来设置,进而得到最好的去噪声效果;此外低通滤波器可以利用乘法器、加法器、位移运算器来实现,有助于降低硬件成本。
步骤202:将所述第一帧图像分割成MxN个第一矩形窗,将所述第二帧图像分割成MxN个第二矩形窗。
M表示水平方向矩形窗的个数,N表示垂直方向矩形窗的个数,M和N均为正整数,所述MxN个第一矩形窗和所述MxN个第二矩形窗中的每个包括m乘以n个像素,m为水平方向的像素个数,n为垂直方向的像素个数,且m和n均为正整数。
步骤203:计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,所述第一平均像素值和所述第二平均像素值中的每个包括m个水平方向的平均像素值和n个垂直方向的平均像素值。
进一步地,步骤202具体包括:确定每个第一矩形窗的第一像素区域和第二像素区域、以及确定所述每个第二矩形窗的第三像素区域和第四像素区域,所述第一像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗水平相邻的至少一个第一矩形窗,所述第二像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗垂直相邻的至少一个第一矩形窗,所述第三像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗水平相邻的至少一个第二矩形窗,所述第四像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗垂直相邻的至少一个第二矩形窗。
步骤203包括:计算第一像素区域内m个水平方向的平均像素值,得到所述第一平均像素值中的m个水平方向的平均像素值。
计算第二像素区域内n个垂直方向的平均像素值,得到所述第一平均像素值中的n个垂直方向的平均像素值。
计算第三像素区域内m个水平方向的平均像素值,得到所述第二平均像素值中的m个水平方向的平均像素值。
计算第四像素区域内n个垂直方向的平均像素值,得到所述第二平均像素值中的n个垂直方向的平均像素值。
具体地,如图4所示,对于第一帧图像,由若干个像素值组成,将该第一帧图像划分成3x3(共9)个矩形窗,M=3,N=3。在第一帧图像中共包括9个第一矩形窗,分别是: P1、P2、P3、P4、P5、P6、P7、P8和P9。对这9个矩形窗中每一个划分第一像素区域和第二像素区域。以第一矩形窗P5举例,与P5水平相邻的两个第一矩形窗分别是P4和P6,则所述第一像素区域包括P5、P4和P6。同理地,与P5垂直相邻的第一矩形窗有P2和P8,则所述第二像素区域包括P5、P2和P8。
对于角落的第一矩形窗,比如P1,其所述第一像素区域为P1和P2,所述第二像素区域为P1和P4;对于位于边缘区域的第一矩形窗,比如P4,其所述第一像素区域为P4和P5,所述第二像素区域为P4、P1和P7。
同理地,对于第二帧图像,其划分的相同数量3x3个第二矩形窗,其确定每个矩形窗的第三像素区域和第四像素区域的方法过程与本实施例的第一像素区域和第二像素区域相同,本实施例对此不再赘述。
如图5所示,在划分的每个第一矩形窗内,还包括m乘以n个像素,每个像素对应一个像素值,例如m=4,n=3。按照如下公式(1)计算每个第一矩形窗的第一像素区域的平均像素值,按照公式(2)计算每个第一矩形窗的第二像素区域的平均像素值。
Figure PCTCN2018119162-appb-000002
Figure PCTCN2018119162-appb-000003
其中,X j表示水平方向的平均像素值,Y i表示垂直方向的平均像素值,int表示取整,P表示像素值,i,j均为常数,i的取值范围是[0,m-1],j的取值范围是[0,n-1],且均包括端值。
可选的,所述X j也可以表示为“PorjHist_X”,所述Y i也可以表示为“PorjHist_Y”。
例如对于第一矩形窗P5,计算其第一像素区域内4个水平方向的平均像素值,得到所述第一平均像素值中的4个水平方向的平均像素值(X2,X2,X3和X4),具体为:
Figure PCTCN2018119162-appb-000004
Figure PCTCN2018119162-appb-000005
Figure PCTCN2018119162-appb-000006
Figure PCTCN2018119162-appb-000007
第一矩形窗P5,计算第二像素区域内3个垂直方向的平均像素值,得到所述第一平均像素值中的3个垂直方向的平均像素值(Y1,Y2和Y3),具体为:
Figure PCTCN2018119162-appb-000008
Figure PCTCN2018119162-appb-000009
Figure PCTCN2018119162-appb-000010
通过计算得到第一矩形窗P5的4个水平方向的平均像素值{54,64,74,84}和3个垂直方向的水平像素值{68,69,70},共7个平均像素值。以及,还包括保存第一矩形窗P5所对应的7个平均像素值。
同理地,对于第一帧图像的其他8个第一矩形窗也采用相同的方法,均可以计算得到7个平均像素值,包括4个水平方向的平均像素值和3个垂直方向的水平像素值,并保存这些平均像素值,以为后续计算做准备。
可以理解地,对于第二帧图像,由于也划分了相同的MxN个第二矩形窗,且每个第二矩形窗中包括m乘以n个像素,m=4,n=3,所以按照上述的公式(1)和(2)均能计算出相对应的平均像素值。
本实施例中,利用求像素值的平均值的算法,将原来自多个像素值简化为平均值,可以仅缓存或保存平均值而不需要存储所有像素值,例如对于第一矩形窗P5,只需要存储7个平均像素值,相比于原来需要存储12个像素所对应的像素值而言,节约了存储空间,对应的计算量也会减少,从而达到了降低存储资源,节约硬件成本的有益效果。
此外,在确定每个第一矩形窗的第一像素区域和第二像素区域时,通过计算当前窗与相邻窗的各个像素的平均值,进而提高计算的精确度,即利用累加相邻窗的投影直方图来达到降噪效果。
可选的,如图6所示,本方法将原每一行或每一列的大量像素值通过计算的平均像素值来替代,相当于存储将每一列像素值的水平投影值和垂直投影值,即可以通过投影直方图来表示一帧图像的像素信息,参见图6,每个矩形窗分别在x轴方向和y轴方向做投影。
利用本申请实施例提供的方法,对于一帧图像而言,需要存储的平均像素值的个数为63(7×9)相比于原来存储108(12×9)个像素值节约了存储空间,减少了硬件成本。
步骤204:根据MxN个第一矩形窗的所述第一平均像素值和所述MxN个第二矩形窗的所述第二平均像素值确定所述MxN个第二矩形窗中的至少一个运动窗。
其中步骤204具体包括:计算每个第一矩形窗的第一平均像素值与对应于所述每个第一矩形窗的第二矩形窗的第二平均像素值的相关系数;判断所述相关系数是否小于第一阈值,如果是,则确定所述相关系数所对应的所述第二矩形窗为运动窗;如果否,即所述相关系数大于等于第一阈值,则确定其不是运动窗。
所述运动窗可以理解为,相比于前一帧图像,当前图像中的物体位移发生变化的区域。
具体地,计算每个第一矩形窗的第一平均像素值与对应于所述每个第一矩形窗的第二矩形窗的第二平均像素值的相关系数,包括:
按照上述公式(1)和公式(2)计算,得到每个第一矩形窗的平均像素值和每个第二矩形窗的平均像素值,且计算所述相关系统和比较时,均是对第一帧图像和第二帧图像中的相同位置像素进行比较。
其中利用以下公式(3)至公式(6)计算所述相关系数,所述相关系数包括水平方向和垂直方向的相关系数。进一步地,所述相关系数为置信度,用“Q”表示,其中“Qx”表示水平方向的置信度,“Qy”表示垂直方向的置信度。
水平方向:
Figure PCTCN2018119162-appb-000011
Figure PCTCN2018119162-appb-000012
Figure PCTCN2018119162-appb-000013
Figure PCTCN2018119162-appb-000014
垂直方向:
Figure PCTCN2018119162-appb-000015
Figure PCTCN2018119162-appb-000016
Figure PCTCN2018119162-appb-000017
Figure PCTCN2018119162-appb-000018
在一具体的应用例中,以假设当前帧(Curr)图像的第二矩形窗的水平方向的m个平均像素值为{54,64,74,84},前一帧(Pre)图像的第一矩形窗的水平方向的m个平均像素值为{100,20,150,40},则按照上述公式判断当前帧图像的第二矩形窗是否为运动窗,包括:
水平方向:
I=54 2+64 2+74 2+84 2=19544,
T=100 2+20 2+150 2+40 2=34500,
I′×T′=54×100+64×20+74×150+84×40=21140,
Figure PCTCN2018119162-appb-000019
一般地,相关系数,即所述置信度Q的取值范围为[-1,1],包括端值,若计算的相关系数越接近1,则表示两个信号相似;反之越接近-1,则表示两个信号相差越大。本实施例中,假设第一阈值为0.9,则比较0.753<0.9,即相关系数小于第一阈值,则确定该矩形窗为运动窗。
按照同样的方法,遍历计算每个矩形窗的相关系数(置信度),并与第一阈值相比较,确定第二帧图像相比于第一帧图像的所有运动窗。
需要说明的是,本实施例中分别计算每个矩形窗的水平方向和垂直方向是否为运动窗,当只有当前计算的矩形窗的水平方向置信度和垂直方向置信度均大于等于第一阈值时,才确定该矩形窗不是运动窗。否则,如果至少一个方向的置信度小于所述第一阈值,则认为该矩形窗为运动窗。
可选的,所述第一阈值可通过试验或本领域技术人员经验获得。
本实施例提供的方法,利用低内存的投影直方图计算每个矩形窗的平均像素值和相关系数,能够减小存储像素值所占用的存储资源,降低硬件成本,同时运算量减少,从而提高了确定运动窗的计算效率。例如以分割图像的矩形窗大小为12x9(m=12,n=9)的二维八位比特(bit)图举例,其需要储存的空间为12x9x8=864位比特,经过投影直方图的计算后,其所占用的储存空间只需要12x8+9x8=168位比特。
另外,本实施例中,上述第三部分S3“运动信息估算”流程中,还包括确定每个矩形窗的运动信息,所述运动信息包括物体发生位移的速度和方向。
具体地,所述方法包括:利用绝对误差和(sum of absolute difference,SAD)算法计算搜索范围内所有相邻两个像素的SAD值;在所有所述SAD值中选择最小的SAD值,并根据所述最小的SAD值确定每个所述运动窗的速度;其中所述速度由所述每个运动窗内发生水平位移的像素个数或发生垂直位移的像素个数中的至少一个确定。SAD的具体算法属于现有技术,可参照现有的技术中的计算过程,此处不做赘述。
其中,所述搜索范围(Search Range)与硬件设备有关,可以是预先设定好的。比如第一帧图像与第二帧图像的时间间隔是1/30秒,则在1/30秒的时间间隔内要完成所有处理过程,大概估算的至少两个矩形窗作为搜索范围,本实施例中图7示出的是7个矩形窗的搜索范围,还可以是3个、4个或其它个,本实施例对此不予限制。
进一步地,在水平方向遍历搜寻一固定的范围,以像素为位移单位,采用x方向的投影直方图和SAD算法,计算运动区域单个矩形窗的水平像素位移,矩形窗的x方向位移量即为有最小SAD值的像素个数,如图7示出了一种利用SAD算法扫描搜索最小SAD值的示意图。一般地,所述搜索范围包括水平沿x轴正方向延伸3个矩形窗,沿x轴负方向延伸3个矩形窗,则共6个矩形窗范围。结合图8所示,每个矩形窗包括4个水平方向的像素值,则搜索最小SAD值时,从第一个矩形窗位置每次按照一个像素进行平移,直到当前矩形窗的平均像素值与前一帧的平均像素值相同或相近时位置。
同理地,在垂直y方向上,矩形窗的y方向位移量与x方向相似,即将x方向的投影直方图更换成y方向的投影直方图,且在上下范围内进行搜寻来确定最小SAD值的像素个数。
可选的,所述搜索范围可预先设置和确定。图7所示的一组水平方向的像素范围为7个像素(pixel)。
所述SAD算法为:
水平方向,
Figure PCTCN2018119162-appb-000020
垂直方向,
Figure PCTCN2018119162-appb-000021
其中,Pre PorjHist_X j表示前一帧图像的一个水平方向的平均像素值,Pre PorjHist_Y j表示前一帧图像的一个垂直方向的平均像素值;Curr PorjHist_X j表示当前帧图像的一个水平方向的平均像素值,Curr PorjHist_Y j表示当前帧图像的一个垂直方向的平均像素值。
本实施例中,如图8所示,以当前帧图像的一个运动窗内的4个水平方向的平均像素 值为例,假设前一帧(第一帧)图像的水平方向的平均像素值(Pre PorjHist_X j)为{84,74,64,54},当前帧(第二帧)图像的水平方向的平均像素值(Curr PorjHist_X j)为{54,64,74,84}。
计算的各个SAD值分别为:
SAD1=|84-54|+|74-64|+|64-74|+|54-84|=80,
SAD2=|74-54|+|64-64|+|54-74|+|64-84|=60,
SAD3=|64-54|+|54-64|+|64-74|+|74-84|=40,
SAD4=|54-54|+|64-64|+|74-74|+|84-84|=0。
比较SAD1至SAD4,最小的SAD值为SAD4=0,相比于前一帧图像,一共移动了4个像素位置,如图8所示,矩形框的水平位移为3个像素,即当前运动窗的水平位移为3个像素,方向为水平向右。
同理地,按照上述公式(8)计算出每个运动窗的垂直方向的所有SAD值,并根据所有SAD值中最小的SAD值确定垂直方向的位移和方向;最后根据计算的该运动窗在水平方向和垂直方向的位移像素和方向,合成确定该运动窗的实际运动速度和方向。
具体地,利用公式(7)和公式(8)计算每个运动窗的水平位移和垂直位移的过程,可参考上述水平方向的一个运动窗的4个平均像素值的计算过程,本实施例不详细赘述。
需要说明的是,按照该方法还可以遍历M×N个矩形窗,计算出每个矩形窗的速度,其中,对于非运动窗,其水平位移或者垂直位移可能为0。
本实施例中,通过SAD算法和每个矩形窗的平均像素值计算出运动窗的位移和方向,采用了非特征点检测、低运算量且低内存存取量的运动检测算法,相比于现有的特征点采样算法,减少了运算量,提高了运算效率。
需要说明的是,还可以通过“位移量”来表示物体的运动情况,所述位移量包括水平位移量和垂直位移量,进一步地,本实施例中所述运动窗的水平位移为3个像素,可以表示为所述运动窗的水平位移量为3,同理地,垂直方向的位移量也可以表示运动窗在垂直方向移动的像素个数。
可选的,本实施例中还提供了一种平坦区确定方法,可以辨识图像的低纹理区域,并通过调整低纹理区域的相关系数,比如置信度,来提高运动信息的准确性。
具体地,如图9所示,在上述步骤204中计算第二帧图像的每个矩形窗的相关系数之后,所述方法还包括:
步骤301:计算所述每个第二矩形窗的梯度值。
其中所述梯度值包括所述每个第二矩形窗内的水平梯度值与垂直梯度值之和,所述水平梯度值为m个水平方向像素值中每相邻的两个像素值之差的和,所述垂直梯度值为n个垂直方向像素值中每相邻的两个像素值之差的和。
具体地,利用下面公式(9)至公式(11)计算所述梯度值:
Figure PCTCN2018119162-appb-000022
Figure PCTCN2018119162-appb-000023
公式(11)  Gradient=Gradient_X+Gradient_Y。
其中,Gradient_X表示水平方向的像素值中每相邻的两个像素值之差的和,Curr ProjHist_X j表示当前帧第j个像素的水平方向的平均像素值,Curr ProjHist_X j-1表示当前帧第j-1个像素的水平方向的平均像素值;Gradient_Y表示垂直方向像素值中每相邻的两个像素值之差的和,Curr ProjHist_Y表示当前帧第j个像素的垂直方向的平均像素值,Curr ProjHist_Y j-1表示当前帧第j-1个像素的垂直方向的平均像素值;Gradient表示所述梯度值。
在一具体实施例中,以表1所示的4个水平方向的平均像素值和3个垂直方向的平均像素值为例,
Curr ProjHist_X 54 64 74 84
Curr ProjHist_Y 68 69 70  
表1
计算梯度值的过程包括:
Gradient_X=|64-54|+|74-64|+|84-74|=30,
Gradient_Y=|69-68|+|70-69|=2,
Gradient=Gradient_X+Gradient_Y=30+2=32。
所以,计算后得到上述图像中的一个第二矩形窗的梯度值为32。
同理地,其他矩形窗的梯度值也可以通过上述公式(9)至公式(11)计算得出,本实施例此处不再一一赘述。
步骤302:根据所述每个第二矩形窗的梯度值确定每个第二矩形窗的概率值。
其中,每个梯度值与平坦区的概率(Ratio_SArea)之间存在对应关系。如图10所示,梯度值在30到40之间对应的概率为[1,0],包括端值。由图10可见,梯度值越小,即代表此区域对应的概率值越大;反之,梯度值越大,对应的概率值越小。
本实施例中,当梯度值为32时,对应的概率值为0.8。
可以理解地,本实施例仅例举了图10一种总的梯度值经过一非线性函数转换成的低纹理区的概率值,还可以包括其他的对应关系,本实施例对梯度值与概率值的对应关系的表现形式不进行限制。
步骤303:判断所述概率值是否大于第二阈值。
可选的,所述第二阈值可以是一个数,也可以是一个取值范围。比如所述第二阈值为0.5,或者0.4至0.6。
步骤304:如果确定所述概率值大于第二阈值,则降低所述概率值对应的所述第二矩形窗的相关系数。
本实施例中,计算的概率值为0.8大于第二阈值0.5,即概率值高于第二阀值,则将此区域的置信度降低,一种具体的方式是,降低此区域的相关系数,所述相关系数为该第二矩形窗的置信度。
其中,概率值小于等于第二阈值,表示该概率值所对应的矩形窗为低纹理区域。按照上述步骤301至304,遍历第二帧图像的所有第二矩形窗,判断每个第二矩形窗是否为低 纹理区域,并将确定的所有低纹理区域的置信度降低,从而来提升整体运动信息的精确度。
本实施例中,由于低纹理区域的运动信息的精确度较低,所以通过计算梯度值的方法能够确定当前帧图像的所有低纹理区域,并降低这些低纹理区域的置信度,从而提高了整体运动信息的精确度。
可选的,本实施例所提供的方法还包括S3中“多维滤波处理”的流程,可应用于高分辨率的图像,抗噪声的多维滤波算法:对于每个窗口所计算出的位移量,若与邻近区域的位移量相差较大,或是前后两帧图像在同一位置的位移量相差较大,则对于运动物体速度或运动物体窗口的框取容易产生不稳定跳动的现象,为克服这一现象,采用多维滤波处理。
进一步地,所述“多维滤波处理”的流程可以包括如下步骤:
1、若目标窗口的水平方向x和y垂直方向的位移量均与邻近的多个(比如8个)方向窗口的平均位移量相差较大,例如相差大于一阀值时,则可以通过计算该目标窗口的平均位移量来替换当前的位移量,以达到去噪效果。
具体地,过程与前述S1中利用二维的低通滤波器(lowpass filter)降噪的过程相似,可参见上述具体计算过程,本实施例此处不举例赘述。
2、所述方法还包括:对所述第二帧图像中的MxN个第二矩形窗进行空间域滤波处理,得到M’x N’个第三矩形窗,以及每个第三矩形窗的速度和置信度,其中所述M’和N’均为正整数,且M’小于M,N’小于N。
具体地,每2x2个矩形窗口的位移量和置信度,经过最大似然估计(Maximum likelihood estimation)法,产生一个空间域稳定度较高的位移量和置信度,经过此步骤处理后,能够减小原矩形窗的个数,例如原本窗口数若是32x32个矩形窗,则处理后会降为16x16个。其中所述最大似然估计法,为统计学中利用已知的样本结果,利用某个模型推出一可靠的结果的方式,本实施例利用权重和的模型(weight sum model),以置信度作为权重值,来推估一稳定度较高的位移量,而置信度则利用平均置信度来推估一稳定度较高的置信度,水平方向x的计算参见下面的公式(12)和公式(13)。
Figure PCTCN2018119162-appb-000024
Figure PCTCN2018119162-appb-000025
其中,(W x) ij=(Q x) ij,(W x) ij表示水平方向x轴的第i行第j列矩形窗的置信度,(V x) ij表示水平方向x轴的第i行第j列矩形窗的位移量,所述位移量为移动的若干个像素个数;V x表示水平方向x轴合成的目标速度,Q x表示目标速度V x所对应的目标置信度。
具体地,如图11所示,以选取的M×N个第二矩形窗为2×2为例,M=2,N=2,每个矩形窗对应的位移量分别{5,7,6,20},利用上述实施例的方法计算每个第二矩形窗所对应的置信度为{0.8,0.8,0.9,0.2},对这4个第二矩形窗进行空间域滤波处理,生成1个第三矩形窗,M’=1,N’=1,并且计算该第三矩形窗的速度和置信度。
Figure PCTCN2018119162-appb-000026
Figure PCTCN2018119162-appb-000027
所以,计算后的第三矩形窗的位移量和置信度为[5.7,0.675],该第三矩形窗的位移量和置信度替换原来2×2个第二矩形窗的位移量和置信度,从而减少了第二矩形窗的数量,提高了空间运动信息的稳定度。
同理地,在垂直方向y轴还可以采用下面的公式(14)和公式(15)来计算第三矩形窗的位移量和置信度。
Figure PCTCN2018119162-appb-000028
Figure PCTCN2018119162-appb-000029
其中,(W y) ij=(Q y) ij,(W y) ij表示垂直方向y轴的第i行第j列矩形窗的置信度,(V y) ij表示垂直方向y轴的第i行第j列矩形窗的位移量,所述位移量为移动的若干个像素个数;V y表示垂直方向y轴合成的目标速度,Q y表示目标速度V y所对应的目标置信度。
如图12所示,在空间域滤波过程中,例如包括总共32×32个第二矩形窗,以4(2×2)个矩形窗为单位进行加权平均,例如将V 00,V 01,V 10,V 11这4个第二矩形窗进行空间域滤波得到一个第三矩形窗V,然后再对后4个第二矩形窗例如V 02,V 03,V 12,V 13进行加权合并得到另一个第三矩形窗,以此类推,遍历所有第二矩形窗,可以得到16×16个第三矩形窗,进而提高了第二图像的稳定度。
需要说明的是,本实施例仅以4个第二矩形窗进行合并举例,还可以包括更多或者更少的矩形窗组合,比如以8个或2个第二矩形窗合并成1个第三矩形窗等,本实施例对此不予限制。
3、本实施例提供的多维滤波处理过程中,还包括时间域滤波。如图12所示,可以通过一时间域滤波器来实现。
具体地,将当前帧目标窗口与前一帧相同位置窗口的位移量和置信度,做一移动平均,产生一个时间域稳定度较高的位移量和置信度,此移动平均可以是加权移动平均或是指数移动平均,本实施例包括但不局限于此。
例如将当前帧目标窗口的位移量(V t)与前一帧相同位置窗口的位移量(V t-1)进行加权平均,生成移动平均值(SV t-1)。
本实施例提供的图像处理方法包括以下有益效果:
第一、本申请实施例提供的利用平均像素值做投影直方图的运动检测方法,由于投影直方图与现有技术的特征点检测的方法相比,其内存空间小,运算复杂度低,因此对于降低成本与功耗具有明显的改善。
第二、本申请实施例提供一种低内存存取量和高稳定度的运动检测算法,包括利用投影直方图做低纹理区的检测,以及利用多维滤波器提升运动信息的稳定度,可对应用的产品提供基于图像的运动标志、方向、强弱和位置等信息的功能服务。
第三、本申请实施例提供的方法解决了高分辨率下,运动方向与速度检出受噪声所造成的不稳定问题,包括对影响进行低通滤波的降噪处理,以及对运动信息进行的多维滤波处理,且这些处理方法均可以利用简单的乘法器、加法器以及位移运算器来实现,对于降低成本与功耗具有明显的改善。
参见图13,为本实施例提供的一种图像处理装置,该装置130用于实现前述实施例中的图像处理方法。
如图13所示,所述装置130可以包括获取单元1301和处理单元1302,此外,所述装置130还可以包括更多或更少的部件,例如发送单元、存储单元等,本申请对此不进行限定。
获取单元1301,用于获取拍摄运动物体的第一帧图像和第二帧图像。
处理单元1302,用于将所述第一帧图像分割成MxN个第一矩形窗,将所述第二帧图像分割成MxN个第二矩形窗,计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,所述第一平均像素值和所述第二平均像素值中的每个包括m个水平方向的平均像素值和n个垂直方向的平均像素值;根据所述MxN个第一矩形窗的所述第一平均像素值和所述MxN个第二矩形窗的所述第二平均像素值确定所述MxN个第二矩形窗中的至少一个运动窗。
其中,M表示水平方向矩形窗的个数,N表示垂直方向矩形窗的个数,M和N均为正整数,所述MxN个第一矩形窗和所述MxN个第二矩形窗中的每个包括m乘以n个像素,m为水平方向的像素个数,n为垂直方向的像素个数,且m和n均为正整数。
其中,所述拍摄的第一帧图像和第二帧图像可以由硬件来实现,比如摄像头或摄像装置。
可选的,在本实施例的一种具体的实现方式中,所述处理单元1302具体用于:确定每个第一矩形窗的第一像素区域和第二像素区域、以及确定所述每个第二矩形窗的第三像素区域和第四像素区域;计算第一像素区域内m个水平方向的平均像素值,得到所述第一平均像素值中的m个水平方向的平均像素值;计算第二像素区域内n个垂直方向的平均像素值,得到所述第一平均像素值中的n个垂直方向的平均像素值;计算第三像素区域内m个水平方向的平均像素值,得到所述第二平均像素值中的m个水平方向的平均像素值;计算第四像素区域内n个垂直方向的平均像素值,得到所述第二平均像素值中的n个垂直方向的平均像素值。
其中所述第一像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗水平相邻的至少一个第一矩形窗,所述第二像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗垂直相邻的至少一个第一矩形窗,所述第三像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗水平相邻的至少一个第二矩形窗,所述第四像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗垂直相邻的至少一个第二矩形窗。
可选的,在本实施例的另一种具体的实现方式中,所述处理单元1302具体用于:计 算每个第一矩形窗的第一平均像素值与对应于所述每个第一矩形窗的第二矩形窗的第二平均像素值的相关系数;判断所述相关系数是否小于第一阈值;如果是,则确定所述相关系数所对应的所述第二矩形窗为运动窗。
可选的,在本实施例的又一种具体的实现方式中,所述处理单元1302还用于:利用绝对误差和SAD算法计算搜索范围内所有相邻两个像素的SAD值;在所有所述SAD值中选择最小的SAD值,并根据所述最小的SAD值确定每个所述运动窗的速度;其中所述速度由所述每个运动窗内发生水平位移的像素个数或发生垂直位移的像素个数中的至少一个确定。
可选的,在本实施例的又一种具体的实现方式中,所述处理单元1302还用于:在计算所述相关系数后,计算所述每个第二矩形窗的梯度值,所述梯度值包括所述每个第二矩形窗内的水平梯度值与垂直梯度值之和,所述水平梯度值为m个水平方向像素值中每相邻的两个像素值之差的和,所述垂直梯度值为n个垂直方向像素值中每相邻的两个像素值之差的和;根据所述每个第二矩形窗的梯度值确定每个第二矩形窗的概率值;判断所述概率值是否大于第二阈值;如果是,则降低所述概率值对应的所述第二矩形窗的相关系数。
可选的,在本实施例的又一种具体的实现方式中,所述处理单元1302还用于:对所述第二帧图像中的MxN个第二矩形窗进行空间域滤波处理,得到M’x N’个第三矩形窗,以及每个第三矩形窗的速度和置信度,其中所述M’和N’均为正整数,且M’小于M,N’小于N。
可选的,在本实施例的又一种具体的实现方式中,所述处理单元1302还用于:对当前帧图像的每个矩形窗和前一帧图像的相同位置的每个矩形窗做时间域滤波,产生时间域稳定度较高的位移量和置信度,其中所述对每个矩形窗做时间域滤波具体包括做移动平均,例如加权移动平均或者指数移动平均,本实施例对此不进行限制。
可以理解地,以上装置实施例中的单元可以由软件、硬件或软件与硬件结合实现。所述软件可运行于计算机或处理器上。
参见图14,本申请实施例还提供了一种通信装置,所述通信装置可以是一种硬件设备,用于实现前述实施例所述的图像处理方法的部分或全部步骤。可替换地,该通信装置也可以是由其他具有照相功能的装置替代。可选的,所述硬件设备为终端。
如图14所示,该硬件设备包括:处理器1401、存储器1402和图像采集器1403,此外,该硬件设备中还可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置,本申请对此不进行限定。
其中,处理器1401可用于实现本申请实施例图1中的第一部分S1、第二部分S2和第三部分S3的全部方法流程,存储器1402可以作为随机存取存储器RAM,用于存储在S2中计算的所述第二帧图像的投影直方图和在S3中计算的第二帧图像的运动信息,以及还用于存储第一帧图像的投影直方图和运动信息,以便将这些信息在S3的“运动信息估算”中使用。所述图像采集器1403用于拍摄物体的图像,比如获取第一帧图像和第二帧图像。
进一步地,处理器1401为硬件设备的控制中心,利用各种接口和线路连接整个硬件设备的各个部分,通过运行或执行存储在存储器1402内的软件程序和/或模块,以及调用存储在存储器内的数据,以执行所述硬件设备的各种功能。
处理器1401可以由集成电路(integrated circuit,IC)组成,例如可以由单颗封 装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器可以仅包括CPU,也可以是GPU、数字信号处理器(digital signal processor,DSP)、及收发模块中的控制芯片的组合。
存储器1402用于存储执行本申请技术方案的程序代码,并由处理器1401来控制执行。所述处理器1401用于执行存储器1402中存储的程序代码,实现上述实施例中的图像处理方法。
进一步地,存储器1402可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,也可以和处理器集成在一起。
图像采集器1403可以包括摄像头或者具有拍摄功能的其它单元或模块。
示例性地,所述硬件设备为上述实施例提供的图像处理装置,进一步地,在本申请图13所示的图像处理装置实施例中,所述获取单元1301所要实现的功能可以由该设备的处理器1401控制图像采集器1403来实现;处理单元1302所要实现的功能则可以由该设备的处理器1401实现。
在具体实现中,所述硬件设备可以是终端设备,进一步地,所述终端设备也可以称为终端(Terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(Augmented Reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、具有无线通信功能的智能电表、智能水表、环境感应器、设备标签、定位标签等等。
终端设备通过无线的方式与网络设备相连,网络设备则可以无线或有线方式与核心网设备连接。核心网设备与无线接入网设备可以是独立的不同的物理设备,也可以是将核心网设备的功能与无线接入网设备的逻辑功能集成在同一个物理设备上,还可以是一个物理设备上集成了部分核心网设备的功能和部分的无线接入网设备的功能。终端设备可以是固定位置的,也可以是可移动的。
本实施例提供的终端设备可以在低硬件成本的条件下,得到高精确度和高稳定性的运动检测信息,并且配合其它算法模块可以完成以下特性:
1.结合曝光控制可以提高运动抓拍的成片率;
2.结合自动对焦可以提升运动物体对焦清晰度等;
3.结合多张影像迭合模块可以提升迭合时影像对准的准确性。
此外,本申请还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本申请提供的图像处理方法的各实施例中的部分或全部步骤。所述的存储介质可为磁盘、光盘、只读存储记忆体ROM或随机存储记忆体RAM等。
在上述实施例中,可以全部或部分通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机加载和执行所述计算机程序时,全部或部分地产生按照本申请上述各个实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。
所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网络节点、计算机、服务器或数据中心通过有线或无线方式向另一个站点、计算机或服务器进行传输。
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于一种图像处理装置的实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。
此外,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
以上所述的本申请实施方式并不构成对本申请保护范围的限定。

Claims (14)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取拍摄运动物体的第一帧图像和第二帧图像;
    将所述第一帧图像分割成MxN个第一矩形窗,将所述第二帧图像分割成MxN个第二矩形窗,M表示水平方向矩形窗的个数,N表示垂直方向矩形窗的个数,M和N均为正整数,所述MxN个第一矩形窗和所述MxN个第二矩形窗中的每个包括m乘以n个像素,m为水平方向的像素个数,n为垂直方向的像素个数,且m和n均为正整数;
    计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,所述第一平均像素值和所述第二平均像素值中的每个包括m个水平方向的平均像素值和n个垂直方向的平均像素值;
    根据所述MxN个第一矩形窗的所述第一平均像素值和所述MxN个第二矩形窗的所述第二平均像素值确定所述MxN个第二矩形窗中的至少一个运动窗。
  2. 根据权利要求1所述的方法,其特征在于,所述计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,包括:
    确定每个第一矩形窗的第一像素区域和第二像素区域、以及确定所述每个第二矩形窗的第三像素区域和第四像素区域,所述第一像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗水平相邻的至少一个第一矩形窗,所述第二像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗垂直相邻的至少一个第一矩形窗,所述第三像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗水平相邻的至少一个第二矩形窗,所述第四像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗垂直相邻的至少一个第二矩形窗;
    计算第一像素区域内m个水平方向的平均像素值,得到所述第一平均像素值中的m个水平方向的平均像素值;
    计算第二像素区域内n个垂直方向的平均像素值,得到所述第一平均像素值中的n个垂直方向的平均像素值;
    计算第三像素区域内m个水平方向的平均像素值,得到所述第二平均像素值中的m个水平方向的平均像素值;
    计算第四像素区域内n个垂直方向的平均像素值,得到所述第二平均像素值中的n个垂直方向的平均像素值。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据MxN个第一矩形窗的所述第一平均像素值和所述MxN个第二矩形窗所述第二平均像素值确定所述MxN个矩形窗中的至少一个运动窗,包括:
    计算每个第一矩形窗的第一平均像素值与对应于所述每个第一矩形窗的第二矩形窗的第二平均像素值的相关系数;
    判断所述相关系数是否小于第一阈值;
    如果是,则确定所述相关系数所对应的所述第二矩形窗为运动窗。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    利用绝对误差和SAD算法计算搜索范围内所有相邻两个像素的SAD值;
    在所有所述SAD值中选择最小的SAD值,并根据所述最小的SAD值确定每个运动 窗的速度;其中所述速度由所述每个运动窗内发生水平位移的像素个数或发生垂直位移的像素个数中的至少一个确定。
  5. 根据权利要求3所述的方法,其特征在于,在计算所述相关系数后,所述方法还包括:
    计算所述每个第二矩形窗的梯度值,所述梯度值包括所述每个第二矩形窗内的水平梯度值与垂直梯度值之和,所述水平梯度值为m个水平方向像素值中每相邻的两个像素值之差的和,所述垂直梯度值为n个垂直方向像素值中每相邻的两个像素值之差的和;
    根据所述每个第二矩形窗的梯度值确定每个第二矩形窗的概率值;
    判断所述概率值是否大于第二阈值;
    如果是,则降低所述概率值对应的所述第二矩形窗的相关系数。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:
    对所述第二帧图像中的MxN个第二矩形窗进行空间域滤波处理,得到M’x N’个第三矩形窗,以及每个第三矩形窗的速度和置信度,其中所述M’和N’均为正整数,且M’小于M,N’小于N。
  7. 一种图像处理装置,其特征在于,所述装置包括:
    获取单元,用于获取拍摄运动物体的第一帧图像和第二帧图像;
    处理单元,用于将所述第一帧图像分割成MxN个第一矩形窗,将所述第二帧图像分割成MxN个第二矩形窗,计算每个第一矩形窗的第一平均像素值和每个第二矩形窗的第二平均像素值,所述第一平均像素值和所述第二平均像素值中的每个包括m个水平方向的平均像素值和n个垂直方向的平均像素值;根据所述MxN个第一矩形窗的所述第一平均像素值和所述MxN个第二矩形窗的所述第二平均像素值确定所述MxN个第二矩形窗中的至少一个运动窗;
    其中M表示水平方向矩形窗的个数,N表示垂直方向矩形窗的个数,M和N均为正整数,所述MxN个第一矩形窗和所述MxN个第二矩形窗中的每个包括m乘以n个像素,m为水平方向的像素个数,n为垂直方向的像素个数,且m和n均为正整数。
  8. 根据权利要求7所述的装置,其特征在于,
    所述处理单元,具体用于确定每个第一矩形窗的第一像素区域和第二像素区域、以及确定所述每个第二矩形窗的第三像素区域和第四像素区域,
    计算第一像素区域内m个水平方向的平均像素值,得到所述第一平均像素值中的m个水平方向的平均像素值;
    计算第二像素区域内n个垂直方向的平均像素值,得到所述第一平均像素值中的n个垂直方向的平均像素值;
    计算第三像素区域内m个水平方向的平均像素值,得到所述第二平均像素值中的m个水平方向的平均像素值;
    计算第四像素区域内n个垂直方向的平均像素值,得到所述第二平均像素值中的n个垂直方向的平均像素值;
    其中所述第一像素区域包括所述每个第一矩形窗和与所述每个第一矩形窗水平相邻的至少一个第一矩形窗,所述第二像素区域包括所述每个第一矩形窗和与所述每个 第一矩形窗垂直相邻的至少一个第一矩形窗,所述第三像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗水平相邻的至少一个第二矩形窗,所述第四像素区域包括所述每个第二矩形窗和与所述每个第二矩形窗垂直相邻的至少一个第二矩形窗。
  9. 根据权利要求7或8所述的装置,其特征在于,
    所述处理单元,具体用于计算每个第一矩形窗的第一平均像素值与对应于所述每个第一矩形窗的第二矩形窗的第二平均像素值的相关系数;判断所述相关系数是否小于第一阈值;如果是,则确定所述相关系数所对应的所述第二矩形窗为运动窗。
  10. 根据权利要求7至9中任一项所述的装置,其特征在于,
    所述处理单元,还用于利用绝对误差和SAD算法计算搜索范围内所有相邻两个像素的SAD值;在所有所述SAD值中选择最小的SAD值,并根据所述最小的SAD值确定每个所述运动窗的速度;其中所述速度由所述每个运动窗内发生水平位移的像素个数或发生垂直位移的像素个数中的至少一个确定。
  11. 根据权利要求9所述的装置,其特征在于,
    所述处理单元,还用于在计算所述相关系数后,计算所述每个第二矩形窗的梯度值,所述梯度值包括所述每个第二矩形窗内的水平梯度值与垂直梯度值之和,所述水平梯度值为m个水平方向像素值中每相邻的两个像素值之差的和,所述垂直梯度值为n个垂直方向像素值中每相邻的两个像素值之差的和;根据所述每个第二矩形窗的梯度值确定每个第二矩形窗的概率值;判断所述概率值是否大于第二阈值;如果是,则降低所述概率值对应的所述第二矩形窗的相关系数。
  12. 根据权利要求7至11中任一项所述的方法,其特征在于,
    所述处理单元,还用于对所述第二帧图像中的MxN个第二矩形窗进行空间域滤波处理,得到M’x N’个第三矩形窗,以及每个第三矩形窗的速度和置信度,其中所述M’和N’均为正整数,且M’小于M,N’小于N。
  13. 一种通信装置,包括处理器,所述处理器与存储器耦合,其特征在于,
    所述存储器,用于存储指令;
    所述处理器,用于执行所述存储器中的指令,使得所述图像处理装置执行如权利要求1至6中任一项所述的方法。
  14. 一种计算机可读存储介质,所述存储介质中存储有指令,其特征在于,
    当所述指令被运行时,实现如权利要求1至6中任一项所述的方法。
PCT/CN2018/119162 2018-12-04 2018-12-04 一种图像处理方法和装置 WO2020113419A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/119162 WO2020113419A1 (zh) 2018-12-04 2018-12-04 一种图像处理方法和装置
CN201880088083.0A CN111684489B (zh) 2018-12-04 2018-12-04 一种图像处理方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/119162 WO2020113419A1 (zh) 2018-12-04 2018-12-04 一种图像处理方法和装置

Publications (2)

Publication Number Publication Date
WO2020113419A1 true WO2020113419A1 (zh) 2020-06-11
WO2020113419A9 WO2020113419A9 (zh) 2021-03-18

Family

ID=70974824

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119162 WO2020113419A1 (zh) 2018-12-04 2018-12-04 一种图像处理方法和装置

Country Status (2)

Country Link
CN (1) CN111684489B (zh)
WO (1) WO2020113419A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184722A (zh) * 2020-09-15 2021-01-05 上海传英信息技术有限公司 图像处理方法、终端及计算机存储介质
CN112184722B (zh) * 2020-09-15 2024-05-03 上海传英信息技术有限公司 图像处理方法、终端及计算机存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1926881A (zh) * 2004-03-01 2007-03-07 索尼株式会社 运动矢量检测装置、运动矢量检测方法和计算机程序
JP2010271802A (ja) * 2009-05-19 2010-12-02 Hitachi Computer Peripherals Co Ltd 画像処理装置、処理方法及び処理プログラム
CN102932582A (zh) * 2012-10-26 2013-02-13 华为技术有限公司 实现运动检测的方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2265169A4 (en) * 2008-04-03 2013-01-09 Kai Medical Inc NON-CONTACT PHYSIOLOGICAL MOTION SENSORS AND METHODS OF USE
US8908101B2 (en) * 2012-03-14 2014-12-09 Samsung Techwin Co., Ltd. Method and apparatus for reducing noise of video
CN104253929B (zh) * 2013-06-28 2019-03-12 广州华多网络科技有限公司 视频降噪方法及其系统
CN103729844B (zh) * 2013-12-20 2017-01-11 乐视致新电子科技(天津)有限公司 一种静止检测方法和装置
CN108513075B (zh) * 2018-04-17 2020-09-11 烟台艾睿光电科技有限公司 一种图像处理方法、装置、设备、介质及红外成像器件
CN108737749A (zh) * 2018-06-12 2018-11-02 烟台艾睿光电科技有限公司 一种确定盲元簇像素值的方法、装置和存储介质
CN108921800B (zh) * 2018-06-26 2021-01-22 成都信息工程大学 基于形状自适应搜索窗口的非局部均值去噪方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1926881A (zh) * 2004-03-01 2007-03-07 索尼株式会社 运动矢量检测装置、运动矢量检测方法和计算机程序
JP2010271802A (ja) * 2009-05-19 2010-12-02 Hitachi Computer Peripherals Co Ltd 画像処理装置、処理方法及び処理プログラム
CN102932582A (zh) * 2012-10-26 2013-02-13 华为技术有限公司 实现运动检测的方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184722A (zh) * 2020-09-15 2021-01-05 上海传英信息技术有限公司 图像处理方法、终端及计算机存储介质
CN112184722B (zh) * 2020-09-15 2024-05-03 上海传英信息技术有限公司 图像处理方法、终端及计算机存储介质

Also Published As

Publication number Publication date
CN111684489B (zh) 2023-07-11
WO2020113419A9 (zh) 2021-03-18
CN111684489A (zh) 2020-09-18

Similar Documents

Publication Publication Date Title
CN108898567B (zh) 图像降噪方法、装置及系统
US9615039B2 (en) Systems and methods for reducing noise in video streams
KR102144994B1 (ko) 영상의 노이즈를 저감하는 방법 및 이를 이용한 영상 처리 장치
US9307148B1 (en) Video enhancement techniques
US9536147B2 (en) Optical flow tracking method and apparatus
JP7078139B2 (ja) ビデオ安定化方法及び装置、並びに非一時的コンピュータ可読媒体
WO2022141178A1 (zh) 图像处理方法及装置
CN113286194A (zh) 视频处理方法、装置、电子设备及可读存储介质
CN107481271B (zh) 一种立体匹配方法、系统及移动终端
US10121262B2 (en) Method, system and apparatus for determining alignment data
WO2021114868A1 (zh) 降噪方法、终端及存储介质
WO2021232963A1 (zh) 视频去噪方法、装置、移动终端和存储介质
WO2014070273A1 (en) Recursive conditional means image denoising
WO2022052582A1 (zh) 一种图像配准方法、装置及电子设备和存储介质
AU2013273843A1 (en) Motion blur compensation for depth from defocus
WO2022252487A1 (zh) 位姿获取方法及装置、电子设备、存储介质和程序
US20200160560A1 (en) Method, system and apparatus for stabilising frames of a captured video sequence
WO2023273868A1 (zh) 图像降噪方法、装置、终端、存储介质
WO2019184604A1 (zh) 一种检测目标图像的方法及装置
WO2022233252A1 (zh) 图像处理方法、装置、计算机设备和存储介质
Zhao et al. Adaptively meshed video stabilization
WO2020113419A1 (zh) 一种图像处理方法和装置
RU2742346C1 (ru) Устранение размытия изображения
US11790483B2 (en) Method, apparatus, and device for identifying human body and computer readable storage medium
CN116266356A (zh) 全景视频转场渲染方法、装置和计算机设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18942162

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18942162

Country of ref document: EP

Kind code of ref document: A1