void processImages( Camera& camera, ImageProcessor& processor, Detector& detector ) { cout << "Camera "<< camera.id << ": --Processing Images" << endl; stringstream result_window; result_window << camera.name << ": detected particles"; processor.addControls(); detector.addControls(); cv::waitKey(10); size_t number_of_frames = camera.imagelist.size(); camera.frames.resize( number_of_frames ); for (int i = 0; i < number_of_frames; ++i) { cv::Mat temp_image = camera.frames[i].image.clone(); processor.processImage( temp_image ); cv::imshow("processed image", temp_image ); detector.detectFeatures( temp_image, camera.frames[i].particles); detector.drawResult( camera.frames[i] ); cv::imshow(result_window.str(), camera.frames[i].image); } cv::destroyWindow( result_window.str() ); }