本文主要是介绍光流 | MATLAB实现 Brox Optical Flow(代码类),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
博主github:https://github.com/MichaelBeechan
博主CSDN:https://blog.csdn.net/u011344545
function [u, v] = optic_flow_brox(img1, img2)
img1 = imread('frame07.png');
img2 = imread('frame08.png');
alpha = 30.0 ; % Global smoothness variable.
gamma = 80.0 ; % Global weight for derivatives.
[ht, wt, dt] = size( img1 ) ;
num_levels = 40 ; % for face; Number of pyramid levels. Can also be calculated automatically
%power(0.95,40) = 0.1285
im1_hr = gaussianRescaling( img1, power( 0.95, num_levels ) ) ; % Rescaling images
im2_hr = gaussianRescaling( img2, power( 0.95, num_levels ) ) ; % to the top of the
% laplacian pyramid.
u = zeros(size(rgb2gray(im1_hr))); % Initialization.
v = zeros(size(rgb2gray(im1
这篇关于光流 | MATLAB实现 Brox Optical Flow(代码类)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!