Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Here is my c++ code.How to do it?

#include <opencv2 core="" core.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include <vector>

include <iostream>

using namespace cv; using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Here is my c++ code.How to do it?

#include <opencv2 core="" core.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include <vector>

include <iostream>

using namespace cv; using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Here is my c++ code.How to do it?

using namespace cv;

using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Here is my c++ code.How to do it?

using namespace cv;

using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Here is my c++ code.How to do it?

using namespace cv; using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Here is my c++ code.How to do it?

using namespace cv; using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Here Below is my c++ code.How code. How to do it?it please?

using namespace cv; using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Below is my c++ code. How to do it please?

using namespace cv; using namespace std;

vector<mat> imageQueue;

int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

return 0; }

click to hide/show revision 9
No.9 Revision

updated 2016-12-17 01:28:13 -0500

berak gravatar image

I need to do image sequence after extracting frames.

I need to do image sequencing for each movement.I need to use a loop.For e.g,to recognise one movement I need to have 3 static movement in a row.But only one image is being recognised. Below is my c++ code. How to do it please?

using namespace cv;
using namespace std;

vector<mat> imageQueue;

std; vector<Mat> imageQueue; int main(int argc, char** argv) { string arg = ("C:user/Desktop//pictures/Sequence/%02d.jpg"); VideoCapture sequence(arg);

sequence(arg); if(!sequence.isOpened()) { cout << "Failed to open image sequence" << endl; return -1; }

} Mat image; for(;;) { sequence >> image; if(image.empty()) { cout << "End of sequence" << endl; break; } imageQueue.push_back(image); }

} for(int i = 0; i < 10; i++) { //display 10 images Mat readImage; readImage = imageQueue[i]; namedWindow("Current Image", CV_WINDOW_AUTOSIZE); imshow("Current Image", readImage); waitKey(100); }

} return 0; }

}