next up previous contents index
Next: cfextcenter Up: Reference Previous: cextcenter   Contents   Index

cextract

$ \bigcirc$Name


cextract Extract a subpart of a Cimage




$ \bigcirc$Command Synopsis


cextract [-b b] [-r] in out X1 Y1 X2 Y2 [bg Xc Yc ]



-b b : background grey level (default 0)

-r : if set, X2 and Y2 must be the SIZE of the extracted region

in : input Cimage

out : output Cimage

X1 : upleft corner of the region to extract from input (x)

Y1 : upleft corner of the region to extract from input (y)

X2 : downright corner of the region to extract from input (x)

Y2 : downright corner of the region to extract from input (y)

bg : background Cimage

Xc : new location of X1 on the background, default 0

Yc : new location of Y1 on the background, default 0




$ \bigcirc$Function Summary


Cimage cextract (b , in , bg , out , X1 , Y1 , X2 , Y2 , Xc , Yc , r )

Cimage in , out ;

int X1 , Y1 , X2 , Y2 ;

int *b ;

Cimage bg ;

int *Xc , *Yc ;

char *r ;




$ \bigcirc$Description


This modules extracts the sub-region [X1, X2]×[Y1, Y2] of the input image. Hence, the extracted region has a size of (X2 - X1 +1)×(Y2 - Y1 + 1). If X2 or Y2 are negative or null, then they are considered relatively to the corresponding last possible coordinate. For example, X2 = 0 means that the sub-region will end exactly at the last column of the input image, while Y2 = - 10 will crop 10 lines from the input image. If the sub-region is not included in the input image domain, the b value is used in missing areas.


With the -r option, X2 and Y2 specify the size of the region instead of the ending coordinates, yielding the extracted region [X1, X1 + X2 -1]×[Y1, Y1 + Y2 - 1].


If a bg image is specified, then the upleft corner of the extracted region is placed at position (Xc, Yc) of this background image.




$ \bigcirc$See Also


cmextract.


$ \bigcirc$Version 1.7


Last Modification date : Thu Nov 29 20:23:56 2001


$ \bigcirc$Author


Lionel Moisan






next up previous contents index
Next: cfextcenter Up: Reference Previous: cextcenter   Contents   Index
mw 2004-05-05