Mercurial > hg > svgui
comparison layer/ImageRegionFinder.cpp @ 706:97ea68f62c1f imaf_enc
Merge from default branch
author | Chris Cannam |
---|---|
date | Thu, 05 Dec 2013 09:47:02 +0000 |
parents | 1a0dfcbffaf1 |
children | b66fb15de477 |
comparison
equal
deleted
inserted
replaced
678:26c5f7fd4807 | 706:97ea68f62c1f |
---|---|
116 float dr = float(qRed(a) - qRed(b)) / 255.f; | 116 float dr = float(qRed(a) - qRed(b)) / 255.f; |
117 float dg = float(qGreen(a) - qGreen(b)) / 255.f; | 117 float dg = float(qGreen(a) - qGreen(b)) / 255.f; |
118 float db = float(qBlue(a) - qBlue(b)) / 255.f; | 118 float db = float(qBlue(a) - qBlue(b)) / 255.f; |
119 float dist = sqrtf(dr * dr + dg * dg + db * db); | 119 float dist = sqrtf(dr * dr + dg * dg + db * db); |
120 | 120 |
121 // std::cerr << "thresh=" << thresh << ", dist=" << dist << std::endl; | 121 // cerr << "thresh=" << thresh << ", dist=" << dist << endl; |
122 | 122 |
123 return (dist < thresh); | 123 return (dist < thresh); |
124 } | 124 } |
125 | 125 |