Thursday, 22 August 2013

Bitwise & operator returns 255

Bitwise & operator returns 255

I am using bitwise & operator but instead of 1 and 0 result I am getting
255 and 0.What could be the reason? The code is
cv::Mat TL_k_idx =
((orientation_map.col(0)<=(quad_coords[0]+quad_coords[2])/2) &
(orientation_map.col(1)<=(quad_coords[1]+quad_coords[3])/2));
cout<<TL_k_idx;
The output of TL_k_idx is:
255 255 255 255 0 0............
The orientation_map is of Mat data type,the quad_coords is an array.What
am I doing wrong?

No comments:

Post a Comment