contrib/mul/vil3d/algo/vil3d_find_blobs.h
Go to the documentation of this file.
00001 // This is contrib/mul/vil3d/algo/vil3d_find_blobs.h
00002 
00003 #ifndef vil3d_find_blobs_h_
00004 #define vil3d_find_blobs_h_
00005 
00006 
00007 //:
00008 // \file
00009 // \brief Identify and enumerate all disjoint blobs in a binary image.
00010 // \author Ian Scott, Kevin de Souza
00011 
00012 
00013 #include <vil3d/vil3d_fwd.h>
00014 
00015 
00016 //: Specify 6- or 26- neighbour connectivity
00017 enum vil3d_find_blob_connectivity
00018 {
00019   vil3d_find_blob_connectivity_6_conn,
00020   vil3d_find_blob_connectivity_26_conn
00021 };
00022 
00023 
00024 //: \brief Identify and enumerate all disjoint blobs in a binary image.
00025 // \param src Input binary image, where false=background, true=foreground.
00026 // \retval dst Output int image; 0=background, and 1...n are labels for each disjoint blob.
00027 void vil3d_find_blobs(const vil3d_image_view<bool>& src,
00028                       vil3d_find_blob_connectivity conn,
00029                       vil3d_image_view<unsigned>& dst);
00030 
00031 
00032 #endif // vil3d_find_blobs_h_