光流 | 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
總結(jié)
以上是生活随笔為你收集整理的光流 | MATLAB实现 Brox Optical Flow(代码类)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 开发实践 | Android IP查询实
- 下一篇: 光流 | OpenCV实现简单的opti