Summary of the invention
Object of the present invention is just to provide a kind of video capture noise-reduction method based on mobile device GPU and angular-rate sensor, utilize the data of angular-rate sensor, in conjunction with the physical parameter of camera lens and sensor devices, calculate to obtain global motion compensation parameter, motion compensation, superposition noise reduction are carried out to frame of video, effectively can solve above-mentioned deficiency of the prior art.
The present invention is directed to the deficiencies in the prior art, provide following technical scheme:
Video capture noise-reduction method based on mobile device GPU and angular-rate sensor of the present invention, it is characterized in that, concrete steps are as follows:
101, camera collection is utilized to obtain HD video, the multiple frame of video in the past of buffer-stored;
102, the current video frame of buffer-stored is carried out noise reduction in video single frames frame;
103, multiple frame of video in the past of buffer-stored are carried out inter motion compensation, comprise the following steps;
A () utilizes angular-rate sensor collection to obtain angular velocity data, and angular velocity data is carried out integration, calculates interframe global motion compensation parameter,
B () transfers multiple frame of video in the past, carry out motion compensation according to global motion compensation parameter;
104, the past frame of video of multiple motion compensation is superposed, the pixel of color distance in threshold value is selected with threshold calculations and is superposed with the mixed proportion that superposes of front frame, the result superposition of the pixel that color distance is larger direct interior spatial domain frame by frame noise reduction, output video afterwards;
Particular content is as follows:
Comprise spatial domain noise reduction module and GPU interframe laminating module in high definition video collecting module, frame buffer module, angular velocity detecting module, angular speed integration module, GPU inter motion compensation module, GPU frame.
Further, described step 103 adopts 3 axis angular rate sensors to gather angular velocity data on 3 directions.
Again further, angular velocity data is converted to quaternion algebra according to carrying out integration by described step 103.
Further, described step 103 calculates interframe global motion compensation parameter according to angular velocity data and camera physical parameter.
Compared with prior art, the invention has the advantages that:
Video capture noise-reduction method based on mobile device GPU and angular-rate sensor of the present invention, HD video can be realized on the mobile apparatus to process in real time, utilize the calculated performance of angular-rate sensor and GPU, in conjunction with spatial domain noise reduction in interframe time domain superposition noise reduction and frame, extraordinary noise reduction is all had to Static and dynamic scene, realize most of scene and do not lose details, especially the noise reduction process of static scene neither loses image quality and also add details.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from specification, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write specification, claims and accompanying drawing and obtain.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described.
embodiment:
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Shown in Fig. 1, Fig. 2.
The system of the video capture noise-reduction method based on mobile device GPU and angular-rate sensor of the present invention, comprise high definition video collecting module, frame buffer module, angular velocity detecting module, angular speed integration module, GPU inter motion compensation module, spatial domain noise reduction module and GPU interframe laminating module in GPU frame, described high definition video collecting module is connected with frame buffer module, described frame buffer module also with spatial domain noise reduction module in GPU frame and GPU inter motion compensation model calling, with angular velocity detecting module and GPU inter motion compensation model calling while of described angular speed integration module, described GPU inter motion compensation module is also all connected with GPU interframe laminating module with spatial domain noise reduction module in GPU frame.
High definition video collecting module acquires HD video also outputs to frame buffer module, frame buffer module stores multiple frame of video in the past, and current video frame is outputted to spatial domain noise reduction module in GPU frame and carry out noise reduction in video single frames frame, multiple frame of video is in the past outputted to GPU inter motion compensation module, the interframe global motion compensation parameter that GPU inter motion compensation module calculates according to angular velocity detecting module and angular speed integration module, multiple frame of video is in the past carried out to inter motion compensation and result outputted to GPU interframe laminating module, GPU interframe laminating module in conjunction with multiple motion compensation past frame of video and in frame the current video frame of noise reduction carry out superposing rear output video.
The concrete noise reduction step of the video capture noise-reduction method based on mobile device GPU and angular-rate sensor of the present invention is as follows:
Step 101, camera collection is utilized to obtain HD video, the multiple in the past frame of video of buffer-stored;
High definition video collecting module in charge is from camera collection HD video and output to frame buffer module, frame buffer module is responsible for preserving multiple frame of video in the past, and current video frame is outputted to spatial domain noise reduction module in GPU frame, multiple frame of video is in the past outputted to GPU inter motion compensation module.
Step 102, the current video frame of buffer-stored is carried out noise reduction in video single frames frame;
In GPU frame, spatial domain noise reduction module adopts average, intermediate value, KNN and NLM scheduling algorithm to carry out noise reduction in video single frames frame.
Step 103, multiple in the past frame of video of buffer-stored are carried out inter motion compensation, comprise the following steps;
A () utilizes angular-rate sensor collection to obtain angular velocity data, and angular velocity data is carried out integration, calculates interframe global motion compensation parameter,
The data of angular velocity detecting module Real-time Collection angular-rate sensor, obtain the angular velocity data on 3 directions, and carry out interpolation when being necessary to data.After angular speed integration module obtains the angular velocity information on 3 directions, the local coordinate system converting hypercomplex number representative to carries out integration, realize the prediction of interframe movement direction on 3 directions and angle, simultaneously in conjunction with the physical parameter of camera lens and sensor devices, finally calculate interframe global motion compensation parameter.
B () transfers multiple frame of video in the past, carry out motion compensation according to global motion compensation parameter;
GPU inter motion compensation module, according to interframe global motion compensation parameter, carries out inter motion compensation, with scene of aliging to multiple frame of video in the past.
Step 104, the past frame of video of multiple motion compensation to be superposed, the pixel of color distance in threshold value is selected with threshold calculations and is superposed with the mixed proportion that superposes of front frame, the result superposition of the pixel that color distance is larger direct interior spatial domain frame by frame noise reduction, output video afterwards.
The past frame of video of multiple motion compensation superposes by GPU interframe laminating module, consider that the object that may have rapid movement in scene cannot carry out global motion compensation, when superposing, need the color distance of compared pixels, the pixel of distance in threshold value is thought what noise produced, and with this calculate a factor decide with front frame superpose mixed proportion.For the pixel that color distance is larger, then directly superpose the result of spatial domain noise reduction in frame, finally export de-noising video.
The present invention utilizes the data of angular-rate sensor, learn movement angle and the direction of camera lens between two frames in real time, in conjunction with the physical parameter of camera lens and sensor devices, directly can calculate to obtain global motion compensation parameter, calculate interframe time domain by GPU motion compensation and superposed average again and superpose noise reduction, simultaneously in conjunction with spatial domain noise reduction in video single frames frame, all have extraordinary noise reduction to Static and dynamic scene, especially the noise reduction process of static scene neither loses image quality and also add details.
The present invention can realize HD video on the mobile apparatus and process in real time, utilize the calculated performance of angular-rate sensor and GPU, in conjunction with spatial domain noise reduction in interframe time domain superposition noise reduction and frame, all there is extraordinary noise reduction to Static and dynamic scene, realize most of scene and do not lose details.
Finally illustrate: the foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, although with reference to previous embodiment to invention has been detailed description, for a person skilled in the art, it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.