CN110445951A - Filtering method and device, storage medium, the electronic device of video - Google Patents

Filtering method and device, storage medium, the electronic device of video Download PDF

Info

Publication number
CN110445951A
CN110445951A CN201810411623.6A CN201810411623A CN110445951A CN 110445951 A CN110445951 A CN 110445951A CN 201810411623 A CN201810411623 A CN 201810411623A CN 110445951 A CN110445951 A CN 110445951A
Authority
CN
China
Prior art keywords
video frame
pixel
value
pixel value
video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810411623.6A
Other languages
Chinese (zh)
Other versions
CN110445951B (en
Inventor
夏珍
李凯
汪青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810411623.6A priority Critical patent/CN110445951B/en
Publication of CN110445951A publication Critical patent/CN110445951A/en
Application granted granted Critical
Publication of CN110445951B publication Critical patent/CN110445951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/21Circuitry for suppressing or minimising disturbance, e.g. moiré or halo
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Picture Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of filtering methods of video and device, storage medium, electronic device.Wherein, this method comprises: obtaining the first video frame and the second video frame, wherein, first video frame is to be located at the video frame of the first playing time in target video stream, second video frame is to be located at the video frame of the second playing time in target video stream, and target video stream is the collected video flowing of image capture device;Target type of sports is determined based on the first video frame and the second video frame, wherein target type of sports is the type of sports that the viewfinder area of image capture device is moved between the first playing time and the second playing time;Control first filter is filtered third video frame according to target type of sports, wherein third video frame is to be located at the video frame of third playing time in target video stream, and third playing time is later than the first playing time and the second playing time.The present invention solves the poor technical problem of real-time for carrying out noise reduction process in the related technology.

Description

Filtering method and device, storage medium, the electronic device of video
Technical field
The present invention relates to internet areas, filtering method and device, storage medium in particular to a kind of video, Electronic device.
Background technique
Picture noise refers to the unnecessary or extra interference information being present in image data, various obstruction in image People are alternatively referred to as picture noise to the factor that its information receives, and the presence of noise has seriously affected the quality of image, therefore Before image enhancement processing and classification processing, it is necessary to be corrected.Noise can theoretically be defined as " it is unpredictable, can only The random error recognized with probabilistic method ", thus by picture noise regard as Multidimensional Processes be it is suitable, thus The method of description noise can borrow the description of random process completely, i.e., with its probability-distribution function and probability density distribution letter Number.
In order to eliminate noise present in image, noise reduction can be carried out to image, i.e., be reduced in image by technological means Existing picture noise.A kind of noise-reduction method is provided in the related technology, detailed process is as follows: detecting the input figure of target video Picture obtains the mosquito noise probability of each pixel in input picture;Low-pass filtering is carried out to input picture, obtains each pixel Corresponding filtered pixel value;Based on mosquito noise probability, to the pixel value of filtered pixel value and input picture It is weighted processing, obtains the pixel value of output image, and exports image.
Although the program can eliminate the noise in image to a certain extent, it will cause the fuzzy and data of video Treating capacity is larger, will cause larger delay, and real-time is poor.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of filtering methods of video and device, storage medium, electronic device, at least to solve The poor technical problem of the real-time of noise reduction process is certainly carried out in the related technology.
According to an aspect of an embodiment of the present invention, a kind of filtering method of video is provided, comprising: obtain the first video Frame and the second video frame, wherein the first video frame is to be located at the video frame of the first playing time, the second video in target video stream Frame is the video frame for being located at the second playing time in target video stream, and target video stream is the collected video of image capture device Stream;Target type of sports is determined based on the first video frame and the second video frame, wherein target type of sports is image capture device The type of sports that is moved between the first playing time and the second playing time of viewfinder area;Control first filter is pressed Third video frame is filtered according to target type of sports, wherein third video frame is to be located at third in target video stream to play The video frame at moment, third playing time are later than the first playing time and the second playing time.
According to another aspect of an embodiment of the present invention, a kind of filter of video is additionally provided, comprising: acquiring unit, For obtaining the first video frame and the second video frame, wherein the first video frame is to be located at the first playing time in target video stream Video frame, the second video frame is to be located at the video frame of the second playing time in target video stream, and target video stream adopts for image Collect the collected video flowing of equipment;Determination unit, for determining target type of sports based on the first video frame and the second video frame, Wherein, target type of sports is that the viewfinder area of image capture device carries out between the first playing time and the second playing time The type of sports of movement;Filter unit filters third video frame according to target type of sports for controlling first filter Wave, wherein third video frame is to be located at the video frame of third playing time in target video stream, and third playing time is later than first Playing time and the second playing time.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, which includes storage Program, program execute above-mentioned method when running.
According to another aspect of an embodiment of the present invention, it additionally provides a kind of electronic device, including memory, processor and deposits The computer program that can be run on a memory and on a processor is stored up, processor executes above-mentioned side by computer program Method.
In embodiments of the present invention, the first video frame and the second video frame are obtained, the first video frame is in target video stream Positioned at the video frame of the first playing time, the second video frame is to be located at the video frame of the second playing time, mesh in target video stream Mark video flowing is the collected video flowing of image capture device;Determine that target moves class based on the first video frame and the second video frame Type, target type of sports are that the viewfinder area of image capture device is transported between the first playing time and the second playing time Dynamic type of sports;Control first filter is filtered third video frame according to target type of sports, and third video frame is It is located at the video frame of third playing time in target video stream, when third playing time is later than the first playing time and the second broadcasting It carves, is mentioned while can solve the poor technical problem of the real-time of progress noise reduction process in the related technology, and then reach noise reduction The technical effect of high real-time.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of the hardware environment of the filtering method of video according to an embodiment of the present invention;
Fig. 2 is a kind of flow chart of the filtering method of optional video according to an embodiment of the present invention;
Fig. 3 is the schematic diagram of the hardware environment of the filtering method of video according to an embodiment of the present invention;
Fig. 4 is the schematic diagram of the hardware environment of the filtering method of video according to an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of optional video frame according to an embodiment of the present invention;
Fig. 6 is a kind of schematic diagram of optional video frame according to an embodiment of the present invention;
Fig. 7 is the schematic diagram that a kind of optional intelligent scene according to an embodiment of the present invention adapts to;
Fig. 8 is the schematic diagram that a kind of optional intelligent scene according to an embodiment of the present invention adapts to;
Fig. 9 is a kind of schematic diagram of optional filtering picture according to an embodiment of the present invention;
Figure 10 is a kind of schematic diagram of the filter of optional video according to an embodiment of the present invention;
And
Figure 11 is a kind of structural block diagram of terminal according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
One side according to an embodiment of the present invention is provided and a kind of is gone in real time based on Kalman filter and bilateral filtering Method for de-noising, specific implementation are as follows: working as denoising is completed in acquisition current time picture frame to be processed, and what is saved N frame image before previous frame;Pre-filtering processing is carried out using mean filter to current time picture frame to be processed;Using block Method of completing the square carries out estimation to pre-filtering treated picture frame;Based on motion estimation result, using kalman filter method Carry out noise reduction process;Noise reduction process is carried out using two-sided filter;Denoising image that comprehensive Kalman filtering obtains and bilateral Obtained denoising image is filtered, weighting obtains final denoising image.
Kalman filter is introduced in this scenario, and airspace Wiener filtering and time domain card are combined using the result of multiframe Line taking is mixed to get noise-reduced image after Thalmann filter carries out filtering operation twice to image, and the program exists centainly not Foot, one is needing multiframe caching to introduce delay, the second is airspace Wiener filter will lead to fuzzy pictures, using estimation Mode greatly improve algorithm complexity.
One side according to an embodiment of the present invention additionally provides a kind of filtering method based on dividing method and SVD method, Specific implementation is as follows: obtaining using super-pixel block dividing method and SVD method to noise video flowing and is based on super-pixel block Adaptive video Texture Measure;The smooth region and texture region of super-pixel block are demarcated, and obtained with adaptive The structure variance of degree;Using the difference of structure variance come self adaptive control weight, the texture information of video flowing is thus assessed;It passes through again Video flowing filters to obtain denoising video flowing.
The program is the flat site and texture region distinguished in image using superpixel segmentation method, then sharp respectively Image after operating to obtain noise reduction with airspace filter.There is also many restrictions for the program, for example do not consider scene problem, cause pair The adaptability of scene is poor.
One side according to an embodiment of the present invention additionally provides a kind of embodiment of the method for the filtering method of video.
Optionally, in the present embodiment, the filtering method of above-mentioned video can be applied to as shown in Figure 1 by server 101 and the hardware environment that is constituted of terminal (including user terminal 103 and user terminal 105) in.As shown in Figure 1, server 101 Be attached by network and terminal, above-mentioned network includes but is not limited to: wide area network, Metropolitan Area Network (MAN) or local area network, terminal are simultaneously unlimited Due to PC, mobile phone, tablet computer etc..
The filtering method of the video of the embodiment of the present invention can be executed by server 101, and Fig. 2 is to implement according to the present invention A kind of flow chart of the filtering method of optional video of example, as shown in Fig. 2, this method may comprise steps of:
Step S202, server obtain the first video frame and the second video frame, and the first video frame is position in target video stream In the video frame of the first playing time, the second video frame is to be located at the video frame of the second playing time, target in target video stream Video flowing is the collected video flowing of image capture device.
Optionally, the communication video flowing that target video stream can be communicated for user terminal 103 and user terminal 105, Transmitted to user terminal 105 such as user terminal 103 its acquire the collected video flowing of equipment institute or user terminal 105 to Its collected video flowing of acquisition equipment institute that family terminal 103 transmits.
Step S204, server determine target type of sports based on the first video frame and the second video frame, and target moves class Type is the type of sports that the viewfinder area of image capture device is moved between the first playing time and the second playing time, The movement for acquiring the viewfinder area of equipment refers to opposite movement, either acquisition equipment has occurred movement and leads to viewfinder area Variation, the object that can also be in viewfinder area changed.
Above-mentioned server can be to provide the server of target video circulation hair.Image capture device can integrate in terminal On, for example the front camera of mobile phone terminal or rear camera etc., image capture device can also be for independently of terminal presence But the equipment with terminal communication connection, such as with the camera of computer terminal connection etc..
Above-mentioned type of sports is the type of sports pre-defined, such as according to the cycling of outdoor sports classification of type, race Step, walking etc., for another example according to the small movements of motion intense degree classification, small movement, big movement, completely movement etc..
Step S206, server control first filter are filtered third video frame according to target type of sports, e.g., By the filtering parameter in second filter (used filter before the i.e. original filter being not configured or this filtering) Value is configured to numerical value corresponding with target type of sports, obtains first filter, and third video frame is position in target video stream In the video frame of third playing time, third playing time is later than the first playing time and the second playing time, second filter For being filtered for the video frame before being located at third playing time in target video stream;Third is regarded by first filter Frequency frame is filtered, and in other words, the continuous variation of amiable video flowing, filter is also to fit by oneself real-time adjusting parameter Answer different scenes.
It should be noted that above-mentioned steps S202-S206 can be server to user terminal 103 to user terminal 105 The target video stream of transmission is filtered, and can also be the target that server transmits user terminal 105 to user terminal 103 Video flowing is filtered, the target video stream that can also be server while transmitting to user terminal 103 to user terminal 105 It is filtered with user terminal 105 to the target video stream that user terminal 103 transmits.
Above-described embodiment is said so that the filtering method of the video of the embodiment of the present invention is executed by server 101 as an example It is bright, as shown in figure 3, the filtering method of the video of the embodiment of the present invention can also be executed by terminal, relative to previous embodiment, Its main distinction is that executing subject is changed by server for terminal, can opposite user's end such as terminal 103 The target video stream of 105 transmission of end is filtered, and can also be carried out to user terminal 105 to the target video stream oneself transmitted Filtering processing, can also the target transmitted to oneself of opposite user terminal 105 transmits simultaneously target video stream and user terminal 105 Video flowing is filtered;It is similar with user terminal 103 for user terminal 105.Optionally, terminal executes this hair The filtering method of the video of bright embodiment is also possible to be executed by client mounted thereto.
Above-described embodiment can also be common by server 101 and terminal with the filtering method of the video of the embodiment of the present invention It executes, as shown in figure 4, on the subscriber terminal by the setting of main filtering logic, and the logic setting for how configuring filter is existed On server, terminal provides video frame and determines type of sports according to provided video frame by server to server, and according to this Filtering parameter corresponding with type of sports is generated, and passes to terminal side, control filter is corresponding according to target type of sports Filtering parameter is filtered third video frame.Fig. 4 is only illustrated for being executed jointly by server 101 and terminal 103, It is executed similar, repeated no more jointly by server 101 and terminal 105.
Even if can by the above-mentioned technical proposal of the application be applied to real-time video call, video communication, video conference, in real time The scenes such as video acquisition, the program can solve the problems, such as the video noise in mobile device under the scenes such as real-time video call.
In the technical solution referred in the application background technique, the relativity of time domain of video is not accounted for, is adopted The scheme of image noise reduction will cause the problems such as image is fuzzy, picture has smear, delay is larger, and the step of the application Technical solution shown in S202 to step S206, the technical program then only need to cache previous frame information (i.e. the second video frame or 5th video frame), it is contemplated that the relativity of time domain (the second video frame of such as current the first video frame and previous moment) of video, The covariance matrix K of Kalman filter is intelligently corrected using global and local motion conditions are calculated, thus reducing noise While will not influence image detail completely, not will cause the fuzzy and smear of image, and due to only needing to cache previous frame Information, data processing amount is smaller, algorithm complexity is lower, and real-time is preferable.
In the application real-time de-noising method above-mentioned based on Kalman filter and bilateral filtering, multiframe is needed to cache Delay is introduced, airspace Wiener filter will lead to fuzzy pictures, algorithm complexity is made by the way of estimation significantly very It is high;And scheme shown in step S202 to step S206 then only needs to cache previous frame information, can assess scene motion feelings in real time Condition, it is global (intelligent scene i.e. based on whole frame adapts to) and local (being adapted to based on the intelligent scene put pixel-by-pixel) using calculating Motion conditions intelligently correct the covariance matrix K of Kalman filter, select the Q value for being suitble to current scene, Kalman filtering Device carries out noise reduction according to different Q value, to will not influence image detail completely while reducing noise, to obtain different fields Optimal vedio noise reduction effect under scape.
Filtering parameter (or being quality factor) in above-mentioned Q value, that is, filter, Q value is smaller, shows prediction result most Accounting is smaller in reality output result afterwards, more receives actual observation value, drags brought by prediction when can reduce movement in this way Shadow problem, opposite Q value is bigger, shows that predicted value is more quasi-, should more receive predicted value in reality output.
It is to utilize superpixel segmentation method in the application filtering method above-mentioned based on dividing method and SVD method The flat site and texture region in image are distinguished, airspace filter is then utilized respectively and operates to obtain the image after noise reduction, it should There is also many restrictions for scheme, for example do not consider that scene problem causes noise reduction effect poor, above-mentioned steps S202 to step S206 Shown in scheme stresses is to obtain the global and local sports immunology of image according to the different situations of moving scene in video, And then covariance matrix K is adaptively adjusted, thus the noise reduction effect for the processing different scenes for keeping Kalman filter adaptive, from And the adaptability and filter effect of the filtering method can be improved.
S202 to step S206 through the above steps, obtains the first video frame and the second video frame, and the first video frame is mesh The video frame for being located at the first playing time in video flowing is marked, the second video frame is to be located at the second playing time in target video stream Video frame, target video stream are the collected video flowing of image capture device;It is determined based on the first video frame and the second video frame Target type of sports, target type of sports are the viewfinder area of image capture device in the first playing time and the second playing time Between the type of sports that is moved;Control first filter is filtered third video frame according to target type of sports, the Three video frames be target video stream in be located at third playing time video frame, third playing time be later than the first playing time and Second playing time, due to only needing to cache previous frame information, data processing amount is smaller, algorithm complexity is lower, real-time compared with It is good, it is mentioned while can solve the poor technical problem of the real-time of progress noise reduction process in the related technology, and then reach noise reduction The technical effect of high real-time.
Continue to be illustrated so that executing subject is server as an example for the unification of description, in subsequent embodiment.
In the technical solution that step S202 is provided, with the promotion of mobile phone capacity, camera quality and network quality, more It is more excavated by people come the scene mostly by video, for example video calling is becoming increasingly popular, short Video Applications are got over Carry out more popular, live streaming class using like a raging fire.Server obtain the first video frame and the second video frame can for video calling, Video frame in short-sighted frequency, live video etc., for example, communicated in first terminal and second terminal by target video stream In the process, the first video frame and the second video frame are intercepted from target video stream, or are adopted in client by image capture device During integrating target video stream (can be live video, short-sighted frequency etc.), intercepted from target video stream the first video frame and Second video frame.
Certainly being widely used along with video, the problem under each scene is increasingly taken seriously, such as following scene: The standard configuration that U.S. face and filter are applied as video class opens U.S. face, the function of filter, due to changing the brightness and coloration of picture Etc. information, will lead to noise and be amplified and influence subjective experience;What video calling, short-sighted frequency and live streaming were applied uses peak period one As be 6 points to 12 points at night, and be essentially all that at night, therefore having scenes much more very is shot under dark scene during this, And the noise under dark scene is to influence very much subjective experience;Backlight uses, and many application scenarios users are back to light source or light It is used in the insufficient situation in source, make user's face or shoots the under-exposure of main body, caused noise very big, influence subjective experience; After gradually developing from 640*480 toward 960*540 or even 1280*720 with the resolution ratio of video, resolution ratio is bigger, camera Capturing ability is also stronger, and video noise also can be more serious therewith.Although noise increasingly interferes user's under the above scene Practical subjective experience, but the scheme of real-time video noise reduction can be provided currently without an application.And the technical solution energy of the application The scheme (technical solution provided referring to step S204 and step S206) of real-time video noise reduction is provided.
In the technical solution that step S204 is provided, server determines that target is transported based on the first video frame and the second video frame Dynamic type, target type of sports be image capture device viewfinder area between the first playing time and the second playing time into The type of sports of row movement.
In embodiments herein, determine that target type of sports can be by such as based on the first video frame and the second video frame Under type is realized: obtaining the 4th video frame obtained after first filter is filtered the first video frame, and to the second video The 5th video frame that frame obtains after being filtered, the first playing time of the first video frame are later than the second broadcasting of the second video frame Then moment determines target type of sports according to the 4th video frame and the 5th video frame.
Optionally, in five video frame obtained after acquisition is filtered the second video frame, the first filtering can be obtained Device or second filter (first filter is to carry out matching to the filtering parameter Q of second filter postponing) are to the second video The 5th video frame that frame obtains after being filtered.
Optionally, determine that target type of sports may include following steps 1- step according to the 4th video frame and the 5th video frame 3:
Step 1, in determining the 4th video frame in the pixel value of pixel and the 5th video frame when the pixel value of pixel, It can determine the pixel value of the second pixel in the pixel value of the first pixel and the 5th video frame in the 4th video frame, the first pixel O'clock in the 4th video frame represented object and the second pixel in the 5th video frame represented by object it is identical, such as Fig. 5 Shown, these pixels can be the pixel for indicating canthus, and can also be indicates other target objects such as face, forehead, hair Pixel.
Pixel value is the value assigned when image is digitized by computer, it represents a certain small cube (i.e. pixel) Average luminance information, or perhaps average reflection (transmission) density information of the small cube, or be gray value, commonly use 8 tables Show the pixel value of a pixel, 256 tonal gradations (pixel value is between 0-255) a total of in this way, each grade represents difference Brightness.
Step 2, it determines in the 4th video frame in the pixel value of pixel and the 5th video frame between the pixel value of pixel Pixel value difference.
Optionally it is determined that in the 4th video frame in the pixel value of pixel and the 5th video frame between the pixel value of pixel Pixel value difference include at least one of following implementations:
Mode one, by the pixel of the second pixel in the pixel value of the first pixel in the 4th video frame and the 5th video frame Difference between value is as pixel value difference, as shown in figure 5, the first pixel and the second pixel can be only a pixel.
Mode two, using the difference between the first average value and the second average value as pixel value difference, the first average value is the The average value of the pixel value of multiple first pixels in four video frames, the second average value are multiple second pixels in the 5th video frame The average value of the pixel value of point, multiple first pixels are located at the same image-region in the 4th video frame, multiple second pixels Point is located at the same image-region in the 5th video frame, as shown in fig. 6, above-mentioned image-region is the area for indicating same target Domain, the eye areas as where eyes, the first average value and the second average value are all pictures in eye areas in corresponding video frame The average value of vegetarian refreshments.
Mode three, using the difference between the first pixel value and the second pixel value as pixel value difference, the first pixel value is more Maximum value in the pixel value of a first pixel, the second pixel value are the maximum value in the pixel value of multiple second pixels, As shown in fig. 6, the first pixel value can be the maximum value in pixel in eye areas in the 4th video frame, the second pixel value can be with For the maximum value in pixel in eye areas in the 5th video frame.
Mode four, using the difference between third pixel value and the 4th pixel value as pixel value difference, third pixel value is more Minimum value in the pixel value of a first pixel, the 4th pixel value are the minimum value in the pixel value of multiple second pixels, As shown in fig. 6, third pixel value can be the minimum value in pixel in eye areas in the 4th video frame, the 4th pixel value can be with For the minimum value in pixel in eye areas in the 5th video frame.
It should be noted that carry out operation pixel value difference according to one way in which in same primary adjustment, then this Operation mode in secondary calculating between all pixels point is all made of this kind of mode.
Optionally, the first above-mentioned pixel and the second pixel can also be the pixel for being not representing same target.
It should be noted that aforesaid way one only accounts for the pixel value of the partial pixel in video frame to mode four, it can To guarantee requirement of the Real-Time Filtering to arithmetic speed;In an alternative embodiment, pixel in the 4th video frame is determined Pixel value difference in pixel value and the 5th video frame between the pixel value of pixel can also descend implementation (being denoted as mode five):
Mode five, using the difference between third average value and the 4th average value as pixel value difference, third average value is the The average value of the pixel value of all pixels point in four video frames, the 4th average value are the pixel of all pixels point in the 5th video frame The average value of value, since the pixel of consideration is more, although can slightly sacrifice some time, precision can be higher.
Step 3, will type of sports corresponding with pixel value difference as target type of sports.
It is alternatively possible to the corresponding relationship of pre-configured difference difference and type of sports, a kind of optional mode such as table 1:
Table 1
Pixel difference delta Type of sports Corresponding Q value control variable (filtering parameter)
Delta≤threshold value 1 Picture still Q=0.035
1 < delta of threshold value≤threshold value 2 Picture small movements Q=0.05
2 < delta of threshold value≤threshold value 3 The small movement of picture Q=0.075
3 < delta of threshold value≤threshold value 4 The big movement of picture Q=0.08
Delta >=threshold value 5 Picture moves completely Q=0.1
As shown in table 1, the section where calculated difference is searched, such as before threshold value 1 and threshold value 2, then movement class Type is then picture small movements.
In the technical solution that step S206 is provided, first filter is controlled according to target type of sports to third video frame It is filtered, third video frame is to be located at the video frame of third playing time in target video stream, and third playing time is later than the One playing time and the second playing time.
In the above-described embodiments, server control first filter filters third video frame according to target type of sports It is corresponding with target type of sports that wave can be accomplished in that the value by the filtering parameter in second filter is configured to Numerical value, obtains first filter, and second filter is used to be located at the video frame before third playing time in target video stream It is filtered, as shown in table 1, if type of sports is picture small movements, then the value of filtering parameter Q can be 0.05;Pass through First filter is filtered third video frame.
Optionally, above-mentioned filter can be Kalman filter, filtered by first filter to third video frame When wave, the first pixel value of third pixel can be obtained, third pixel is any one pixel in third video frame;Pass through The pixel value of third pixel is transformed to the second pixel value by the first pixel value by Kalman filter, and the second pixel value is karr What graceful filter obtained after converting according to the value of filtering parameter to the pixel value of third pixel.
Above-mentioned Kalman filtering is a kind of efficient recursion filter (autoregressive filter), it can be from a series of Incomplete and measurement comprising noise in, estimate the state of dynamical system.
Application mode of the Kalman filter in vedio noise reduction is simply enumerated below:
Step 1, the value src_curr of the pixel of present image, the corresponding points filter_ of current filter image are inputted Curr, the correspondence filter_prev of forward direction filtering image;
Step 2, calculating delta=filter_curr-filter_prev (may be implemented original video frame by the step Conversion to filtering video frame);
Step 3, R_curr=1+R_prev/ (1+K_prev) is calculated, R_curr is a variable for controlling K;
Step 4, P_curr=pCorrection_prev+Q*delta*delta is calculated, P_curr indicates the pre- of present frame Measured value;
Step 5, K_curr=P_curr/ (P_curr+R_curr) is calculated, K_curr value can be understood as Kalman's increasing Benefit, determines this predicted value changes how many amplitude, for determining the degree of updated value;
Step 6, Pred_curr=pCorrection_prev+K_curr* (src_curr-pCorrection_ is calculated Prev), Pred_curr indicates the predicted value finally exported;
Step 7, pCorrection_curr=(1-K_curr) * P_curr is calculated.
The parameters in covariance matrix K can be sought by step 2 to step 7, to select to be suitble to current scene Q value, Kalman filter according to different Q value carry out noise reduction.
After the completion of all pixels point of present frame calculates:
R_curr is assigned to R_prev, P_curr is assigned to P_prev, K_curr is assigned to K_prev, it will The value of pCorrection_curr is assigned to pCorrection_prev;The present frame curr result calculated is made as next frame Prev.
By assessing the image content of video in real time, the motion conditions of scene are calculated, select the Q value for being suitble to current scene, To control the noise reduction effect of Kalman filter, reaching different scenes has optimal noise reduction effect, using aforesaid way energy It enough realizes that intelligent scene adapts to, by the estimation to scene motion, realizes global and local motion conditions prediction, and then in real time The intensity for modifying noise reduction, reaches and different scenes is carried out with adaptive noise reduction.
Present application addresses the video noise problems of the upper real-time video call such as mobile device.Due to video traditional at present Noise reduction algorithm still remains problems: such as will cause fuzzy pictures, picture has smear, the problems such as cannot handling in real time.This Application assesses scene motion situation according to image content in real time, to select the Q value for being suitble to current scene, Kalman filter Noise reduction is carried out according to different Q value, to obtain vedio noise reduction effect optimal under different scenes.The application essentially consists in can be adaptive The vedio noise reduction under different scenes is answered, in the case where guaranteeing noise reduction effect, is not in smear and can be carried out real-time noise reduction. As a kind of optional embodiment, embodiments herein is described in detail below with reference to Fig. 7 to embodiment shown in Fig. 8.
Intelligent scene based on whole frame adapts to as shown in Figure 7:
In present embodiment, original video sequence (such as the first video frame and the second video frame) obtains after filtering image Current filter image and forward direction filtering image (such as the 5th video frame) are carried out difference by current filter image (such as the 4th video frame) It calculates, obtains the difference value of each pixel, after carrying out statistics summation to each pixel of full frame image, be calculated and work as Motion change situation of the previous frame relative to forward frame, then according to the value of Q in situation of change intelligent control Kalman filter.Such as Fruit motion change is big, then shows that noise level is smaller, using lower predicted value, to avoid because using stronger prediction It is worth and causes smear;If motion change is small, show that noise level is bigger, using higher predicted value, so as to very Good removes noise.
A kind of optional process is as follows:
Step 1, current video sequence frame is inputted;
Step 2, present frame is filtered, obtains current filter image;
Step 3, current filter image and forward direction filtered image data input intelligence are adapted into module, by two field pictures Carry out difference calculating, count full frame image difference and, obtain the mass motion situation assessment of present frame, selection adapts to current fortune The emotionally Q value of condition;
Step 4, the Q value that intelligence adapts to scene is sent into Kalman filter;
Step 5, the noise reduction output of present frame is obtained after Kalman filter;
Step 6, to filtering image before current filter image data being transmitted to;
Step 7, cycle values abovementioned steps optimize into next round.
It should be noted that due in vedio noise reduction Kalman filter itself need to use the letter of present frame filtering image Breath, therefore extra computation filtering image is not needed, and just with current filter image;Calculate the difference of two field pictures Value is not limited to directly carry out phase reducing to two respective pixels, can equally use N*N in image (N indicates N number of pixel) Maximum value, minimum value or the average value in region etc. carry out difference calculating;
Intelligent scene adaptive strategy is as shown in table 2:
Table 2
Whole frame difference counts SUM Motion conditions Corresponding Q value controls variable
SUM≤threshold value 1 Picture still Q=0.035
1 < SUM of threshold value≤threshold value 2 Picture small movements Q=0.05
2 < SUM of threshold value≤threshold value 3 The small movement of picture Q=0.075
3 < SUM of threshold value≤threshold value 4 The big movement of picture Q=0.08
SUM >=threshold value 5 Picture moves completely Q=0.1
For the use of above-mentioned table 2, it should be noted that SUM is counted for whole frame difference, due to the calculation of difference Difference, therefore the range of SUM cannot be unified, the threshold value of judgement can not fix, but whole flow process is as follows:
Step 1, the difference of each pixel are as follows: delta=abs (curr-prev), curr are the value of present frame, prev For the value of forward frame;Abs () is the function that takes absolute value.
Step 2, the difference of full frame image and are as follows: delat_count=sum (delta);Sum () is indicated to whole frame picture The delta that each point obtains carries out sum operation.
Step 3, the pixel number of SUM=delta_count/ present frame, current pixel point number=shot length * are drawn Face width (unit of length and width can be pixel).
Step 4, according to the SUM value of calculating, obtain the mean motion situation of entire picture, then using setting threshold value into Row judgement, if setting corresponding value for the Q value of whole frame in some section, then gives adaptive Q value to Kalman Filter, to realize the filtering to next frame image.
It is adapted to based on the intelligent scene put pixel-by-pixel as shown in Figure 8:
Original video sequence obtains current filter image after filtering image, Kalman filter to each pixel into For row pixel-by-pixel in noise reduction process, the corresponding pixel points for calculating current pixel point and forward direction filtering image carry out difference calculating, obtain Movement of the current pixel point relative to forward frame corresponding pixel points is calculated in the difference value of current pixel point and forward direction pixel Situation of change, then according to the Q value of current pixel point in situation of change intelligent control Kalman filter.If motion change Greatly, then show that noise level is smaller, using lower predicted value, to avoid because causing to drag using stronger predicted value Shadow;If motion change is small, show that noise level is bigger, using higher predicted value, so as to well by noise Remove.
A kind of optional process is as follows:
Step 1, current video sequence frame is inputted;
Step 2, present frame is filtered, obtains current filter image;
Step 3, Kalman filter carries out prediction and renewal process to each pixel;
Step 4, current filter pixel and forward frame corresponding pixel points are subjected to difference calculating, obtain current pixel point and The difference of forward direction pixel obtains motion change feelings of the current pixel point relative to the corresponding pixel points of forward frame according to difference Condition, to obtain the noise level Q value for being adapted to current pixel point;
Step 5, Kalman filter calculates the noise reduction result of current pixel point according to Q value;
Step 6, circulation executes step 1.
It should be noted that due in vedio noise reduction Kalman filter itself need to use present frame filtered pixel point Information, therefore extra computation filtering image is not needed, and just with current filter pixel value.Calculate current and forward direction The difference of pixel is not limited to directly carry out phase reducing to two respective pixels, equally can be to current pixel point Maximum value, minimum value or the average value of N*N neighborhood at center etc. carry out difference calculating;
Intelligent scene adaptive strategy is as shown in table 1.Pixel difference delta, since the calculation of difference is different, The range of delta cannot be unified, and the threshold value of judgement can not fix, but process is as follows:
Step 1, the difference of current pixel point are as follows: delta=abs (curr-prev);Curr is the pixel of present frame Value, prev are the pixel point value of forward frame;Abs () is the function that takes absolute value.
Step 2, according to the delta value of calculating, the motion conditions of current pixel point are obtained, then using setting threshold value into Row judgement, if setting corresponding value for the Q value of whole frame in some section, then gives adaptive Q value to Kalman Filter.
Due to there are many kinds of current vedio noise reduction algorithms, but limited, the view that can be handled the problem of each algorithm can solve Frequency noise scenarios are also limited, and work as product and apply in the high product of user volume, such as the products such as instant messaging application, P figure When, very strict requirement is proposed to the adaptability of algorithm, both picture will adapt to different scenes, eliminate the same of noise When, there can be no obscuring, smear can not occur, while requiring energy real-time perfoming noise reduction, performance consumption of the algorithm to equipment again Very little again, so this programme is while carrying out real-time noise-reducing using Kalman filter, using intelligent scene adaptive algorithm, Follow-up scene changes situation dynamic adjusts the turnover rate of Kalman filter in real time, reaches the intelligence adaptation to different scenes. As shown in figure 9, prediction will be substantially better than scheme in the related technology using the technical solution of the application, especially transported in video In the case where dynamic, scheme, which will appear error prediction, in the related technology causes picture to go wrong, and the application energy in motion prediction According to the process that motion conditions adjustment is predicted, the problem of being not in prediction incorrectness.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Other side according to an embodiment of the present invention additionally provides a kind of for implementing the filtering method of above-mentioned video The filter of video.Figure 10 is a kind of schematic diagram of the filter of optional video according to an embodiment of the present invention, is such as schemed Shown in 10, the apparatus may include: acquiring unit 1001, determination unit 1003 and filter unit 1005.
Acquiring unit 1001, for obtaining the first video frame and the second video frame, wherein the first video frame is target video It is located at the video frame of the first playing time in stream, the second video frame is the video for being located at the second playing time in target video stream Frame, target video stream are the collected video flowing of image capture device;
Determination unit 1003, for determining target type of sports based on the first video frame and the second video frame, wherein target Type of sports is the fortune that the viewfinder area of image capture device is moved between the first playing time and the second playing time Dynamic type;
Filter unit 1005 is filtered third video frame according to target type of sports for controlling first filter, Wherein, third video frame is to be located at the video frame of third playing time in target video stream, and third playing time is later than first and broadcasts Put moment and the second playing time.
It should be noted that the acquiring unit 1001 in the embodiment can be used for executing the step in the embodiment of the present application S202, the determination unit 1003 in the embodiment can be used for executing the step S204 in the embodiment of the present application, in the embodiment Filter unit 1005 can be used for executing the step S206 in the embodiment of the present application.
Herein it should be noted that above-mentioned module is identical as example and application scenarios that corresponding step is realized, but not It is limited to above-described embodiment disclosure of that.It should be noted that above-mentioned module as a part of device may operate in as In hardware environment shown in FIG. 1, hardware realization can also be passed through by software realization.
By above-mentioned module, the first video frame and the second video frame are obtained, the first video frame is to be located in target video stream The video frame of first playing time, the second video frame are to be located at the video frame of the second playing time in target video stream, target view Frequency stream is the collected video flowing of image capture device;Target type of sports is determined based on the first video frame and the second video frame, Target type of sports is that the viewfinder area of image capture device is moved between the first playing time and the second playing time Type of sports;Control first filter is filtered third video frame according to target type of sports, and third video frame is mesh The video frame for being located at third playing time in video flowing is marked, when third playing time is later than the first playing time and the second broadcasting It carves, is mentioned while can solve the poor technical problem of the real-time of progress noise reduction process in the related technology, and then reach noise reduction The technical effect of high real-time.
Above-mentioned determination unit can include: module is obtained, for obtaining after first filter is filtered the first video frame The 4th obtained video frame, and the 5th video frame obtained after being filtered to the second video frame, wherein the of the first video frame One playing time is later than the second playing time of the second video frame;Determining module, for according to the 4th video frame and the 5th video Frame determines target type of sports.
Optionally, above-mentioned determining module can include: acquisition submodule, for obtaining the pixel of pixel in the 4th video frame The pixel value of pixel in value and the 5th video frame;First determines submodule, for determining the picture of pixel in the 4th video frame Pixel value difference in element value and the 5th video frame between the pixel value of pixel;Second determines submodule, and being used for will be with pixel difference It is worth corresponding type of sports as target type of sports.
Above-mentioned acquisition submodule can also be used in the pixel value and the 5th video frame that obtain the first pixel in the 4th video frame In the second pixel pixel value, wherein the first pixel object and the second pixel represented in the 4th video frame exist Represented object is identical in 5th video frame.
Optionally, first determine that submodule is also used to execute following one:
It will be in the pixel value of the first pixel in the 4th video frame and the 5th video frame between the pixel value of the second pixel Difference as pixel value difference;
Using the difference between the first average value and the second average value as pixel value difference, wherein the first average value is the 4th The average value of the pixel value of multiple first pixels in video frame, the second average value are multiple second pixels in the 5th video frame Pixel value average value, multiple first pixels are located at the same image-region in the 4th video frame, multiple second pixels Same image-region in the 5th video frame;
Using the difference between the first pixel value and the second pixel value as pixel value difference, wherein the first pixel value is multiple Maximum value in the pixel value of first pixel, the second pixel value are the maximum value in the pixel value of multiple second pixels;
Using the difference between third pixel value and the 4th pixel value as pixel value difference, wherein third pixel value is multiple Minimum value in the pixel value of first pixel, the 4th pixel value are the minimum value in the pixel value of multiple second pixels.
Above-mentioned first determines that submodule can also be used in: using the difference between third average value and the 4th average value as pixel Difference, wherein third average value is the average value of the pixel value of all pixels point in the 4th video frame, and the 4th average value is the 5th The average value of the pixel value of all pixels point in video frame.
Above-mentioned filter unit can include: configuration module, for configuring the value of the filtering parameter in second filter to Numerical value corresponding with target type of sports, obtains first filter, wherein second filter is used to be located in target video stream Video frame before third playing time is filtered;Filter module, for being carried out by first filter to third video frame Filtering.
Above-mentioned first filter is Kalman filter, wherein filter module can also be used in: obtaining the of third pixel One pixel value, wherein third pixel is any one pixel in third video frame;By Kalman filter by third picture The pixel value of vegetarian refreshments is transformed to the second pixel value by the first pixel value, wherein the second pixel value is Kalman filter according to filter What the value of wave parameter obtained after converting to the pixel value of third pixel.
Optionally, acquiring unit can also be used in the mistake communicated in first terminal and second terminal by target video stream Cheng Zhong intercepts the first video frame and the second video frame from target video stream.
By assessing the image content of video in real time, the motion conditions of scene are calculated, select the Q value for being suitble to current scene, To control the noise reduction effect of Kalman filter, reaching different scenes has optimal noise reduction effect, using aforesaid way energy It enough realizes that intelligent scene adapts to, by the estimation to scene motion, realizes global and local motion conditions prediction, and then in real time The intensity for modifying noise reduction, reaches and different scenes is carried out with adaptive noise reduction.
Present application addresses the video noise problems of the upper real-time video call such as mobile device.Due to video traditional at present Noise reduction algorithm still remains problems: such as will cause fuzzy pictures, picture has smear, the problems such as cannot handling in real time.This Application assesses scene motion situation according to image content in real time, to select the Q value for being suitble to current scene, Kalman filter Noise reduction is carried out according to different Q value, to obtain vedio noise reduction effect optimal under different scenes.The application essentially consists in can be adaptive The vedio noise reduction under different scenes is answered, in the case where guaranteeing noise reduction effect, is not in smear and can be carried out real-time noise reduction. As a kind of optional embodiment, embodiments herein is described in detail below with reference to specific embodiment.
Herein it should be noted that above-mentioned module is identical as example and application scenarios that corresponding step is realized, but not It is limited to above-described embodiment disclosure of that.It should be noted that above-mentioned module as a part of device may operate in as In hardware environment shown in FIG. 1, hardware realization can also be passed through by software realization, wherein hardware environment includes network Environment.
Other side according to an embodiment of the present invention additionally provides a kind of for implementing the filtering method of above-mentioned video Server or terminal.
Figure 11 is a kind of structural block diagram of terminal according to an embodiment of the present invention, and as shown in figure 11, which may include: One or more (one is only shown in Figure 11) processors 1101, memory 1103 and (such as above-mentioned implementation of transmitting device 1105 Sending device in example), as shown in figure 11, which can also include input-output equipment 1107.
Wherein, memory 1103 can be used for storing software program and module, such as the filter of the video in the embodiment of the present invention Wave method and the corresponding program instruction/module of device, the software journey that processor 1101 is stored in memory 1103 by operation Sequence and module realize the filtering method of above-mentioned video thereby executing various function application and data processing.Memory 1103 may include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage device, Flash memory or other non-volatile solid state memories.In some instances, memory 1103 can further comprise relative to processing The remotely located memory of device 1101, these remote memories can pass through network connection to terminal.The example packet of above-mentioned network Include but be not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 1105 is used to that data to be received or sent via network, can be also used for processor with Data transmission between memory.Above-mentioned network specific example may include cable network and wireless network.In an example, Transmitting device 1105 includes a network adapter (Network Interface Controller, NIC), can pass through cable It is connected with other network equipments with router so as to be communicated with internet or local area network.In an example, transmission dress 1105 are set as radio frequency (Radio Frequency, RF) module, is used to wirelessly be communicated with internet.
Wherein, specifically, memory 1103 is for storing application program.
The application program that processor 1101 can call memory 1103 to store by transmitting device 1105, it is following to execute Step:
Obtain the first video frame and the second video frame, wherein the first video frame is to be located at first in target video stream to play The video frame at moment, the second video frame are to be located at the video frame of the second playing time in target video stream, and target video stream is figure As the acquisition collected video flowing of equipment;
Target type of sports is determined based on the first video frame and the second video frame, wherein target type of sports is adopted for image The type of sports that the viewfinder area of collection equipment is moved between the first playing time and the second playing time;
Control first filter is filtered third video frame according to target type of sports, wherein third video frame is It is located at the video frame of third playing time in target video stream, when third playing time is later than the first playing time and the second broadcasting It carves.
Processor 1101 is also used to execute following step:
Obtain the first pixel value of third pixel, wherein third pixel is any one pixel in third video frame Point;
The pixel value of third pixel is transformed to the second pixel value by the first pixel value by Kalman filter, In, the second pixel value is obtained after Kalman filter converts the pixel value of third pixel according to the value of filtering parameter It arrives.
Using the embodiment of the present invention, the first video frame and the second video frame are obtained, the first video frame is in target video stream Positioned at the video frame of the first playing time, the second video frame is to be located at the video frame of the second playing time, mesh in target video stream Mark video flowing is the collected video flowing of image capture device;Determine that target moves class based on the first video frame and the second video frame Type, target type of sports are that the viewfinder area of image capture device is transported between the first playing time and the second playing time Dynamic type of sports;Control first filter is filtered third video frame according to target type of sports, and third video frame is It is located at the video frame of third playing time in target video stream, when third playing time is later than the first playing time and the second broadcasting It carves, is mentioned while can solve the poor technical problem of the real-time of progress noise reduction process in the related technology, and then reach noise reduction The technical effect of high real-time.
Optionally, the specific example in the present embodiment can be with reference to example described in above-described embodiment, the present embodiment Details are not described herein.
It will appreciated by the skilled person that structure shown in Figure 11 is only to illustrate, terminal can be smart phone (such as Android phone, iOS mobile phone), tablet computer, palm PC and mobile internet device (Mobile Internet Devices, MID), the terminal devices such as PAD.Figure 11 it does not cause to limit to the structure of above-mentioned electronic device.For example, terminal is also May include than shown in Figure 11 more perhaps less component (such as network interface, display device) or have and Figure 11 institute Show different configurations.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing the relevant hardware of terminal device by program, which can store in a computer readable storage medium In, storage medium may include: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..
The embodiments of the present invention also provide a kind of storage mediums.Optionally, in the present embodiment, above-mentioned storage medium can With the program code of the filtering method for executing video.
Optionally, in the present embodiment, above-mentioned storage medium can be located at multiple in network shown in above-described embodiment On at least one network equipment in the network equipment.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps:
S12 obtains the first video frame and the second video frame, wherein the first video frame is to be located at first in target video stream The video frame of playing time, the second video frame are to be located at the video frame of the second playing time, target video stream in target video stream For the collected video flowing of image capture device;
S14 determines target type of sports based on the first video frame and the second video frame, wherein target type of sports is figure The type of sports moved between the first playing time and the second playing time as the viewfinder area of acquisition equipment;
S16, control first filter are filtered third video frame according to target type of sports, wherein third video Frame is the video frame for being located at third playing time in target video stream, and third playing time is later than the first playing time and second and broadcasts Put the moment.
Optionally, storage medium is also configured to store the program code for executing following steps:
S22 obtains the first pixel value of third pixel, wherein third pixel is any one in third video frame Pixel;
The pixel value of third pixel is transformed to the second pixel value by the first pixel value by Kalman filter by S24, Wherein, the second pixel value is after Kalman filter converts the pixel value of third pixel according to the value of filtering parameter It obtains.
Optionally, the specific example in the present embodiment can be with reference to example described in above-described embodiment, the present embodiment Details are not described herein.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, magnetic disk or light The various media that can store program code such as disk.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention State all or part of the steps of method.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (15)

1. a kind of filtering method of video characterized by comprising
Obtain the first video frame and the second video frame, wherein first video frame is to be located at first in target video stream to play The video frame at moment, second video frame are to be located at the video frame of the second playing time, the mesh in the target video stream Mark video flowing is the collected video flowing of image capture device;
Target type of sports is determined based on first video frame and second video frame, wherein the target type of sports The viewfinder area for acquiring equipment for described image is moved between first playing time and second playing time Type of sports;
Control first filter is filtered third video frame according to the target type of sports, wherein the third video Frame is the video frame for being located at third playing time in the target video stream, and the third playing time is later than described first and plays Moment and second playing time.
2. the method according to claim 1, wherein true based on first video frame and second video frame The type of sports that sets the goal includes:
Obtain the 4th video frame obtained after the first filter is filtered first video frame and to described second The 5th video frame that video frame obtains after being filtered, wherein first playing time of first video frame is later than institute State second playing time of the second video frame;
The target type of sports is determined according to the 4th video frame and the 5th video frame.
3. according to the method described in claim 2, it is characterized in that, true according to the 4th video frame and the 5th video frame Determining the target type of sports includes:
Obtain the pixel value of pixel in the pixel value of pixel and the 5th video frame in the 4th video frame;
It determines in the 4th video frame in the pixel value of pixel and the 5th video frame between the pixel value of pixel Pixel value difference;
Will type of sports corresponding with the pixel value difference as the target type of sports.
4. according to the method described in claim 3, it is characterized in that, obtain in the 4th video frame pixel value of pixel and The pixel value of pixel includes: in 5th video frame
Obtain the pixel of the second pixel in the pixel value of the first pixel and the 5th video frame in the 4th video frame Value, wherein first pixel in the 4th video frame represented object and second pixel described the Represented object is identical in five video frames.
5. the method according to claim 3 or 4, which is characterized in that determine the pixel of pixel in the 4th video frame Pixel value difference in value and the 5th video frame between the pixel value of pixel includes following one:
By the pixel value of the second pixel in the pixel value of the first pixel in the 4th video frame and the 5th video frame Between difference as the pixel value difference;
Using the difference between the first average value and the second average value as the pixel value difference, wherein first average value is The average value of the pixel value of multiple first pixels in 4th video frame, second average value are the 5th video frame In multiple second pixels pixel value average value, the multiple first pixel is located at same in the 4th video frame Image-region, the multiple second pixel are located at the same image-region in the 5th video frame;
Using the difference between the first pixel value and the second pixel value as the pixel value difference, wherein first pixel value is Maximum value in the pixel value of the multiple first pixel, second pixel value are the pixel of the multiple second pixel Maximum value in value;
Using the difference between third pixel value and the 4th pixel value as the pixel value difference, wherein the third pixel value is Minimum value in the pixel value of the multiple first pixel, the 4th pixel value are the pixel of the multiple second pixel Minimum value in value.
6. according to the method described in claim 4, it is characterized in that, determine in the 4th video frame pixel value of pixel and Pixel value difference in 5th video frame between the pixel value of pixel includes:
Using the difference between third average value and the 4th average value as the pixel value difference, wherein the third average value is The average value of the pixel value of all pixels point in 4th video frame, the 4th average value are institute in the 5th video frame There is the average value of the pixel value of pixel.
7. the method according to claim 1, wherein control first filter is according to the target type of sports pair Third video frame, which is filtered, includes:
Numerical value corresponding with the target type of sports is configured by the value of the filtering parameter in second filter, is obtained described First filter, wherein the second filter is used to be located at before the third playing time in the target video stream Video frame be filtered;
The third video frame is filtered by the first filter.
8. the method according to the description of claim 7 is characterized in that the first filter is Kalman filter, wherein logical It crosses the first filter and the third video frame is filtered and include:
Obtain the first pixel value of third pixel, wherein the third pixel is any one in the third video frame Pixel;
The pixel value of the third pixel is transformed to the second picture by first pixel value by the Kalman filter Element value, wherein second pixel value be the Kalman filter according to the value of filtering parameter to the third pixel Pixel value converted after obtain.
9. method as claimed in any of claims 1 to 4, which is characterized in that obtain the first video frame and the second view Frequency frame includes:
During first terminal and second terminal are communicated by the target video stream, from the target video stream Intercept first video frame and second video frame;Or,
During acquiring the equipment acquisition target video stream by described image, institute is intercepted from the target video stream State the first video frame and second video frame.
10. a kind of filter of video characterized by comprising
Acquiring unit, for obtaining the first video frame and the second video frame, wherein first video frame is in target video stream Positioned at the video frame of the first playing time, second video frame is to be located at the view of the second playing time in the target video stream Frequency frame, the target video stream are the collected video flowing of image capture device;
Determination unit, for determining target type of sports based on first video frame and second video frame, wherein described Target type of sports is that described image acquires the viewfinder area of equipment in first playing time and second playing time Between the type of sports that is moved;
Filter unit is filtered third video frame according to the target type of sports for controlling first filter, wherein The third video frame is to be located at the video frame of third playing time in the target video stream, and the third playing time is later than First playing time and second playing time.
11. device according to claim 10, which is characterized in that the determination unit includes:
Module is obtained, for obtaining the 4th video obtained after the first filter is filtered first video frame Frame, and the 5th video frame obtained after being filtered to second video frame, wherein described the first of first video frame Playing time is later than second playing time of second video frame;
Determining module, for determining the target type of sports according to the 4th video frame and the 5th video frame.
12. device according to claim 11, which is characterized in that the determining module includes:
Acquisition submodule, for obtaining in the 4th video frame pixel in the pixel value of pixel and the 5th video frame Pixel value;
First determines submodule, for determining in the 4th video frame picture in the pixel value of pixel and the 5th video frame Pixel value difference between the pixel value of vegetarian refreshments;
Second determine submodule, for will type of sports corresponding with the pixel value difference as the target type of sports.
13. device according to claim 12, which is characterized in that it is described first determine submodule be also used to execute it is following it One:
By the pixel value of the second pixel in the pixel value of the first pixel in the 4th video frame and the 5th video frame Between difference as the pixel value difference;
Using the difference between the first average value and the second average value as the pixel value difference, wherein first average value is The average value of the pixel value of multiple first pixels in 4th video frame, second average value are the 5th video frame In multiple second pixels pixel value average value, the multiple first pixel is located at same in the 4th video frame Image-region, the multiple second pixel are located at the same image-region in the 5th video frame;
Using the difference between the first pixel value and the second pixel value as the pixel value difference, wherein first pixel value is Maximum value in the pixel value of the multiple first pixel, second pixel value are the pixel of the multiple second pixel Maximum value in value;
Using the difference between third pixel value and the 4th pixel value as the pixel value difference, wherein the third pixel value is Minimum value in the pixel value of the multiple first pixel, the 4th pixel value are the pixel of the multiple second pixel Minimum value in value.
14. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein when described program is run Execute method described in 1 to 9 any one of the claims.
15. a kind of electronic device, including memory, processor and it is stored on the memory and can transports on the processor Capable computer program, which is characterized in that the processor executes the claims 1 to 9 by the computer program Method described in one.
CN201810411623.6A 2018-05-02 2018-05-02 Video filtering method and device, storage medium and electronic device Active CN110445951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810411623.6A CN110445951B (en) 2018-05-02 2018-05-02 Video filtering method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810411623.6A CN110445951B (en) 2018-05-02 2018-05-02 Video filtering method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110445951A true CN110445951A (en) 2019-11-12
CN110445951B CN110445951B (en) 2022-02-22

Family

ID=68427015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810411623.6A Active CN110445951B (en) 2018-05-02 2018-05-02 Video filtering method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN110445951B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626137A (en) * 2020-04-29 2020-09-04 平安国际智慧城市科技股份有限公司 Video-based motion evaluation method and device, computer equipment and storage medium
CN113506218A (en) * 2021-07-09 2021-10-15 江苏金海星导航科技有限公司 360-degree video splicing method for multi-compartment ultra-long vehicle type
CN113568278A (en) * 2021-07-06 2021-10-29 中国科学院上海光学精密机械研究所 Curve type reverse photoetching method based on rapid covariance matrix self-adaptive evolution strategy
CN113709324A (en) * 2020-05-21 2021-11-26 武汉Tcl集团工业研究院有限公司 Video noise reduction method, video noise reduction device and video noise reduction terminal
CN114885073A (en) * 2021-02-05 2022-08-09 腾讯科技(深圳)有限公司 Video denoising method and device, storage medium and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175151A (en) * 2006-10-31 2008-05-07 索尼德国有限责任公司 Method and device for fast and effective noise reduction
CN101637016A (en) * 2006-11-10 2010-01-27 爱立信股份有限公司 Motion-compensated temporal recursive filter
JP2010171517A (en) * 2009-01-20 2010-08-05 Hitachi Kokusai Electric Inc Noise reduction circuit
CN102238316A (en) * 2010-04-29 2011-11-09 北京科迪讯通科技有限公司 Self-adaptive real-time denoising scheme for 3D digital video image
US20120321184A1 (en) * 2005-09-29 2012-12-20 Apple Inc. Video acquisition with processing based on ancillary data
CN103024248A (en) * 2013-01-05 2013-04-03 上海富瀚微电子有限公司 Motion-adaptive video image denoising method and device
CN103108109A (en) * 2013-01-31 2013-05-15 深圳英飞拓科技股份有限公司 Digital video noise reduction system and method
CN103533214A (en) * 2013-10-01 2014-01-22 中国人民解放军国防科学技术大学 Video real-time denoising method based on kalman filtering and bilateral filtering

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120321184A1 (en) * 2005-09-29 2012-12-20 Apple Inc. Video acquisition with processing based on ancillary data
CN101175151A (en) * 2006-10-31 2008-05-07 索尼德国有限责任公司 Method and device for fast and effective noise reduction
CN101637016A (en) * 2006-11-10 2010-01-27 爱立信股份有限公司 Motion-compensated temporal recursive filter
JP2010171517A (en) * 2009-01-20 2010-08-05 Hitachi Kokusai Electric Inc Noise reduction circuit
CN102238316A (en) * 2010-04-29 2011-11-09 北京科迪讯通科技有限公司 Self-adaptive real-time denoising scheme for 3D digital video image
CN103024248A (en) * 2013-01-05 2013-04-03 上海富瀚微电子有限公司 Motion-adaptive video image denoising method and device
CN103108109A (en) * 2013-01-31 2013-05-15 深圳英飞拓科技股份有限公司 Digital video noise reduction system and method
CN103533214A (en) * 2013-10-01 2014-01-22 中国人民解放军国防科学技术大学 Video real-time denoising method based on kalman filtering and bilateral filtering

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BINSA MATHEW ET.AL: "VLSI Implementation of Adaptive Kalman Filter for Video Denoising", 《INTERNATIONAL JOURNAL OF RESEARCH IN ENGINEERING AND TECHNOLOGY》 *
张键: "基于DSP的多媒体平台设计及视频滤波的实现", 《中国优秀硕士论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626137A (en) * 2020-04-29 2020-09-04 平安国际智慧城市科技股份有限公司 Video-based motion evaluation method and device, computer equipment and storage medium
CN113709324A (en) * 2020-05-21 2021-11-26 武汉Tcl集团工业研究院有限公司 Video noise reduction method, video noise reduction device and video noise reduction terminal
CN114885073A (en) * 2021-02-05 2022-08-09 腾讯科技(深圳)有限公司 Video denoising method and device, storage medium and electronic equipment
CN114885073B (en) * 2021-02-05 2024-03-15 腾讯科技(深圳)有限公司 Video denoising method and device, storage medium and electronic equipment
CN113568278A (en) * 2021-07-06 2021-10-29 中国科学院上海光学精密机械研究所 Curve type reverse photoetching method based on rapid covariance matrix self-adaptive evolution strategy
CN113506218A (en) * 2021-07-09 2021-10-15 江苏金海星导航科技有限公司 360-degree video splicing method for multi-compartment ultra-long vehicle type

Also Published As

Publication number Publication date
CN110445951B (en) 2022-02-22

Similar Documents

Publication Publication Date Title
CN110445951A (en) Filtering method and device, storage medium, the electronic device of video
KR101926490B1 (en) Apparatus and method for processing image
WO2021007690A1 (en) Exposure control method, apparatus and movable platform
CN101095078B (en) Exposure of digital imaging
CN109951595A (en) Intelligence adjusts method, apparatus, storage medium and the mobile terminal of screen intensity
CN109688351A (en) A kind of image-signal processing method, device and equipment
CN106875422A (en) Face tracking method and device
CN113034384A (en) Video processing method, video processing device, electronic equipment and storage medium
CN111814745B (en) Gesture recognition method and device, electronic equipment and storage medium
CN110868547A (en) Photographing control method, photographing control device, electronic equipment and storage medium
CN110868548B (en) Image processing method and electronic equipment
Zeng et al. 3D-SSIM for video quality assessment
CN112529854A (en) Noise estimation method, device, storage medium and equipment
CN109286758A (en) A kind of generation method of high dynamic range images, mobile terminal and storage medium
CN113297937A (en) Image processing method, device, equipment and medium
CN109886892A (en) Image processing method, image processing apparatus and storage medium
CN112166598B (en) Image processing method, system, movable platform and storage medium
CN113793366A (en) Image processing method, device, equipment and storage medium
Verma et al. Intensity Preserving Cast Removal in Color Images Using Particle Swarm Optimization.
CN107979729A (en) A kind of method and apparatus for showing preview image
CN116485679A (en) Low-illumination enhancement processing method, device, equipment and storage medium
WO2023024519A1 (en) Video processing method and apparatus, device, and system
CN109949479A (en) Data processing method, device and intelligent vending machine based on image difference
CN112567722B (en) Method and apparatus for processing data in a video sequence containing noise
CN111383242B (en) Image fog penetration processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant