Ask Your Question

rsg's profile - activity

2013-09-05 11:38:27 -0600 commented question saturate_cast.hpp undeclared variables

It's 2.4.6.1, which I think is the latest.

2013-09-04 20:38:15 -0600 asked a question saturate_cast.hpp undeclared variables

I'm trying to compile squares.cpp (from github; I'm working in ubuntu using sudo g++ -o squares squares.cpp -lpthread -lX11) and I'm getting error messages claiming there are a number of undeclared variables in saturate_cast.hpp, beginning thus:

In file included from /usr/include/opencv2/core/utility.hpp:46:0,
                 from squares.cpp:6:
/usr/include/saturate_cast.hpp: In function ‘_Tp cv::gpu::device::saturate_cast(schar) [with _Tp = unsigned char, schar = signed char]’:
/usr/include/saturate_cast.hpp:61:24: error: ‘::max’ has not been declared

I'm guessing I'm doing something wrong but I've no idea what or even what to look for. I'd greatly appreciate any help. What I'm actually trying to do by compiling squares.cpp is the following: I have some sets of b&w images showing what in 2d looks like a bunch of light rectangles of similar size and shape (aspect ratio ~6) on a dark, fairly uniform background. I need to find the center positions and, esp., the angles the rectangles are in relative to any edge of the image, and someone recommended squares.cpp - alternatively if anyone knows of another way of doing it I'd appreciate it (I'm not a CS, much less a computer vision expert - I have done tracking of circular shapes using the Mosaic plugin for ImageJ) Thanks!