00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 static const char docstring[] =
00011 "region_bb: find bounding boxes for regions\n"
00012 "\n"
00013 " [bb]=region_bb(x,coord)\n"
00014 " * The list of bounding boxes of regions in the input map x is\n"
00015 " returned in bb.\n"
00016 " * x must be Nan, or a nonnegative integer. Pixels in the\n"
00017 " range 1..Nr, where Nr is the number of regions, are treated as\n"
00018 " belonging to the corresponding region.\n"
00019 " Inputs x of 0 or NaN are treated as off-region.\n"
00020 " * Each bounding box row is of the form [Lm Ln Um Un] where\n"
00021 " L is the lower corner (in both directions) and U is the\n"
00022 " upper corner diagonal from L. The \"m\" (first coordinate) and\n"
00023 " \"n\" coordinates are given in that order for L and U. By\n"
00024 " convention, the smallest L = (0,0) and the largest U = (m-1,n-1),\n"
00025 " but see the coord input.\n"
00026 " * If no pixel in a given region numbered between 1..Nr is found,\n"
00027 " NaN is returned for that row's bounding box.\n"
00028 " * The coord input allows for some coordinate transforms.\n"
00029 " coord(1) is an offset, and coord(2) is a block size. To get\n"
00030 " standard Matlab coordinates, use [1 1] to add coord(1)=1 to the\n"
00031 " edges. This is the default: the \"conventional\" L and U are\n"
00032 " adjusted before output.\n"
00033 " * The block size is for situations where the pixels were\n"
00034 " averaged from a larger image. In this case the corners are\n"
00035 " essentially multiplied by coord(2). The lowest pixel in the\n"
00036 " L block and the highest pixel in the U block are given as the\n"
00037 " bounding box coordinates.\n"
00038 " * This is implemented as a MEX file.\n"
00039 "\n"
00040 " Inputs:\n"
00041 " real x(m,n); -- 0, NaN, or 1..Nr\n"
00042 " opt int coord(1) or coord(2) = [1 1];\n"
00043 "\n"
00044 " Outputs:\n"
00045 " int bb(Nr,4);\n"
00046 "\n"
00047 " See Also:\n"
00048 "\n"
00049 " turmon may 2001\n"
00050 "\n"
00051 "";
00052
00053
00054