Code covered by the BSD License
-
costFuncMAD(currentBlk,refBlk...
Computes the Mean Absolute Difference (MAD) for the given two blocks
-
imgPSNR(imgP, imgComp, n)
Computes motion compensated image's PSNR
-
minCost(costs)
Finds the indices of the cell that holds the minimum cost
-
motionComp(imgI, motionVect, ...
Computes motion compensated image using the given motion vectors
-
motionEst4SS(imgP, imgI, mbSi...
Computes motion vectors using Four Step Search method
-
motionEstARPS(imgP, imgI, mbS...
Computes motion vectors using Adaptive Rood Pattern Search method
-
motionEstDS(imgP, imgI, mbSiz...
Computes motion vectors using Diamond Search method
-
motionEstES(imgP, imgI, mbSiz...
Computes motion vectors using exhaustive search method
-
motionEstNTSS(imgP, imgI, mbS...
Computes motion vectors using *NEW* Three Step Search method
-
motionEstSESTSS(imgP, imgI, m...
Computes motion vectors using Simple and Efficient TSS method
-
motionEstTSS(imgP, imgI, mbSi...
Computes motion vectors using Three Step Search method
-
motionEstAnalysis.m
-
View all files
from
Block Matching Algorithms for Motion Estimation
by Aroh Barjatya
Review of various block matching algorithms used for motion estimation in MPEG coding.
|
| minCost(costs) |
% Finds the indices of the cell that holds the minimum cost
%
% Input
% costs : The matrix that contains the estimation costs for a macroblock
%
% Output
% dx : the motion vector component in columns
% dy : the motion vector component in rows
%
% Written by Aroh Barjatya
function [dx, dy, min] = minCost(costs)
[row, col] = size(costs);
% we check whether the current
% value of costs is less then the already present value in min. If its
% inded smaller then we swap the min value with the current one and note
% the indices.
min = 65537;
for i = 1:row
for j = 1:col
if (costs(i,j) < min)
min = costs(i,j);
dx = j; dy = i;
end
end
end
|
|
Contact us at files@mathworks.com