Woolz Image Processing  Version 1.7.5
AlgDPSearch.c File Reference

A 1D dynamic programming search procedure assuming a rectangular search region and a given non-local cost function. More...

Functions

int AlgDPSearch (int imax, int jmax, double **local_cost, double **optimal_cost, int **optimal_path, double(*non_local_cost)(int, int, int, int **))
 Use dynamic programming to establish an optima path given local and non-local costs. More...
 
int AlgDPTotalCosts (int imax, int jmax, double **optimal_cost, int **optimal_path, double(*non_local_cost)(int, int, int, int **))
 

Detailed Description

A 1D dynamic programming search procedure assuming a rectangular search region and a given non-local cost function.

Author
Richard Baldock
Date
August 2005
Version
Id
be36d80f730d557ab1d21d84c3708f4715b07aea
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Function Documentation

int AlgDPSearch ( int  imax,
int  jmax,
double **  local_cost,
double **  optimal_cost,
int **  optimal_path,
double(*)(int, int, int, int **)  non_local_cost 
)

Use dynamic programming to establish an optima path given local and non-local costs.

Returns
zero
Parameters
imaxnumber of points on the path
jmaxnumber of locations per path point
local_costlocal cost for each path point
optimal_costreturn for optimal path cost through each point
optimal_pathreturn for optimal path through each point.
non_local_costnon-local cost function calculated in terms of current and previous position and current optimal paths.
Source:
AlgDPSearch.c
int AlgDPTotalCosts ( int  imax,
int  jmax,
double **  optimal_cost,
int **  optimal_path,
double(*)(int, int, int, int **)  non_local_cost 
)
Returns
zero
Parameters
imaxnumber of points on the path
jmaxnumber of locations per path point
optimal_costreturn for optimal path cost through each point
optimal_pathreturn for optimal path through each point.
non_local_costnon-local cost function calculated in terms

References AlcFree(), and AlcMalloc().