Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Shapes processing and tracking

Until now I can draw shapes from a binary image maskFrame into lastFrame as follows:

cv::Mat lastFrame, ;
std::vector <std::vector <cv::Point>> contours;
// frame processing ... 
findContours(maskFrame, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
drawContours(lastFrame, contours, -1, cv::Scalar(0), 2);

which should be the standard way..

Now, I would need to track these shapes for a least two frames. If I have a shape in frame(n), I would like to know if this shape is also present in frame(n - 1) by some possible information I could get, as area of the shape & position inside the frame.

Is it possible to achieve this ?

Shapes processing and tracking

Until now I can draw shapes from a binary image maskFrame into lastFrame as follows:

cv::Mat lastFrame, ;
std::vector <std::vector <cv::Point>> contours;
// frame processing ... 
findContours(maskFrame, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
drawContours(lastFrame, contours, -1, cv::Scalar(0), 2);

which should be the standard way..

Now, I would need to track these shapes for a at least two frames. If I have a shape in frame(n), I would like to know if this shape is also present in frame(n - 1) by some possible information I could get, as area of the shape & position inside the frame.

Is it possible to achieve this ?

Shapes processing and tracking

Until now I can draw shapes from a binary image maskFrame into lastFrame as follows:

cv::Mat lastFrame, ;
lastFrame;
std::vector <std::vector <cv::Point>> contours;
// frame processing ... 
findContours(maskFrame, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
drawContours(lastFrame, contours, -1, cv::Scalar(0), 2);

which should be the standard way..

Now, I would need to track these shapes for at least two frames. If I have a shape in frame(n), I would like to know if this shape is also present in frame(n - 1) by some possible information I could get, as area of the shape & position inside the frame.

Is it possible to achieve this whit some other class ?

Shapes processing and trackingtracking in C++

Until now I can draw shapes from a binary image maskFrame into lastFrame as follows:

cv::Mat lastFrame;
std::vector <std::vector <cv::Point>> contours;
// frame processing ... 
findContours(maskFrame, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
drawContours(lastFrame, contours, -1, cv::Scalar(0), 2);

which should be the standard way..

Now, I would need to track these shapes for at least two frames. If I have a shape in frame(n), I would like to know if this shape is also present in frame(n - 1) by some possible information I could get, as area of the shape & position inside the frame.

Is it possible to achieve this whit some other class ?

Shapes processing and tracking in C++

Until now I can draw shapes from a binary image maskFrame into lastFrame as follows:

cv::Mat lastFrame;
lastFrame, maskFrame;
std::vector <std::vector <cv::Point>> contours;
// frame processing ... 
findContours(maskFrame, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
drawContours(lastFrame, contours, -1, cv::Scalar(0), 2);

which should be the standard way..

Now, I would need to track these shapes for at least two frames. If I have a shape in frame(n), I would like to know if this shape is also present in frame(n - 1) by some possible information I could get, as area of the shape & position inside the frame.

Is it possible to achieve this whit some other class ?