minmaxidx-bug.cpp
1 | /*
|
---|---|
2 | * gcc-bug.cpp |
3 | * |
4 | * Created on: Aug 19, 2011 |
5 | * Author: nicu |
6 | */ |
7 | #include <iostream> |
8 | #include <opencv2/opencv.hpp> |
9 | using namespace std; |
10 | |
11 | int main(int argc, char **argv) |
12 | { |
13 | cv::RNG rng; |
14 | cv::Mat dists(5, 5, CV_32F); |
15 | rng.fill(dists, cv::RNG::UNIFORM, 0, 100); |
16 | cout << dists << endl; |
17 | |
18 | void *p;
|
19 | |
20 | for(int r=0; r<dists.rows; ++r) { |
21 | double minVal;
|
22 | int minIdx;
|
23 | p = &minIdx; |
24 | cv::minMaxIdx(dists.row(0), &minVal, NULL, &minIdx); |
25 | cout << 0 << " " << minVal << " " << minIdx << endl; |
26 | } |
27 | |
28 | return 0; |
29 | } |