analyzing from video

This commit is contained in:
PodmogilnyjIvan
2021-12-05 07:36:48 -08:00
parent 49e51e1ffe
commit 1fcda57b75
4 changed files with 50 additions and 41 deletions

View File

@@ -479,7 +479,7 @@ int main(int argc, char* argv[]) {
// --------------------------------- SLAM SYSTEM VARIABLES ---------------------------------
// Create SLAM system. It initializes all system threads and gets ready to process frames.
ORB_SLAM3::System SLAM(argv[1], argv[2], ORB_SLAM3::System::MONOCULAR, true);
ORB_SLAM3::System SLAM(argv[1], argv[2], ORB_SLAM3::System::MONOCULAR, false);
std::printf("SLAM system initialized\n");
@@ -572,28 +572,11 @@ int main(int argc, char* argv[]) {
while (true) {
//if (use_gui) {
// cv::namedWindow("preview", cv::WINDOW_AUTOSIZE);
//}
//else {
// // cv::namedWindow("no preview", 1);
//}
cv::Mat frame;
char* buffer = nullptr;
// {
// int length;
// std::cout << "trying to open example.bin" << std::endl;
// std::ifstream is;
// is.open("example.bin", std::ios::binary);
// is.seekg(0, std::ios::end);
// length = is.tellg();
// is.seekg(0, std::ios::beg);
// buffer = new char [length];
// is.read(buffer, length);
// is.close();
// frame = cv::Mat(cv::Size(1920, 1080), CV_8UC4, (char*)buffer, cv::Mat::AUTO_STEP);
// }
{
std::lock_guard<std::mutex> guard(g_mutex);
if (frameQueue.size() > 0) {
@@ -801,16 +784,7 @@ int main(int argc, char* argv[]) {
}
}
//if (use_gui) {
// if (!frame.empty()) {
// cv::Mat edges;
// cvtColor(frame, edges, cv::COLOR_BGR2BGRA);
// cv::imshow("preview", frame);
// int key = cv::waitKey(10);
// }
//
//}
delete[] buffer;
}
@@ -826,9 +800,9 @@ int main(int argc, char* argv[]) {
char** argv_orb;
argv_orb = new char* [3];
argv_orb[0] = new char[200];
argv_orb[1] = new char[200];
argv_orb[2] = new char[200];
argv_orb[0] = new char[300];
argv_orb[1] = new char[300];
argv_orb[2] = new char[300];
strcpy(argv_orb[0], argv[0]);
strcpy(argv_orb[1], argv[1]);