Woolz Image Processing
Version 1.7.5
|
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 **)) |
A 1D dynamic programming search procedure assuming a rectangular search region and a given non-local cost function.
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.
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.
imax | number of points on the path |
jmax | number of locations per path point |
local_cost | local cost for each path point |
optimal_cost | return for optimal path cost through each point |
optimal_path | return for optimal path through each point. |
non_local_cost | non-local cost function calculated in terms of current and previous position and current optimal paths. |
int AlgDPTotalCosts | ( | int | imax, |
int | jmax, | ||
double ** | optimal_cost, | ||
int ** | optimal_path, | ||
double(*)(int, int, int, int **) | non_local_cost | ||
) |
imax | number of points on the path |
jmax | number of locations per path point |
optimal_cost | return for optimal path cost through each point |
optimal_path | return for optimal path through each point. |
non_local_cost | non-local cost function calculated in terms |
References AlcFree(), and AlcMalloc().