@Namespace(value="cv") @Properties(inherit=opencv_core.class) public class MinProblemSolver extends Algorithm
Modifier and Type | Class and Description |
---|---|
static class |
MinProblemSolver.Function
\brief Represents function being optimized
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
MinProblemSolver(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
MinProblemSolver.Function |
getFunction()
\brief Getter for the optimized function.
|
TermCriteria |
getTermCriteria()
\brief Getter for the previously set terminal criteria for this algorithm.
|
double |
minimize(GpuMat x) |
double |
minimize(Mat x)
\brief actually runs the algorithm and performs the minimization.
|
double |
minimize(UMat x) |
void |
setFunction(MinProblemSolver.Function f)
\brief Setter for the optimized function.
|
void |
setTermCriteria(TermCriteria termcrit)
\brief Set terminal criteria for solver.
|
clear, empty, getDefaultName, position, read, save, save, write, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public MinProblemSolver(Pointer p)
Pointer.Pointer(Pointer)
.@opencv_core.Ptr public MinProblemSolver.Function getFunction()
The optimized function is represented by Function interface, which requires derivatives to implement the calc(double*) and getDim() methods to evaluate the function.
public void setFunction(@opencv_core.Ptr MinProblemSolver.Function f)
It should be called at least once before the call to* minimize(), as default value is not usable.
f
- The new function to optimize.@ByVal public TermCriteria getTermCriteria()
public void setTermCriteria(@Const @ByRef TermCriteria termcrit)
This method *is not necessary* to be called before the first call to minimize(), as the default value is sensible.
Algorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when the function values at the vertices of simplex are within termcrit.epsilon range or simplex becomes so small that it can enclosed in a box with termcrit.epsilon sides, whatever comes first.
termcrit
- Terminal criteria to be used, represented as cv::TermCriteria structure.public double minimize(@ByVal Mat x)
The sole input parameter determines the centroid of the starting simplex (roughly, it tells where to start), all the others (terminal criteria, initial step, function to be minimized) are supposed to be set via the setters before the call to this method or the default values (not always sensible) will be used.
x
- The initial point, that will become a centroid of an initial simplex. After the algorithm
will terminate, it will be set to the point where the algorithm stops, the point of possible
minimum.Copyright © 2020. All rights reserved.