Chan-Vese Segmentation
Data Structures | Macros | Functions
chanvesecli.c File Reference

Chan-Vese image segmentation IPOL demo. More...

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "cliio.h"
#include "chanvese.h"
#include "gifwrite.h"
#include "rgb2ind.h"

Go to the source code of this file.

Data Structures

struct  programparams
 Program parameters struct. More...
 
struct  plotparam
 Plotting parameters struct. More...
 

Macros

#define ROUNDCLAMP(x)
 
#define ATTRIBUTE_UNUSED
 

Functions

static void PrintHelpMessage ()
 
static int PlotFun (int State, int Iter, num Delta, const num *c1, const num *c2, const num *Phi, int Width, int Height, int NumChannels, void *ParamPtr)
 
static int ParseParam (programparams *Param, int argc, const char *argv[])
 
static int PhiRescale (image *Phi)
 
int WriteBinary (image Phi, const char *File)
 
int WriteAnimation (plotparam *PlotParam, int Width, int Height, const char *OutputFile)
 
int main (int argc, char *argv[])
 
static int PlotFun (int State, int Iter, ATTRIBUTE_UNUSED num Delta, ATTRIBUTE_UNUSED const num *c1, ATTRIBUTE_UNUSED const num *c2, const num *Phi, int Width, int Height, ATTRIBUTE_UNUSED int NumChannels, void *ParamPtr)
 

Detailed Description

Chan-Vese image segmentation IPOL demo.

Author
Pascal Getreuer getre.nosp@m.uer@.nosp@m.gmail.nosp@m..com

Copyright (c) 2011-2012, Pascal Getreuer All rights reserved.

This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see http://www.opensource.org/licenses/bsd-license.html.

Definition in file chanvesecli.c.

Macro Definition Documentation

#define ROUNDCLAMP (   x)
Value:
((x < 0) ? 0 : \
((x > 1) ? 255 : (uint8_t)floor(255.0*(x) + 0.5)))

Definition at line 29 of file chanvesecli.c.