pyramid_up cannot work with opencv image format. Any suggestion? //// Sample Code.... cv::VideoCapture cap(0); if (!cap.isOpened()) { cerr << "Unable to connect to camera" << endl; return 1; } image_window win; while(!win.is_closed()) { cv::Mat temp; cv_image<bgr_pixel> cimg(temp); //// Below does not work... /// Any suggestion while(cimg.size() < 1800*1800) pyramid_up(cimg); //// std::vector<rectangle> faces = detector(cimg); ..... .. }
I found this method. However, I am not sure, if it is the correct way of doing it in terms of computational cost.
///////// cv_image<bgr_pixel> cimg(temp); matrix<rgb_pixel> img; assign_image(img, cimg); pyramid_up(img); /////////
You either need to use opencv's method for doing it if you want to use cv::Mat or use the two argument version of pyramid_up().
Thanx.
I tried this one, but still get compile error.
cv::Mat temp; if (!cap.read(temp)) { break; } cv_image<bgr_pixel> cimg(temp); pyramid_down<2> pyr; pyramid_up(cimg,pyr); // <======
I mean use one that takes 2 images and give something other than an opencv image as output.
Log in to post a comment.
pyramid_up cannot work with opencv image format. Any suggestion?
//// Sample Code....
cv::VideoCapture cap(0);
if (!cap.isOpened())
{
cerr << "Unable to connect to camera" << endl;
return 1;
}
image_window win;
while(!win.is_closed())
{
cv::Mat temp;
cv_image<bgr_pixel> cimg(temp);
//// Below does not work...
/// Any suggestion
while(cimg.size() < 1800*1800)
pyramid_up(cimg);
////
std::vector<rectangle> faces = detector(cimg);
.....
..
}
I found this method. However, I am not sure, if it is the correct way of doing it in terms of computational cost.
/////////
cv_image<bgr_pixel> cimg(temp);
matrix<rgb_pixel> img;
assign_image(img, cimg);
pyramid_up(img);
/////////
You either need to use opencv's method for doing it if you want to use
cv::Mat or use the two argument version of pyramid_up().
Thanx.
I tried this one, but still get compile error.
cv::Mat temp;
if (!cap.read(temp))
{
break;
}
cv_image<bgr_pixel> cimg(temp);
pyramid_down<2> pyr;
pyramid_up(cimg,pyr); // <======
I mean use one that takes 2 images and give something other than an opencv image as output.