41#include "DGtal/shapes/Shapes.h"
42#include "DGtal/io/boards/Board2D.h"
43#include "DGtal/io/Color.h"
44#include "DGtal/geometry/volumes/DigitalConvexity.h"
45#include "DGtal/geometry/volumes/NeighborhoodConvexityAnalyzer.h"
46#include "DGtal/helpers/Shortcuts.h"
47#include "ConfigExamples.h"
61int main(
int argc,
char** argv )
63 double noise = argc > 1 ? atof( argv[ 1 ] ) : 0.1;
65 params(
"noise", noise )(
"thresholdMin", 128 );
69 Domain image_domain = b_image->domain();
71 for (
auto p : image_domain )
75 if ( (*b_image)( p ) )
79 Color( 10, 255, 10 ) )
81 Color( 255, 10, 10 ) ) );
86 Color( 180, 255, 180 ) )
88 Color( 255, 180, 180 ) ) );
91 board.
saveEPS(
"contour-fcvx-collapsible.eps" );
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Structure representing an RGB triple with alpha component.
const Point & lowerBound() const
const Point & upperBound() const
Aim: A class that models a neighborhood and that provides services to analyse the convexity properti...
void setCenter(Point c, const PointPredicate &X)
bool isFullyConvexCollapsible()
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
static CountedPtr< GrayScaleImage > makeGrayScaleImage(Domain aDomain)
static Parameters defaultParameters()
static CountedPtr< BinaryImage > makeBinaryImage(Domain shapeDomain)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
NeighborhoodConvexityAnalyzer< KSpace, 1 > NCA1
DigitalConvexity< KSpace > DConv
DGtal is the top-level namespace which contains all DGtal functions and types.
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...