Computing the energy
int unpickerComputeEnergy(SEAM_UNPICKER *pic,SEAM_MARKS *marks,void (*updater)(int done,int of,void *user),void *user,int *error);
Computes the energy of an unpicker. Call this after the image data has been set, but before any seams are removed.
- pic
- Pointer to the unpicker 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. Note that if the unpicker is using dynamic energy that the Marks object must persist until all desired seams have been removed.
- 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