MCPcopy Create free account
hub / github.com/davisking/dlib / image_potts_problem

Method image_potts_problem

dlib/test/graph_cuts.cpp:136–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 public:
135
136 image_potts_problem (
137 long nr_,
138 long nc_,
139 dlib::rand& rnd
140 ) : nr(nr_), nc(nc_)
141 {
142 rect = rectangle(0,0,nc-1,nr-1);
143 inner_rect = shrink_rect(rect,1);
144 const unsigned long num_nodes = nr*nc;
145 factors1 = -7*(randm(num_nodes, 1, rnd));
146 factors2 = randm(num_nodes, 4, rnd) > 0.5;
147
148 //factors1 = 0;
149 //set_rowm(factors1, range(0, factors1.nr()/2)) = -1;
150
151 labels.set_size(num_nodes);
152 labels = FREE_NODE;
153
154 count = 0;
155 }
156
157 ~image_potts_problem()
158 {

Callers

nothing calls this directly

Calls 4

randmFunction · 0.70
rectangleClass · 0.50
shrink_rectFunction · 0.50
set_sizeMethod · 0.45

Tested by

no test coverage detected