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

Class potts_pair_image_model

dlib/test/graph_cuts.cpp:1071–1095  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1069 }
1070
1071 struct potts_pair_image_model
1072 {
1073 typedef double value_type;
1074
1075 template <typename pixel_type1, typename pixel_type2>
1076 value_type factor_value (
1077 const pixel_type1& ,
1078 const pixel_type2& v2
1079 ) const
1080 {
1081 return v2;
1082 }
1083
1084 template <typename pixel_type>
1085 value_type factor_value_disagreement (
1086 const pixel_type& v1,
1087 const pixel_type& v2
1088 ) const
1089 {
1090 if (v1 == v2)
1091 return 10;
1092 else
1093 return 0;
1094 }
1095 };
1096
1097 void test_potts_pair_grid()
1098 {

Callers 1

test_potts_pair_gridFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_potts_pair_gridFunction · 0.68