Functions
vil_blob.cxx File Reference

Finds connected regions in a boolean image. More...

#include <algorithm>
#include "vil_blob.h"
#include <cassert>

Go to the source code of this file.

Functions

void vil_blob_labels (const vil_image_view< bool > &src_binary, vil_blob_connectivity conn, vil_image_view< unsigned > &dest_label)
 Produce a label image that enumerates all disjoint blobs in a binary image. More...
 
void vil_blob_labels_to_edge_labels (const vil_image_view< unsigned > &src_label, vil_blob_connectivity conn, vil_image_view< unsigned > &dest_label)
 Set all non-blob-edge pixels in a blob label image to zero. More...
 
void vil_blob_labels_to_regions (const vil_image_view< unsigned > &src_label, std::vector< vil_blob_region > &dest_regions)
 Convert a label image into a list of chorded regions. More...
 
void vil_blob_labels_to_pixel_lists (const vil_image_view< unsigned > &src_label, std::vector< vil_blob_pixel_list > &dest_pixel_lists)
 Convert a label image (or an edge label image) into a set of pixel lists. More...
 

Detailed Description

Finds connected regions in a boolean image.

Author
Ian Scott

Definition in file vil_blob.cxx.

Function Documentation

◆ vil_blob_labels()

void vil_blob_labels ( const vil_image_view< bool > &  src_binary,
vil_blob_connectivity  conn,
vil_image_view< unsigned > &  dest_label 
)

Produce a label image that enumerates all disjoint blobs in a binary image.

Definition at line 84 of file vil_blob.cxx.

◆ vil_blob_labels_to_edge_labels()

void vil_blob_labels_to_edge_labels ( const vil_image_view< unsigned > &  src_label,
vil_blob_connectivity  conn,
vil_image_view< unsigned > &  dest_label 
)

Set all non-blob-edge pixels in a blob label image to zero.

A 4-conn edge is a 4-conn area itself, and not just those pixels which have dissimilar 4-conn neighbours.

Definition at line 199 of file vil_blob.cxx.

◆ vil_blob_labels_to_pixel_lists()

void vil_blob_labels_to_pixel_lists ( const vil_image_view< unsigned > &  src_label,
std::vector< vil_blob_pixel_list > &  dest_pixel_lists 
)

Convert a label image (or an edge label image) into a set of pixel lists.

Convert a label image into a list of pixel lists.

A blob label value of n will be returned in dest_pixels_lists[n-1]. Note that pixel lists are not ordered.

Definition at line 277 of file vil_blob.cxx.

◆ vil_blob_labels_to_regions()

void vil_blob_labels_to_regions ( const vil_image_view< unsigned > &  src_label,
std::vector< vil_blob_region > &  dest_regions 
)

Convert a label image into a list of chorded regions.

A blob label value of n will be returned in dest_regions[n-1].

Definition at line 249 of file vil_blob.cxx.