Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

assertion failere

I try to make object tracking using CamShift. But I cant surpass calcBackProject and I have take error(assertion failure).

02-05 03:35:23.282: E/cv::error()(11447): OpenCV Error: Assertion failed (rsz == dims*2 || (rsz == 2 && _1d) || (rsz == 0 && images.depth(0) == CV_8U)) in void cv::calcBackProject(cv::InputArrayOfArrays, const std::vector<int>&, cv::InputArray, cv::OutputArray, const std::vector<float>&, double), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/histogram.cpp, line 1956

Here is my code. Can anybody help me?(sory my poor eng)

Imgproc.cvtColor(mrgba,mHsv, Imgproc.COLOR_BGR2HSV); List<mat> lHSV= Arrays.asList(mHsv); Mat backproj = new Mat(); Imgproc.calcBackProject(lHSV, new MatOfInt(0, 1),roiHist, backproj,new MatOfFloat(0, 179, 0, 255), 1); RotatedRect rect=Video.CamShift(backproj,roi, new TermCriteria(TermCriteria.EPS,10,1));

click to hide/show revision 2
retagged

updated 2015-02-05 01:53:20 -0600

berak gravatar image

assertion failere

I try to make object tracking using CamShift. But I cant surpass calcBackProject and I have take error(assertion failure).

02-05 03:35:23.282: E/cv::error()(11447): OpenCV Error: Assertion failed (rsz == dims*2 || (rsz == 2 && _1d) || (rsz == 0 && images.depth(0) == CV_8U)) in void cv::calcBackProject(cv::InputArrayOfArrays, const std::vector<int>&, cv::InputArray, cv::OutputArray, const std::vector<float>&, double), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/histogram.cpp, line 1956

Here is my code. Can anybody help me?(sory my poor eng)

Imgproc.cvtColor(mrgba,mHsv, Imgproc.COLOR_BGR2HSV); List<mat> lHSV= Arrays.asList(mHsv); Mat backproj = new Mat(); Imgproc.calcBackProject(lHSV, new MatOfInt(0, 1),roiHist, backproj,new MatOfFloat(0, 179, 0, 255), 1); RotatedRect rect=Video.CamShift(backproj,roi, new TermCriteria(TermCriteria.EPS,10,1));

click to hide/show revision 3
No.3 Revision

updated 2015-02-05 01:54:30 -0600

berak gravatar image

assertion failerefailure

I try to make object tracking using CamShift. But I cant surpass calcBackProject and I have take error(assertion failure).

02-05 03:35:23.282: E/cv::error()(11447): OpenCV Error: Assertion failed (rsz == dims*2 || (rsz == 2 && _1d) || (rsz == 0 && images.depth(0) == CV_8U)) in void cv::calcBackProject(cv::InputArrayOfArrays, const std::vector<int>&, cv::InputArray, cv::OutputArray, const std::vector<float>&, double), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/histogram.cpp, line 1956

1956

Here is my code. Can anybody help me?(sory my poor eng)

 Imgproc.cvtColor(mrgba,mHsv, Imgproc.COLOR_BGR2HSV);
List<mat> List<Mat> lHSV= Arrays.asList(mHsv);
 Mat backproj = new Mat();
Imgproc.calcBackProject(lHSV, new MatOfInt(0, 1),roiHist, backproj,new MatOfFloat(0, 179, 0, 255), 1);
 RotatedRect rect=Video.CamShift(backproj,roi, new TermCriteria(TermCriteria.EPS,10,1));

TermCriteria(TermCriteria.EPS,10,1));

assertion failure

I try to make object tracking using CamShift. But I cant surpass calcBackProject and I have take error(assertion failure).

02-05 03:35:23.282: E/cv::error()(11447): OpenCV Error: Assertion failed (rsz == dims*2 || (rsz == 2 && _1d) || (rsz == 0 && images.depth(0) == CV_8U)) in void cv::calcBackProject(cv::InputArrayOfArrays, const std::vector<int>&, cv::InputArray, cv::OutputArray, const std::vector<float>&, double), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/histogram.cpp, line 1956

Here is my code. Can anybody help me?(sory my poor eng)

 Imgproc.cvtColor(mrgba,mHsv, Imgproc.COLOR_BGR2HSV);
List<Mat> lHSV= Arrays.asList(mHsv);
 Mat backproj = new Mat();
Imgproc.calcBackProject(lHSV, new MatOfInt(0, 1),roiHist, backproj,new MatOfFloat(0, 179, 0, 255), 1);
 RotatedRect rect=Video.CamShift(backproj,roi, new TermCriteria(TermCriteria.EPS,10,1));
click to hide/show revision 5
retagged

updated 2015-02-05 15:46:27 -0600

berak gravatar image

assertion failure

I try to make object tracking using CamShift. But I cant surpass calcBackProject and I have take error(assertion failure).

02-05 03:35:23.282: E/cv::error()(11447): OpenCV Error: Assertion failed (rsz == dims*2 || (rsz == 2 && _1d) || (rsz == 0 && images.depth(0) == CV_8U)) in void cv::calcBackProject(cv::InputArrayOfArrays, const std::vector<int>&, cv::InputArray, cv::OutputArray, const std::vector<float>&, double), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/histogram.cpp, line 1956

Here is my code. Can anybody help me?(sory my poor eng)

 Imgproc.cvtColor(mrgba,mHsv, Imgproc.COLOR_BGR2HSV);
List<Mat> lHSV= Arrays.asList(mHsv);
 Mat backproj = new Mat();
Imgproc.calcBackProject(lHSV, new MatOfInt(0, 1),roiHist, backproj,new MatOfFloat(0, 179, 0, 255), 1);
 RotatedRect rect=Video.CamShift(backproj,roi, new TermCriteria(TermCriteria.EPS,10,1));