Closed tonioteran closed 4 years ago
The same simple example should be running with Kurran's images, but you'll def need to change the path of the images.
Just got to:
MONO
implemented thus far, but I'll add the rest in a jiffy): https://github.com/MarineRoboticsGroup/tonioviz/blob/3fffd0de37cc547550810068e63e8a582a73f83f/include/tonioviz/Visualizer.h#L36@kurransingh @keevindoherty
Let me know if you can't run it. There's some weird stuff happening with the OpenCV image, but I'm sure I'm parsing something incorrectly either
Probably expected, but this seg faults if you don't have the images :D
I think the aforementioned bug is actually due to the use of cv::imread
in mrg::LoadImages
(see, for example: https://github.com/opencv/opencv/issues/14095)
My last commit should fix this. I'm not sure if AddImage should be sanitizing inputs (e.g. check for nullptr?)
Also, question for @tonioteran about code styling - is everything set up with linting etc with the pre-commit hooks? So can I assume if git doesn't yell at me when I commit changes my code is beautiful?
I had to upgrade to g++ 9 and gcc 9 to get the filesystem library to work as written, but seems fine other than that. Still trying to figure out the distorted image.
yea, i think we should try to sanitize the inputs, that'd be great!
Still trying to figure out the distorted image.
I thought that it could perhaps have something to do with the size? Or the number of channels? Or the way in which memory is allocated by OpenCV vs Pangolin (contiguous blocks vs not contiguous)? Or something like that?
This way that I'm doing works for my SPHERES images. We can try testing other types of images as well and remove the hardcoded image dimensions for the Blue ROV that I'm using right now.
Also, question for @tonioteran about code styling - is everything set up with linting etc with the pre-commit hooks? So can I assume if git doesn't yell at me when I commit changes my code is beautiful?
hahaha yea, if it doesn't complain, then you get A+ at Google hahah
Ok, i've added the stereo functionality for passing in two images, which to use you just need to change the mode to VisualizerMode::STEREO
:
https://github.com/MarineRoboticsGroup/tonioviz/blob/838a411148e0783bdd12c2b882103d4e426dfe92/examples/SimpleCheckout.cpp#L42
and to pass in the images using the Visualizer::AddStereo
function:
https://github.com/MarineRoboticsGroup/tonioviz/blob/838a411148e0783bdd12c2b882103d4e426dfe92/examples/SimpleCheckout.cpp#L76
Trying to address #1 .