#include "CutSegment.h"
public:
MyCutSegment(
int width,
int height) :
CutSegment(width,height) {};
double gradient(
double color1,
double color2);
};
double diff, weight;
diff = color1-color2;
weight = exp(-sqrt(diff*diff));
return weight;
}
int main() {
int width=128, height=128;
MyCutSegment segment_cut(width,height);
segment_cut.setImageData(I);
segment_cut.setSourceSink(L,0,128);
double flow;
flow = segment_cut.segment();
label = segment_cut.getLabel(1,2);
segment_cut.getLabels(labels);
}