Seam carving

int unpickerNextSeam(SEAM_UNPICKER *pic, int *seam,int translate,int *error);

Removes a single seam from an unpicker.

Pointer to the unpicker to remove a seam from.
A pointer to a buffer long enough to hold the index of the pixel removed on each row or column of the seam. For example, if you are removing a vertical seam from an unpicker 500 pixels high, this buffer needs to have room for at least 500 integers. The length of the buffer needed will always be the original height (for a vertical seam) or width (for a horizontal seam), so it is often possible to allocate the buffer once and reuse for each seam removed.

The $ n^{th}$ value in the buffer indicates the column (for a vertical seam) or row (for a horizontal seam) of the pixel removed on the $ n^{th}$ row or column. The precise interpretation depends on the value of the translate parameter. If this is zero then these coordinates are relative to the image as it would be if it had been carved to the state reached before the call. If it is nonzero they are relative to the original image.

A flag that determines whether the returned coordinates will be relative to the current or original image. See the description of the seam parameter for details.
Pointer to an integer in which an error code will be deposited, or NULL if no error code is desired.

If successful, nonzero will be returned and the buffer pointed to by seam will be filled. If unsuccessful, zero will be returned, along with an appropriate error code if error is not NULL.

Hayden Walles 2015-09-02 Logo