Mercurial > hg > svgui
comparison layer/ImageRegionFinder.cpp @ 946:36cddc3de023 alignment_view
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 20 Apr 2015 09:19:52 +0100 |
parents | b66fb15de477 |
children |
comparison
equal
deleted
inserted
replaced
897:499b637f2a26 | 946:36cddc3de023 |
---|---|
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; |