Mercurial > hg > svgui
comparison layer/ImageRegionFinder.cpp @ 905:b66fb15de477 cxx11
Working through the float/double and int/sv_frame_t fixes
author | Chris Cannam |
---|---|
date | Mon, 09 Mar 2015 14:35:21 +0000 |
parents | 1a0dfcbffaf1 |
children |
comparison
equal
deleted
inserted
replaced
904:e0f08e108064 | 905:b66fb15de477 |
---|---|
105 // black and white are boundary cases, don't compare similar | 105 // black and white are boundary cases, don't compare similar |
106 // to anything -- not even themselves | 106 // to anything -- not even themselves |
107 return false; | 107 return false; |
108 } | 108 } |
109 | 109 |
110 float ar = float(qRed(a) / 255.f); | 110 float ar = float(qRed(a)) / 255.f; |
111 float ag = float(qGreen(a) / 255.f); | 111 float ag = float(qGreen(a)) / 255.f; |
112 float ab = float(qBlue(a) / 255.f); | 112 float ab = float(qBlue(a)) / 255.f; |
113 float amag = sqrtf(ar * ar + ag * ag + ab * ab); | 113 float amag = sqrtf(ar * ar + ag * ag + ab * ab); |
114 float thresh = amag / 2; | 114 float thresh = amag / 2; |
115 | 115 |
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; |