Computing the energy
int unweaverComputeEnergy(SEAM_UNWEAVER *pic,SEAM_MARKS *marks,void (*updater)(int done,int of,void *user),void *user,int *error);
Computes the energy of an unweaver. Call this after the image data has been set, but before any seams are removed.
- pic
- Pointer to the unweaver whose energy is to be computed.
- marks
- Optional pointer to a Marks object whose annotations will be used to help compute the energy. This can be NULL if there are no manual marks to consider. See section 4.3 for details.
- updater
- Optional pointer to a function that will be called from time to time as the computation proceeds and can be used to update a user interface with progress details. This can be NULL if no updater is desired. See section 4.5 for details.
- user
- Pointer to user data that is passed to the updater function if one is provided.
- error
- Pointer to an integer in which an error code will be deposited, or NULL if no error code is desired.
If successful nonzero is returned. If unsuccessful zero is returned, along with an appropriate error code if error is not NULL.
Hayden Walles
2015-09-02