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

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

Info

Publication number
WO2020113419A9
WO2020113419A9 PCT/CN2018/119162 CN2018119162W WO2020113419A9 WO 2020113419 A9 WO2020113419 A9 WO 2020113419A9 CN 2018119162 W CN2018119162 W CN 2018119162W WO 2020113419 A9 WO2020113419 A9 WO 2020113419A9
Authority
WO
WIPO (PCT)
Prior art keywords
rectangular
average pixel
value
pixel value
window
Prior art date
Application number
PCT/CN2018/119162
Other languages
English (en)
French (fr)
Other versions
WO2020113419A1 (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

  • This application relates to the field of image processing technology, and in particular to an image processing method and device.
  • the image When taking pictures, the image will be blurred for shooting moving objects, which in turn makes the filming rate low and the shooting effect is not good.
  • it is necessary to detect the speed and direction of the moving objects in real time, and then control the exposure parameters or use other algorithms to process the speed and direction of the moving objects, such as
  • the focusing parameters are controlled according to the movement speed and direction of the detected object, so that the focus can be continuously tracked in real time to achieve the effect of shooting a clear image.
  • one of the methods for detecting moving objects is based on image processing algorithms.
  • image processing algorithms 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 movement 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 needs to save all the pixel information of the previous frame of image, which in turn needs to occupy a large amount of storage space and increase the hardware cost.
  • the present application provides an image processing method and device, which determine the motion status of an object by using a method of low memory access 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 rectangular windows in the horizontal direction
  • N represents the number of rectangular windows in the vertical direction
  • 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, where m is the number of pixels in the horizontal direction, and n is the number of pixels in the vertical direction.
  • m and n are both positive integers; calculate the first average pixel value of each first rectangular window and the second average pixel value of each second rectangular window, the first average pixel value and the second average pixel value
  • 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 values of the MxN first rectangular windows and the MxN second rectangular windows The second average pixel value of determines at least one motion window in the MxN second rectangular windows.
  • the average pixel value algorithm is used to simplify all the pixel values of the original image to the average value. It is possible to cache or save the average value without storing all the pixel values, thereby achieving a small storage resource occupation and saving hardware.
  • This method can quickly determine at least one motion window by using a motion detection algorithm for memory access with low computational complexity, 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 The first pixel area and the second pixel area of each first rectangular window, and the third pixel area and the fourth pixel area that determine each of the second rectangular windows, the first pixel area includes each of the first pixel areas A rectangular window 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 each of the first rectangular windows perpendicular to each other At least one adjacent first rectangular window, the third pixel area includes each of the second rectangular windows and at least one second rectangular window horizontally adjacent to each of the second rectangular windows, the fourth The pixel area includes each second rectangular window and at least one second rectangular window vertically adjacent to each second rectangular window; the average pixel value of m horizontal directions in the first pixel area is calculated to obtain the M average pixel values in the horizontal direction in the first average pixel value; calculating the average pixel
  • the calculation accuracy is improved by calculating the average value of each pixel of the current window and the adjacent window, that is, the accumulation
  • the projection histogram of adjacent windows can achieve the noise reduction effect, making the calculation result more accurate.
  • the first average pixel value according to the MxN first rectangular windows and the second average pixel value of the MxN second rectangular windows includes: calculating the first average pixel value of each first rectangular window and the second rectangular window corresponding to the second rectangular window of each first rectangular window.
  • the correlation coefficient of the average pixel value determine whether the correlation coefficient is less than a first threshold; if so, determine that the second rectangular window corresponding to the correlation coefficient is a motion window.
  • the correlation coefficient includes a degree of confidence.
  • the method further includes: calculating the SAD values of all two adjacent pixels in the search range by using the absolute error and the SAD algorithm; Select the smallest SAD value among the values, and determine the speed of each movement window according to the smallest SAD value; wherein the speed is determined by the number of pixels that have a horizontal displacement or the number of pixels that have a vertical displacement in each movement window. At least one of the number of pixels is determined.
  • the method further includes: calculating the gradient value of each second rectangular window, and the gradient value Including the sum of the horizontal gradient value and the vertical gradient value in each of the second rectangular windows, the horizontal gradient value is the sum of the difference between the values of each adjacent two pixels in the m horizontal direction pixel values, and the vertical The gradient value is the sum of the difference between the values of each adjacent two pixel values in the n vertical direction 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 so, reduce the correlation coefficient of the second rectangular window corresponding to the probability value.
  • the method of calculating the gradient value can determine all the low-texture areas of the current frame image, and reduce the confidence of these low-texture areas, thereby improving the overall The accuracy of the movement information.
  • the method further includes: performing spatial 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 the M'and N'are both positive integers, and M'is less than M, and N'is less than N.
  • the spatial domain filtering processing is performed on the motion information to obtain a more stable displacement and confidence, thereby improving the accuracy of calculating the motion speed and direction, and reducing noise interference.
  • the present application also provides an image processing device, which includes a functional unit for executing the foregoing first aspect and the methods in various implementation manners 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 also provides a communication device.
  • the communication device includes a processor, the processor is coupled to a memory, and the memory is used to store instructions; and the processor is used to execute instructions in the memory.
  • the communication device includes a hardware device, such as a terminal device.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • the storage medium stores instructions.
  • the instructions run on a computer or a processor, they are used to execute the aforementioned first aspect and the first aspect.
  • image processing methods in various implementations.
  • the embodiments of the present application also provide 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.
  • an embodiment of the present application also provides a chip system, the chip system includes a processor and an interface circuit, the interface circuit is coupled with the processor, and the processor is used to execute computer programs or instructions to The foregoing first aspect and the methods in the various implementation manners of the first aspect are implemented; the interface circuit is used to communicate with modules other than the chip system.
  • This application provides an image processing method and device.
  • the method uses an average pixel value algorithm to simplify all pixel values of the original image to an average value, and can only cache or save the average value without storing all pixel values. , Thereby achieving the beneficial effects of small storage resource occupation and saving hardware cost.
  • the method can quickly determine at least one motion window by using a motion detection algorithm for memory access with a low computational load, thereby improving calculation efficiency.
  • FIG. 1 is an overall flowchart of an image processing method provided by an embodiment of the application
  • FIG. 2 is a flowchart of an image processing method provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of a corresponding relationship between pixel values and weight values according to an embodiment of the application
  • FIG. 4 is a schematic diagram of dividing pixel areas according to an embodiment of the application.
  • FIG. 5 is a schematic diagram of calculating the average pixel value of a rectangular window by using pixel values according to an embodiment of the application
  • FIG. 6 is a schematic diagram of a low-memory storage projection histogram according to an embodiment of the application.
  • FIG. 7 is a schematic diagram of scanning and searching for the smallest SAD value by using the SAD algorithm according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of calculating and determining a minimum SAD value according to an embodiment of the application.
  • FIG. 9 is a flowchart of a method for determining a texture area provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of a corresponding relationship between a gradient value and a probability value according to an embodiment of the application.
  • FIG. 11 is a schematic diagram of a relationship between a displacement amount and a confidence level according to an embodiment of the application.
  • FIG. 12 is a schematic diagram after multi-dimensional filtering provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of an image processing device provided by an embodiment of this application.
  • FIG. 14 is a schematic structural diagram of a hardware device provided by an embodiment of the application.
  • This application is applied to the field of image processing technology, and particularly relates to the processing of images taken by moving objects.
  • the movement status of the object is determined by acquiring and calculating the information of the moving object, and the amount of calculation is reduced in the process of calculating the movement information of the object. , Reduce the effect of memory storage information and reduce hardware costs.
  • the method provided in this embodiment involves processing a series of images including two adjacent frames of images, and the two frames of images include: a first frame of images captured at a previous moment and a second frame of images captured at a current moment.
  • the first frame of image and the second frame of image capture the same object, but due to the motion of the object, the content of the two frames of images will be different.
  • 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 this application, the flow mainly includes three parts of the processing process, namely the first part (S1), the second part (S2) and The third part (S3).
  • S1 Image pre-processing process. It mainly includes: performing low-pass filtering processing on the acquired second frame image, and cutting into multiple (for example, M ⁇ N) rectangular windows.
  • S2 Projection histogram calculation. Mainly include: calculate the projection histogram of the cut M ⁇ N rectangular windows, obtain the average pixel value of each rectangular window, and save the calculated average pixel value in random access memory (RAM) in.
  • RAM random access memory
  • S3 Motion information estimation. It mainly includes: motion information estimation and multi-dimensional filtering processing.
  • the motion information estimation can determine the displacement and direction of the object in the two frames before and after the image.
  • the multi-dimensional filtering processing is to further process the calculated displacement and direction. To improve the stability of the calculation.
  • the image processing method provided by the embodiments of the present application can solve the calculation problem of how to generate high-precision and high-stability motion information with a low-cost hardware design.
  • the execution subject of the method may be a terminal including a camera, such as a user equipment (UE).
  • UE user equipment
  • the form of the terminal includes but is not limited to a mobile phone, a computer, or a computer. Wearable equipment.
  • 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 a first frame image and a second frame image of a moving object.
  • the first frame of image is the image taken at time t-1 or the previous frame of image; the second frame of image is the image taken at time t or the current frame of image.
  • the first frame image and the second frame image are used to determine the motion status of the object. Therefore, before the second frame image is acquired, the method further includes performing low-pass filtering on the second frame image to obtain Reduce noise and improve the resolution of the second frame of image.
  • S1 specifically includes: using a two-dimensional lowpass filter to process the second frame of image.
  • the pixels of the second frame of image are represented by 9 pixel points P 00 to P 22 , wherein each pixel point 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, and 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 environmental brightness or camera parameters, such as ISO (International Standards Organization) value, so as to obtain the best noise removal effect; in addition, the low-pass filter can use multipliers, The adder and displacement arithmetic unit are implemented to help reduce the hardware cost.
  • 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
  • both m and n are 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 The average pixel value of m horizontal directions and the average pixel value of n vertical directions.
  • step 202 specifically includes: determining the first pixel area and the second pixel area of each first rectangular window, and determining the third pixel area and the fourth pixel area of each second rectangular window, the first 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 of the first rectangular windows, and the third pixel area includes each of the second rectangular windows and at least one horizontally adjacent to each of the second rectangular windows A second rectangular window, and 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 the average pixel value of m horizontal directions in the first pixel area, and obtaining the average pixel value of m horizontal directions in the first average pixel value.
  • a total of 9 first rectangular windows are included in the first frame of image, which are: P1, P2, P3, P4, P5, P6, P7, P8, and P9.
  • Each of the nine rectangular windows is divided into a first pixel area and a second pixel area.
  • the two first rectangular windows horizontally adjacent to P5 are P4 and P6, respectively, and the first pixel area includes P5, P4, and P6.
  • the first rectangular window vertically adjacent to P5 has P2 and P8, and the second pixel area includes P5, P2, and P8.
  • the first pixel area is P1 and P2
  • the second pixel area is P1 and P4
  • the first pixel regions are P4 and P5
  • the second pixel regions are P4, P1, and P7.
  • the same number of 3x3 second rectangular windows is divided, and the method for determining the third pixel area and the fourth pixel area of each rectangular window is 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 rounding
  • P represents the pixel value
  • i and j are constants
  • the value range of i is [0, m- 1]
  • the value range of j is [0, n-1], and both end values are included.
  • the X j may also be expressed as "PorjHist_X”
  • the Y i may also be expressed as “PorjHist_Y”.
  • the average pixel values in the four horizontal directions in the first pixel area are calculated to obtain the average pixel values (X2, X2, X3, and X4) in the four horizontal directions in the first average pixel value.
  • the first rectangular window P5 calculates the average pixel values of three vertical directions in the second pixel area, and obtains the average pixel values (Y1, Y2, and Y3) of the three vertical directions in the first average pixel value, which is specifically:
  • the four horizontal pixel values ⁇ 54, 64, 74, 84 ⁇ and the three vertical horizontal pixel values ⁇ 68, 69, 70 ⁇ of the first rectangular window P5 are obtained by calculation, a total of seven average pixel values. And, it also includes storing the 7 average pixel values corresponding to the first rectangular window P5.
  • the same method is used for the other 8 first rectangular windows of the first frame of image, and 7 average pixel values can be calculated, including 4 average pixel values in the horizontal direction and 3 horizontal pixels in the vertical direction. Value, and save these average pixel values to prepare for subsequent calculations.
  • the algorithm for calculating the average value of the pixel values is used to simplify the original multiple pixel values into the average value. Only the average value can be cached or saved without storing all the pixel values. For example, for the first rectangular window P5, Only 7 average pixel values need to be stored. Compared with the original pixel values corresponding to 12 pixels, the storage space is saved and the corresponding calculation amount is reduced, thereby reducing storage resources and saving hardware costs. Beneficial effect.
  • this method replaces the original large number of pixel values in each row or each column with the calculated average pixel value, which is equivalent to storing the horizontal projection value and vertical projection value of each column pixel value, namely
  • the pixel information of a frame of image can be represented by a projection histogram. See FIG. 6, where each rectangular window is projected in the x-axis direction and the y-axis direction.
  • the number of average pixel values that need to be stored is 63 (7 ⁇ 9), which saves storage space compared to the original storage of 108 (12 ⁇ 9) pixel values. , Reduce the hardware cost.
  • Step 204 Determine at least one motion window of 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 .
  • the step 204 specifically includes: 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; determining the correlation coefficient Whether it is less than the first threshold, if yes, it is determined that the second rectangular window corresponding to the correlation coefficient is a motion 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 motion window.
  • the motion window can be understood as the area 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 of the first rectangular windows includes:
  • the average pixel value of each first rectangular window and the average pixel value of each second rectangular window are obtained, and when calculating the correlation system and comparing, it is the first Compare the pixels at the same position in one frame of image and the second frame of image.
  • the correlation coefficient includes the correlation coefficient in the horizontal direction and the vertical direction. Further, the correlation coefficient is the degree of confidence, which is represented by "Q", where "Qx” represents the degree of confidence in the horizontal direction, and "Qy” represents the degree of confidence in the vertical direction.
  • the first frame (Pre) image is The m average pixel values in the horizontal direction of a rectangular window are ⁇ 100, 20, 150, 40 ⁇ , and then according to the above formula, it is judged whether the second rectangular window of the current frame image is a moving window, including:
  • the correlation coefficient that is, the value 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 the greater the difference between the two signals.
  • the first threshold is 0.9
  • compare 0.753 ⁇ 0.9 that is, if the correlation coefficient is less than the first threshold, it is determined that the rectangular window is a motion 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 separately calculated whether they are moving windows, when only the currently calculated horizontal and vertical confidence of the rectangular window are both greater than or equal to the first threshold , It is determined 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 value can be obtained through experiments or the experience of a person skilled in the art.
  • the third part S3 "motion information estimation" process also includes determining the motion information of each rectangular window, and the motion information includes the speed and direction of the displacement of the object.
  • the method includes: using a 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 motion windows; wherein the speed is determined by at least one of the number of pixels that undergo horizontal displacement or the number of pixels that undergo vertical displacement in each of the motion windows.
  • 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 of image and the second frame of image is 1/30 second, and all the processing procedures must be completed within the time interval of 1/30 second.
  • At least two rectangular windows are estimated as the search range.
  • This embodiment Figure 7 in the middle shows the search range of 7 rectangular windows, which can also be 3, 4 or other, which is not limited in this embodiment.
  • traverse and search for a fixed range in the horizontal direction, using pixels as the displacement unit, using the x-direction projection histogram and SAD algorithm to calculate the horizontal pixel displacement of a single rectangular window in the motion area, and the x-direction displacement of the rectangular window is The number of pixels with the smallest SAD value, as shown in FIG. 7 shows a schematic diagram of scanning and searching for the smallest SAD value using the SAD algorithm.
  • the search range includes 3 rectangular windows extending horizontally along the positive direction of the x-axis, and 3 rectangular windows extending along the negative direction of the x-axis, so there are a total of 6 rectangular window ranges.
  • each rectangular window includes 4 pixel values in the horizontal direction.
  • the y-direction displacement of the rectangular window is similar to the x-direction, that is, replace the projection histogram in the x-direction with the projection histogram in the y-direction, and search in the upper and lower ranges to determine the minimum SAD value The number of pixels.
  • the search range can be preset and determined.
  • the range of a 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 a horizontal direction of the previous frame image
  • Pre PorjHist_Y j represents the average pixel value in a vertical direction of the previous frame image
  • Curr PorjHist_X j represents the average pixel value in a horizontal direction of the current frame image Value
  • Curr PorjHist_Y j represents the average pixel value in a vertical direction of the current frame image.
  • the calculated SAD values are:
  • the process of calculating the horizontal displacement and vertical displacement of each motion window by using formula (7) and formula (8) can refer to the calculation process of the four average pixel values of a motion window in the horizontal direction. This embodiment does not Go into details.
  • M ⁇ N rectangular windows can also be traversed, and the speed of each rectangular window can be calculated.
  • 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, and a 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 amount of calculation and improves the calculation efficiency.
  • the “displacement amount” can also be used to indicate the movement of the object.
  • the displacement amount includes a horizontal displacement amount and a vertical displacement amount.
  • the horizontal displacement of the movement window in this embodiment is 3 pixels.
  • Can be expressed as the horizontal displacement of the motion window is 3.
  • the displacement in the vertical direction can also be expressed as the number of pixels moved by the motion window in the vertical direction.
  • this embodiment also provides a method for determining a flat area, which can identify low-texture areas of the image, and improve the accuracy of the motion information by adjusting the correlation coefficients of the low-texture areas, 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 of the second rectangular windows, and the horizontal gradient value is the sum of the value of each adjacent two pixel values in the m horizontal direction. Sum, the vertical gradient value is the sum of the difference between the values of each adjacent two pixel values in the n vertical direction pixel values.
  • the gradient value is calculated using the following formula (9) to formula (11):
  • Gradient_X represents the sum of the difference between two adjacent pixel values in the pixel values in the horizontal direction
  • Curr ProjHist_X j represents the average pixel value in the horizontal direction of the jth pixel in the current frame
  • Curr ProjHist_X j-1 represents the first pixel value in the current frame.
  • Gradient_Y represents the sum of the difference between two adjacent pixel values in the pixel value in the vertical direction
  • Curr ProjHist_Y represents the average pixel value of the j-th pixel in the current frame in the vertical direction
  • Curr ProjHist_Y j-1 represents the vertical average pixel value of the j-1th 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-mentioned 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], including the end value. It can be seen from Figure 10 that the smaller the gradient value, the greater the probability value corresponding to this area; on the contrary, 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 area converted from the total gradient value through a non-linear function in FIG. 10, and may also include other corresponding relationships.
  • This embodiment compares the gradient value and the probability value
  • the expression form of the value correspondence is not limited.
  • Step 303 Determine whether the probability value is greater than a 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 value, 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 level of the second rectangular window.
  • the probability value is less than or equal to the second threshold value, indicating that the rectangular window corresponding to the probability value is a low-texture area.
  • the method of calculating the gradient value can determine all the low-texture areas of the current frame image, and reduce the confidence of these low-texture areas, thereby improving the overall The accuracy of the movement information.
  • the method provided in this embodiment also 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 calculated displacement of each window, If there is a large difference between the displacement and the adjacent area, or the displacement of the two images in the same position, the speed of the moving object or the frame of the moving object window is likely to cause unstable jitter. In order to overcome this One phenomenon, the use of multi-dimensional filtering processing.
  • process of the "multi-dimensional filtering processing” may include the following steps:
  • the horizontal x and y vertical displacements of the target window are both different from the average displacements of 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 using a two-dimensional lowpass filter to reduce noise in the aforementioned S1, and reference may be made to the foregoing specific calculation process, which will not be described in detail in this embodiment.
  • the method further includes: performing spatial filtering processing on the MxN second rectangular windows in the second frame of image to obtain M'x N'third rectangular windows, and the speed of each third rectangular window And confidence, wherein the M'and N'are both positive integers, and M'is less than M, and N'is less than N.
  • the displacement and confidence of each 2x2 rectangular window are subjected to the maximum likelihood estimation (Maximum likelihood estimation) method to produce a displacement and confidence with high spatial stability.
  • the maximum likelihood estimation method is a method of using known sample results in statistics and using a certain model to deduce a reliable result.
  • This embodiment uses a weight sum model, with confidence as The weight value is used to estimate a higher degree of stability of the displacement, and the confidence degree uses the average confidence degree to estimate a higher degree of stability confidence degree.
  • (W x ) ij (Q x ) ij , (W x ) ij represents the confidence of the rectangular window in the i-th row and j-th column of the x-axis in the horizontal direction, and (V x ) ij represents the i-th in the x-axis in the horizontal direction
  • V x represents the target speed synthesized by the x-axis in the horizontal direction, and Q x represents the target confidence corresponding to the target speed V x.
  • 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 displacement and confidence of the original 2 ⁇ 2 second rectangular window,
  • the number of second rectangular windows is reduced, and the stability of spatial motion information is improved.
  • (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 y-axis in the vertical direction, and (V y ) ij represents the i-th y-axis in the vertical direction.
  • a total of 32 ⁇ 32 second rectangular windows are included, and the weighted average is performed in units of 4 (2 ⁇ 2) rectangular windows.
  • V 00 , V 01 , V 10 , V 11 These 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, traverses all the second rectangular windows, and 16 ⁇ 16 third rectangular windows can be obtained, thereby improving the stability of the second image.
  • this embodiment only uses 4 second rectangular windows as an example of combining, and may also include more or less rectangular window combinations, for example, 8 or 2 second rectangular windows are combined into one third rectangular window. Rectangular windows, etc., are not limited in this embodiment.
  • the multi-dimensional filtering process provided in this embodiment also includes time-domain filtering. As shown in Figure 12, it can be implemented by a time domain filter.
  • the displacement and confidence of the target window in the current frame and the window at the same position in the previous frame are used as a moving average to generate a displacement and confidence with higher time domain stability.
  • This moving average may be a weighted moving average.
  • exponential moving average this embodiment includes but is not limited to this.
  • the displacement (V t ) of the target window in the current frame and the displacement (V t-1 ) of the window at the same position in the previous frame are weighted and averaged to generate a moving average (SV t-1 ).
  • the motion detection method using the average pixel value as the projection histogram provided by the embodiment of the present application.
  • the projection histogram has a small memory space and low computational complexity. It has obvious improvement to reduce cost and power consumption.
  • the embodiments of the present application provide a low memory access and high stability motion detection algorithm, including the use of projection histograms to detect low-texture areas, and the use of multi-dimensional filters to improve the stability of motion information, which can be
  • the applied products provide functional services based on image-based motion signs, direction, strength and location information.
  • the method provided by the embodiments of this application solves the problem of instability caused by noise in the detection of the movement direction and speed at high resolution, including the noise reduction processing of low-pass filtering of the influence, and the processing of the movement information Multi-dimensional filtering processing, and these processing methods can all be implemented with simple multipliers, adders, and displacement calculators, which can significantly improve cost and power consumption.
  • FIG. 13 is an image processing device provided in this embodiment.
  • the device 130 is used to implement the image processing method in the foregoing embodiment.
  • the device 130 may include an acquiring 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., which are not covered by this application. Qualify.
  • the acquiring unit 1301 is configured to acquire a first frame image and a second frame image of a 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 horizontal average pixel values and n vertical average values Pixel value; determining at least one of 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 Movement 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 both positive integers
  • each of the MxN first rectangular windows and the MxN second rectangular windows A includes m multiplied by n pixels
  • m is the number of pixels in the horizontal direction
  • n is the number of pixels in the vertical direction
  • both m and n are positive integers.
  • the first frame image and the second frame image captured can 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 the average pixel value of m horizontal directions in the first pixel area to obtain the average pixel value of m horizontal directions in the first average pixel value; calculating The average pixel value of n vertical directions in the second pixel area is obtained to obtain the average pixel value of n vertical directions in the first average pixel value; the average pixel value of m horizontal directions in the third pixel area is calculated to obtain M average pixel values in the horizontal direction in the second average pixel value; calculate the average pixel values in the n vertical directions in the fourth pixel area to obtain the average pixel values in the n vertical directions in the second average pixel value .
  • the first 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
  • the second pixel area includes each of the first rectangular windows.
  • the third pixel area includes each of the second rectangular windows and horizontally opposite to each of the second rectangular windows.
  • Adjacent at least one second rectangular window, and 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.
  • the processing unit 1302 is specifically configured to: calculate the first average pixel value of each first rectangular window and the value corresponding to each first rectangular window.
  • the correlation coefficient of the second average pixel value of the second rectangular window of the window determine whether the correlation coefficient is less than the first threshold; if so, determine that the second rectangular window corresponding to the correlation coefficient is a motion window.
  • the processing unit 1302 is further configured to: calculate the SAD values of all two adjacent pixels in the search range by using the absolute error and the SAD algorithm; The smallest SAD value is selected among the SAD values, and the speed of each movement window is determined according to the smallest SAD value; wherein the speed is determined by the number of pixels in each movement window that have a horizontal displacement or the number of pixels that have a vertical displacement. At least one of the number of pixels to be shifted is determined.
  • the processing unit 1302 is further configured to: after calculating the correlation coefficient, calculate the gradient value of each second rectangular window, and the The gradient value includes the sum of the horizontal gradient value and the vertical gradient value in each of the second rectangular windows, and the horizontal gradient value is the sum of the difference between each adjacent two pixel values in the m horizontal direction pixel values, so The vertical gradient value is the sum of the difference between the values of each adjacent two pixel values in the n vertical direction 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 so, reduce the correlation coefficient of the second rectangular window corresponding to the probability value.
  • the processing unit 1302 is further configured to: perform spatial filtering processing on the M ⁇ N 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 the 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 processing on each rectangular window of the current frame of image and each rectangular window of the same position of the previous frame of image Time-domain filtering produces displacement and confidence with higher time-domain stability.
  • the time-domain filtering of 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 can be implemented by software, hardware, or a combination of software and hardware.
  • the software can be run on a computer or a processor.
  • an embodiment of the present application also provides a communication device.
  • the communication device may be a hardware device for implementing part or all of the steps of the image processing method described in the foregoing embodiment.
  • the communication device can also be replaced by another device with 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 a combination of certain components, or different components. The arrangement is not limited in this application.
  • the processor 1401 can be used to implement all the method flows of the first part S1, the second part S2, and the third part S3 in FIG. 1 of the embodiment of the present application, and the memory 1402 can be used as a random access memory RAM for storing in S2
  • the image collector 1403 is used to capture an image of an object, such as acquiring a first frame image and a second frame image.
  • the processor 1401 is the control center of the hardware device, which uses various interfaces and lines to connect the various parts of the entire hardware device, runs or executes the software programs and/or modules stored in the memory 1402, and calls the software programs and/or modules stored in the memory 1402. Data to perform various functions of the hardware device.
  • the processor 1401 may be composed of an integrated circuit (IC), for example, it may be composed of a single packaged IC, or it may be composed of connecting multiple packaged ICs with the same function or different functions.
  • the processor may only include a CPU, or it may be a combination of a GPU, a digital signal processor (digital signal processor, DSP), and a control chip in the transceiver module.
  • IC integrated circuit
  • DSP digital signal processor
  • the memory 1402 is used to store program codes for executing the technical solutions of the present application, and is controlled by the processor 1401 to execute.
  • the processor 1401 is configured to execute the program code stored in the memory 1402 to implement the image processing method in the foregoing embodiment.
  • the memory 1402 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), or can store information and instructions
  • ROM read-only memory
  • RAM random access memory
  • Other types of dynamic storage devices can also be Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory, CD-ROM or other optical disk storage , CD storage (including compressed CDs, laser CDs, CDs, digital versatile CDs, Blu-ray CDs, etc.), disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and Any other medium that can be accessed by the computer, but not limited to this.
  • the memory can exist independently or integrated with the processor.
  • the image collector 1403 may include a camera or other units or modules with a shooting function.
  • the hardware device is the image processing device provided in the foregoing embodiment.
  • the function to be implemented by the acquisition unit 1301 can be implemented by the device's
  • the processor 1401 controls the image collector 1403 to implement; the functions to be implemented by the processing unit 1302 can be implemented by the processor 1401 of the device.
  • the hardware device may be a terminal device.
  • the terminal device may also be called a terminal (Terminal), user equipment (UE), mobile station (MS), or mobile terminal. (mobile terminal, MT) etc.
  • the terminal equipment can be a mobile phone, a tablet computer (Pad), a computer with wireless transceiver function, virtual reality (VR) terminal equipment, augmented reality (Augmented Reality, AR) terminal equipment, industrial control (industrial control) ), wireless terminals in self-driving (self-driving), wireless terminals in remote surgery (remote medical surgery), wireless terminals in smart grid (smart grid), transportation safety (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, location tags, etc.
  • 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 can be separate and different physical devices, or it can integrate the functions of the core network device and the logical function of the wireless access network device on the same physical device, or it can be a physical device. It integrates the functions of part of the core network equipment and part of the wireless access network equipment.
  • the terminal device can be a fixed location, or it can be movable.
  • the terminal device provided in this embodiment can obtain high-precision and high-stability motion detection information under the condition of low hardware cost, and can complete the following characteristics in cooperation with other algorithm modules:
  • Combining exposure control can improve the filming rate of sports capture
  • the present application also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the image processing method provided in the present application when the program is executed.
  • the storage medium can be a magnetic disk, an optical disk, a read-only storage memory ROM, or a random storage memory RAM, etc.
  • all or part of it may be implemented by software, hardware, firmware or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • 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 foregoing embodiments of the present application are generated.
  • the computer may be a general-purpose computer, a special-purpose 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.
  • the computer instructions may be transmitted 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.
  • words such as “first” and “second” are used to distinguish the same or similar items with substantially the same function and effect. Those skilled in the art can understand that words such as “first” and “second” do not limit the quantity and execution order, and words such as “first” and “second” do not limit the difference.

Landscapes

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

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 WO2020113419A1 (zh) 2020-06-11
WO2020113419A9 true 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)

