00001 00002 /* 00003 * THIS IS A GENERATED FILE; DO NOT EDIT. 00004 * 00005 * Declarations for calling `region_bb' a.k.a. `rbb' as a C library. 00006 * 00007 * Made by intermediate binary region_bb.out on Mon May 3 17:24:41 2010 00008 * 00009 * Source file ../Gen-include.c last modified on Mon May 3 17:04:13 2010 00010 */ 00011 00012 // Original documentation block 00013 /* 00014 * region_bb: find bounding boxes for regions 00015 * 00016 * [bb]=region_bb(x,coord) 00017 * * The list of bounding boxes of regions in the input map x is 00018 * returned in bb. 00019 * * x must be Nan, or a nonnegative integer. Pixels in the 00020 * range 1..Nr, where Nr is the number of regions, are treated as 00021 * belonging to the corresponding region. 00022 * Inputs x of 0 or NaN are treated as off-region. 00023 * * Each bounding box row is of the form [Lm Ln Um Un] where 00024 * L is the lower corner (in both directions) and U is the 00025 * upper corner diagonal from L. The "m" (first coordinate) and 00026 * "n" coordinates are given in that order for L and U. By 00027 * convention, the smallest L = (0,0) and the largest U = (m-1,n-1), 00028 * but see the coord input. 00029 * * If no pixel in a given region numbered between 1..Nr is found, 00030 * NaN is returned for that row's bounding box. 00031 * * The coord input allows for some coordinate transforms. 00032 * coord(1) is an offset, and coord(2) is a block size. To get 00033 * standard Matlab coordinates, use [1 1] to add coord(1)=1 to the 00034 * edges. This is the default: the "conventional" L and U are 00035 * adjusted before output. 00036 * * The block size is for situations where the pixels were 00037 * averaged from a larger image. In this case the corners are 00038 * essentially multiplied by coord(2). The lowest pixel in the 00039 * L block and the highest pixel in the U block are given as the 00040 * bounding box coordinates. 00041 * * This is implemented as a MEX file. 00042 * 00043 * Inputs: 00044 * real x(m,n); -- 0, NaN, or 1..Nr 00045 * opt int coord(1) or coord(2) = [1 1]; 00046 * 00047 * Outputs: 00048 * int bb(Nr,4); 00049 * 00050 * See Also: 00051 * 00052 * turmon may 2001 00053 * 00054 * 00055 */ 00056 00057 // function entry point 00058 mexfn_lib_t main_region_bb; 00059 00060 // argument counts 00061 #define MXT_rbb_NARGIN_MIN 1 00062 #define MXT_rbb_NARGIN_MAX 2 00063 #define MXT_rbb_NARGOUT_MIN 0 00064 #define MXT_rbb_NARGOUT_MAX 1 00065 00066 // input argument numbers 00067 #define MXT_rbb_ARG_x 0 00068 #define MXT_rbb_ARG_coord 1 00069 00070 // output argument numbers 00071 #define MXT_rbb_ARG_bb 0 00072 00073 00074 // (file ends)