int unweaverComputeEnergy(SEAM_UNWEAVER *pic,SEAM_MARKS *marks,void (*updater)(int done,int of,void *user),void *user,int *error);
Computing the energy
Computes the energy of an unweaver. Call this after the image data has been set, but before any seams are removed.
- Pointer to the unweaver whose energy is to be computed.
- 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.
- 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.
- Pointer to user data that is passed to the updater function if one is provided.
- 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.