abahena Posted March 18, 2015 Share Posted March 18, 2015 Hi, Im writing a COP using the full image filter sample. When I loop thru the image I get 0.0078125 Using a constant white color. If I put the default pic(butterfly) I get the same scale 0 to 0.0078125 Its the same if I cast the value to a float or get the value in plain uchar. Any idea, why? cheers, -A Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted March 18, 2015 Share Posted March 18, 2015 Probably because of this => http://en.wikipedia.org/wiki/Machine_epsilon Quote Link to comment Share on other sites More sharing options...
abahena Posted March 22, 2015 Author Share Posted March 22, 2015 Im not doing any operation Im just parametricing 0-1 to 0-256 with: inline int ftoi(float f2){ return floor(f2 == 1.0 ? 255 : f2 * 255.999999999999); } And I get: http://drive.google.com/open?id=0B5fbNW7urbpGRkJVZmFZQU9lM3c&authuser=0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.