Comments (4)
Hola @RafaelAgular.
Los ejemplos que damos junto con la libreria muestran el funcionamiento de las clases y metodos de la misma y de como se usan. Si quieres usar ORB-SLAM3 con tu propia camara en tiempo real, deberias crear tu propio programa el cual, en primer lugar crea todas las clases necesarias (como por ejemplo, el system de ORB-SLAM3) y posteriormente, un bucle en el que coges la imagen de la camara (el codigo de esta parte depende integramente de la camara que utilices y de como lees sus imagenes) y se la pasas al ORB-SLAM3 para que la procese (de manera identica a como se hace en los ejemplos con datasets).
Un saludo.
from orb_slam3.
Hi @jjgr3496 , @RafaelAgular, I tried to add the code for reading images from a live cam stream , but the system get stuck at initialiazation. Following is the code:
// 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);
cv::VideoCapture cap(id); //id if 4 for my laptop
if (!cap.isOpened())
{
std::cerr << "ERROR: Could not open camera" << std::endl;
return 1;
}
int count = 0;
for(;;)
{
Mat im;
cap >> im;
//return if frame is not valid
if(im.empty())
{
cerr << endl << "Failed to load image at: "
<< count << endl;
return 1;
}
// imshow("im", im);
// cv::waitKey(20);
std::chrono::steady_clock::time_point t1 = std::chrono::steady_clock::now();
double tframe = t1.time_since_epoch().count();
// Pass the image to the SLAM system
SLAM.TrackMonocular(im,tframe);
std::chrono::steady_clock::time_point t2 = std::chrono::steady_clock::now();
double ttrack= std::chrono::duration_cast<std::chrono::duration<double> >(t2 - t1).count();
vTimesTrack.push_back(ttrack);
// Wait to load the next frame
double T=0;
if(count>0)
T = tframe-vTimesTrack[count];
if(ttrack<T)
usleep((T-ttrack)*1e6);
count++;
}
Please let me know if you have any idea or should I wait longer for initialization?
from orb_slam3.
@varunns Your code looks fine, however without seeing your images I can not tell whether is problem of ORB-SLAM3 or an issue with your images. Please, note that we are aware of some issues related with monocular initialization and we are currently working on it!
Also please check this related issue #85
from orb_slam3.
Version 1.0 now includes examples to run ORB-SLAM3 with Intel Realsense cameras
from orb_slam3.
Related Issues (20)
- Issue trying to compile and install ORB_SLAM3 HOT 1
- .
- Segmentation Fault issue during runtime - Eigen::internal::cast_impl
- Segmentation fault on SaveTrajectoryTUM in rgbd_inertial_realsense_D435i
- Segmentation fault on RGB node with D435i camera
- error in building ORB-SLAM3 due to sophus
- The bug in the code within the Optimizer::FullInertialBA function
- make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:554: ../lib/libORB_SLAM3.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:711: CMakeFiles/ORB_SLAM3.dir/all] Error 2 HOT 1
- Linking error in building HOT 4
- Where are examples executables? HOT 1
- Can you tell me how to test the RGBD dataset in ETH3D using orbslam3, thank you
- What are the differences between orb extractor source code between 1,2, and 3 version
- How to save/load map?
- IMU problem with Mono-Inertial mode using ORB SLAM3 with Gazebo and RViz2 HOT 8
- Infinite loop in GlobalBundleAdjustment when loading a map HOT 1
- Unable to build ORB_SLAM3 with ROS using ./build_ros.sh on ubuntu 20.04 with ros-noetic-desktop-full HOT 9
- Issue finding the executable file HOT 1
- stereo kitti problem no IMU HOT 2
- orb-slam3修改源码并编译后,ROS模式运行结果为什么还是之前结果,但是直接运行的结果却是改变后的结果 HOT 2
- Fail to track local map! stereo kitti no imu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orb_slam3.