Families Citing this family (1)

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

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4626158B2 (ja) * 2004-03-01 2011-02-02 ソニー株式会社 動きベクトル検出装置、および動きベクトル検出方法、並びにコンピュータ・プログラム
EP2265169A4 (en) * 2008-04-03 2013-01-09 Kai Medical Inc NON-CONTACT PHYSIOLOGICAL MOTION SENSORS AND METHODS OF USE
JP5204035B2 (ja) * 2009-05-19 2013-06-05 日立コンピュータ機器株式会社 画像処理装置、処理方法及び処理プログラム
US8908101B2 (en) * 2012-03-14 2014-12-09 Samsung Techwin Co., Ltd. Method and apparatus for reducing noise of video
CN102932582B (zh) * 2012-10-26 2015-05-27 华为技术有限公司 实现运动检测的方法及装置
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 成都信息工程大学 基于形状自适应搜索窗口的非局部均值去噪方法

Also Published As

Publication number Publication date
CN111684489B (zh) 2023-07-11
CN111684489A (zh) 2020-09-18
WO2020113419A1 (zh) 2020-06-11

Similar Documents

Publication Publication Date Title
CN108898567B (zh) 图像降噪方法、装置及系统
KR102144994B1 (ko) 영상의 노이즈를 저감하는 방법 및 이를 이용한 영상 처리 장치
KR101921672B1 (ko) 이미지 처리 방법 및 장치
WO2022141178A1 (zh) 图像处理方法及装置
US9536147B2 (en) Optical flow tracking method and apparatus
WO2021114868A1 (zh) 降噪方法、终端及存储介质
US9307148B1 (en) Video enhancement techniques
CN107481271B (zh) 一种立体匹配方法、系统及移动终端
CN111402170B (zh) 图像增强方法、装置、终端及计算机可读存储介质
EP2898473A1 (en) Systems and methods for reducing noise in video streams
WO2014070273A1 (en) Recursive conditional means image denoising
WO2022252487A1 (zh) 位姿获取方法及装置、电子设备、存储介质和程序
CN111192226A (zh) 一种图像融合去噪方法及装置、系统
WO2022233252A1 (zh) 图像处理方法、装置、计算机设备和存储介质
CN111105452A (zh) 基于双目视觉的高低分辨率融合立体匹配方法
WO2020113419A9 (zh) 一种图像处理方法和装置
CN113435367A (zh) 社交距离评估方法、装置及存储介质
US20230260211A1 (en) Three-Dimensional Point Cloud Generation Method, Apparatus and Electronic Device
Ponomaryov et al. Fuzzy color video filtering technique for sequences corrupted by additive Gaussian noise
JP2005339535A (ja) 相違度の計算
CN112288817B (zh) 基于图像的三维重建处理方法及装置
CN112150532A (zh) 图像处理的方法、装置、电子设备和计算机可读介质
CN115393538A (zh) 基于深度学习的室内动态场景的视觉slam方法及系统
US11790483B2 (en) Method, apparatus, and device for identifying human body and computer readable storage medium
Yang et al. Hierarchical joint bilateral filtering for depth post-processing

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