Closed esteimle closed 2 years ago
@esteimle I am having a similar issue while running the examples on ROS. Have you managed to fix this yet?
yeah, just an a hour ago. I lowered the resolution to 640x480 in the yaml file, then also lowered it in the opencv capture (not resizing it later but setting the camera to input 640x480). It seemed to get lost pretty easy but it made a 1/4 map of my office :) I think the high res input from my camera was bogging down the opencv camera capture. Either that or I had my resolutions misaligned between yaml and real life.
Oh great, thanks for the response! I do not believe that's a possible issue for me since I am just running the EuRoC rosbag file from the examples section. I am not sure how to fix it.
Hi. I've been trying for a few days to get my USB camera to work with ORBSLAM3. I started with the mono_realsense_t265.cc as my base, made a copy of that file, and then added opencv cv::VideoCapture to connect to my USB camera. When I debug, I can see the frames coming in as well as the timestamps updating with each frame. I displayed some pictures as well to verify they are real. I also calibrated my camera and modified the t265 yaml file to use those parameters. Has anyone else hit something similar? My next steps are going to be digging into the code step by step but that's going to take a while ;) Thank you for any advice.
Command line output `~/workspace/ORB_SLAM3$ ./Examples/Monocular/mono_razor Vocabulary/ORBvoc.txt ./Examples/Monocular/Razor.yaml
ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions. See LICENSE.txt.
Input sensor was set to: Monocular Loading settings from ./Examples/Monocular/Razor.yaml Camera1.k1 optional parameter does not exist... -Loaded camera 1 Camera.newHeight optional parameter does not exist... Camera.newWidth optional parameter does not exist... -Loaded image info -Loaded ORB settings Viewer.imageViewScale optional parameter does not exist... -Loaded viewer settings System.LoadAtlasFromFile optional parameter does not exist... System.SaveAtlasToFile optional parameter does not exist... -Loaded Atlas settings System.thFarPoints optional parameter does not exist... -Loaded misc parameters
SLAM settings: -Camera 1 parameters (Pinhole): [ 243.38832092285156 241.70191955566406 365.0584716796875 238.09236145019531 ] -Original image size: [ 640 , 480 ] -Current image size: [ 640 , 480 ] -Sequence FPS: 60 -Features per image: 1000 -ORB scale factor: 1.2000000476837158 -ORB number of scales: 8 -Initial FAST threshold: 20 -Min FAST threshold: 7
Loading ORB Vocabulary. This could take a while... Vocabulary loaded!
Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 Seq. Name: There are 1 cameras in the atlas Camera 0 is pinhole Starting the Viewer [ WARN:12] global /home/pradeep/workspace/opencv_build/opencv/modules/videoio/src/cap_gstreamer.cpp (956) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1 `
My Config file `%YAML:1.0
--------------------------------------------------------------------------------------------
Camera Parameters. Adjust them!
--------------------------------------------------------------------------------------------
File.version: "1.0"
Camera.type: "PinHole"
Left Camera calibration and distortion parameters (OpenCV)
Camera1.fx: 243.38832282 Camera1.fy: 241.7019257 Camera1.cx: 365.05847057 Camera1.cy: 238.09236466
Kannala-Brandt distortion parameters
Camera1.k1: -0.00530046410858631
Camera1.k2: 0.0423333682119846
Camera1.k3: -0.03949885815382
Camera1.k4: 0.00682387687265873
pinhole
Camera.k1: 0.02635559 Camera.k2: -0.01760739 Camera.p1: 0.00409038 Camera.p2: 0.00891666 Camera.k3: 0.00497196
need to modify orblasm to take this
Camera.k4: 0.5483986735343933
Camera.k5: -2.6671268939971924
Camera.k6: 1.5503228902816772
#
you can duplicate the codes that reading parameters three times in "tracking.cc" with k4,k5,k6 you have:
node = fSettings["Camera.k3"];
if(!node.empty() && node.isReal())
{
mDistCoef.resize(5);
mDistCoef.at(4) = node.real();
#
if(b_miss_params)
{
return false;
}
Camera resolution
Camera.width: 640 Camera.height: 480
Camera frames per second
Camera.fps: 60
Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
Camera.RGB: 1
--------------------------------------------------------------------------------------------
ORB Parameters
--------------------------------------------------------------------------------------------
ORB Extractor: Number of features per image
ORBextractor.nFeatures: 1000 # Tested with 1250
ORB Extractor: Scale factor between levels in the scale pyramid
ORBextractor.scaleFactor: 1.2
ORB Extractor: Number of levels in the scale pyramid
ORBextractor.nLevels: 8
ORB Extractor: Fast threshold
Image is divided in a grid. At each cell FAST are extracted imposing a minimum response.
Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST
You can lower these values if your images have low contrast
ORBextractor.iniThFAST: 20 # 20 ORBextractor.minThFAST: 7 # 7
--------------------------------------------------------------------------------------------
Viewer Parameters
--------------------------------------------------------------------------------------------
Viewer.KeyFrameSize: 0.05 Viewer.KeyFrameLineWidth: 1.0 Viewer.GraphLineWidth: 0.9 Viewer.PointSize: 2.0 Viewer.CameraSize: 0.08 Viewer.CameraLineWidth: 3.0 Viewer.ViewpointX: 0.0 Viewer.ViewpointY: -0.7 Viewer.ViewpointZ: -3.5 Viewer.ViewpointF: 500.0 `
My Test Code (I see images and timestamps working in debug) `/**
include
include
include
include
include
include
include
include
include <opencv2/core/core.hpp>
//#include <librealsense2/rs.hpp>
include
using namespace std;
bool b_continue_session;
void exit_loop_handler(int s){ cout << "Finishing session" << endl; b_continue_session = false;
}
int main(int argc, char **argv) {
ifdef REGISTER_TIMES
endif
ifdef REGISTER_TIMES
endif
ifdef REGISTER_TIMES
ifdef COMPILEDWITHC11
else
endif
endif
ifdef REGISTER_TIMES
ifdef COMPILEDWITHC11
else
endif
endif
} `