1 | initial version |
You are screwing around with OpenCV smartpointers and explicitly defined pointers. This is where it goes wrong. Let OpenCV handle the memory management and change the code to
#include <opencv2 opencv.hpp="">
using namespace cv;
int main(int argc, char *argv[])
{
int size = 512;
cv::vector<Point> x;
Mat m(1, size, CV_8U, Scalar(128));
findNonZero(m, x);
}
2 | No.2 Revision |
You are screwing around with OpenCV smartpointers and explicitly defined pointers. This is where it goes wrong. Let OpenCV handle the memory management and change the code to
#include <opencv2 opencv.hpp="">
#include <opencv2/opencv.hpp>
using namespace cv;
int main(int argc, char *argv[])
{
int size = 512;
cv::vector<Point> x;
Mat m(1, size, CV_8U, Scalar(128));
findNonZero(m, x);
}
3 | No.3 Revision |
You are screwing around with OpenCV smartpointers and explicitly defined pointers. This is where it goes wrong. Let OpenCV handle the memory management and change the code to
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main(int argc, char *argv[])
{
int size = 512;
cv::vector<Point> vector<Point> x;
Mat m(1, size, CV_8U, Scalar(128));
findNonZero(m, x);
}