hs

所属分类:matlab编程
开发工具:matlab
文件大小:2264KB
下载次数:21
上传日期:2014-03-05 14:35:36
上 传 者kalthzao
说明:  用matlab编译的经典光流算法HS算法,附有程序需要的图像
(Classic compiled using optical flow algorithm matlab HS algorithm,with Image program need)

文件列表:
hs\@hs_optical_flow\compute_flow.m (3348, 2008-11-11)
hs\@hs_optical_flow\compute_flow_base.m (3580, 2008-10-28)
hs\@hs_optical_flow\display.m (2279, 2008-10-28)
hs\@hs_optical_flow\evaluate_log_posterior.m (2253, 2008-10-28)
hs\@hs_optical_flow\flow_operator.m (3349, 2008-10-28)
hs\@hs_optical_flow\flow_operator_test.m (2766, 2008-11-25)
hs\@hs_optical_flow\hs_optical_flow.m (3280, 2008-11-19)
hs\@hs_optical_flow\parse_input_parameter.m (2073, 2008-12-19)
hs\@hs_optical_flow\private\compute_image_pyramid.m (1953, 2008-10-28)
hs\@hs_optical_flow\private\resample_flow.m (2141, 2008-10-28)
hs\@hs_optical_flow\private\subsample_images.m (2042, 2008-10-28)
hs\@hs_optical_flow\private\warp_images.m (2462, 2008-10-28)
hs\@hs_optical_flow\subsasgn.m (2584, 2008-10-28)
hs\@hs_optical_flow\subsref.m (2512, 2008-10-28)
hs\data\other-data\RubberWhale\frame10.png (360913, 2007-11-18)
hs\data\other-data\RubberWhale\frame11.png (361085, 2007-11-18)
hs\data\other-data-gray\RubberWhale\frame10.png (121446, 2008-08-15)
hs\data\other-data-gray\RubberWhale\frame11.png (121497, 2008-08-15)
hs\data\other-gt-flow\RubberWhale\flow10.flo (1812748, 2007-11-18)
hs\estimate_flow_demo.m (4855, 2009-03-23)
hs\estimate_flow_hs.m (3004, 2009-03-23)
hs\utils\convmtxn.m (3681, 2008-08-26)
hs\utils\flowAngErr.m (1126, 2008-08-26)
hs\utils\flowColorCode\colorTest.m (2410, 2007-11-03)
hs\utils\flowColorCode\computeColor.m (3140, 2008-08-26)
hs\utils\flowColorCode\flowToColor.m (2643, 2008-05-17)
hs\utils\flowColorCode\readFlowFile.m (2737, 2007-11-03)
hs\utils\flowColorCode\writeFlowFile.m (2527, 2007-11-03)
hs\utils\imfiltermtx.m (5934, 2008-02-26)
hs\utils\interp2_bicubic.m (5427, 2008-07-22)
hs\utils\make_convn_mat.m (7626, 2008-02-26)
hs\utils\make_imfilter_mat.m (4800, 2008-02-26)
hs\utils\partial_deriv.m (4845, 2008-11-25)
hs\utils\partial_deriv_new.m (5380, 2008-11-25)
hs\utils\plotflow.m (3674, 2008-08-24)
hs\data\other-data\RubberWhale (0, 2008-08-26)
hs\data\other-data-gray\RubberWhale (0, 2008-08-26)
hs\data\other-gt-flow\RubberWhale (0, 2008-08-26)
... ...

1. demo program a) estimate_flow_demo.m can be run without arguments. It estimates the optical flow for "RubberWhale" sequence using default parameter setting. uv = estimate_flow_demo; The AAE of the estimated flow field on the gray "RubberWhale" should be around 7.2. output UV is an M*N*2 matrix. UV(:,:,1) is the horizontal flow and UV(:,:,2) is the vertical flow. You can download training data files other-color-twoframes.zip, other-gray-twoframes.zip, and other-gt-flow.zip from http://vision.middlebury.edu/flow/data/ and extract within the directory 'data'. Then you can change iSequence from 1 to 12 to select the following sequences 'Venus', 'Dimetrodon', 'Hydrangea', 'RubberWhale', 'Grove2', 'Grove3', 'Urban2', 'Urban3', 'Walking', 'Beanbags', 'DogDance', 'MiniCooper' You can change the parameter setting by providing the parameters you want to change and their values like uv = estimate_flow_demo(iSequence, isColor, 'lambda', 0.05, 'sigma_d', 6); You can change the following parameters iSequence number of the sequence you want to process (1-11) {'Venus', 'Dimetrodon', 'Hydrangea', 'RubberWhale',... 'Grove2', 'Grove3', 'Urban2', 'Urban3', 'Walking', 'Beanbags', 'DogDance', 'MiniCooper'}; isColor 0 - gray image otheriwse - color image 'lambda' trade-off (regularization) parameter for the B&A formulation; default is 200, larger produces smoother flow fields 'pyramid_levels' pyramid levels for the quadratic formulation; default is 4 'pyramid_spacing' reduction ratio up each pyramid level for the quadratic formulation; default is 2 b) estimate_flow_hs.m computes the flow field between two input images im1 and im2 using default or input parameters. uv = estimate_flow_hs(im1, im2, lambda, nLevels, spacing) You can change the parameter setting by providing the parameters you want to change and their values like uv = estimate_flow_ba(im1, im2, 'lambda', 200); You can change the following parameters 'lambda' trade-off (regularization) parameter for the B&A formulation; default is 200, larger produces smoother flow fields 'pyramid_levels' pyramid levels for the quadratic formulation; default is 4 'pyramid_spacing' reduction ratio up each pyramid level for the quadratic formulation; default is 2 2. Display, save, and load estimated flow field. You can display the flow field using the color encoding scheme used at the middlebury website using imshow(uint8(flowToColor(uv))); to write the computed flow to .flo files using fn = sprintf('estimated_flow.flo'); writeFlowFile(uv, fn); read saved flow field (.flo) file using uv = readFlowFile(fn); 3. Some problems that may occur a) Error using ==> \ Out of memory. Type HELP MEMORY for your option. Uncomment this line in estimate_flow_demo.m %ope.solver = 'pcg'; b) Error using ==> interp2 Error in ==> utils\partial_deriv.m Go to line 99 and 107 at utils\partial_deriv.m and follow the instructions there. Please send other problems you encounter to dqsun@cs.brown.edu Have fun! Acknowledgment: Thanks to Feng Li and Jackie Wang for pointing out problems with integer and color input images in the previous version. Reference: 1. Determining Optical Flow, Horn, B.K.P. & B.G. Schunck, Artificial Intelligence, Vol. 17, No. 1-3, August 1***1, pp. 185-203. (http://people.csail.mit.edu/bkph/papers/Optical_Flow_OPT.pdf) 2. A database and evaluation methodology for optical flow, Baker, S., Scharstien, D., Lewis, J. P., Roth, S., Black, M. J., Szeliski, R., Int. Conf. on Computer Vision, ICCV, Rio de Janeiro, Brazil, October 2007. (http://vision.middlebury.edu/flow/flowEval-iccv07.pdf)

近期下载者

相关文件


收藏者