Distorted 3D reconstruction OPENCV + PCL (Martin Peris code) - opencv

I am using Martin Peris code for 3D reconstruction using OpenCV and PCL (link below):
http://blog.martinperis.com/2012/01/3d-reconstruction-with-opencv-and-point.html
Trouble point:
I am having trouble with the final step in viewing the 3D reconstruction in the "3D viewer" window. I am getting a perfect disparity image as shown in the blog but my final reconstruction image looks like this:
https://drive.google.com/file/d/0Bx1aNPhwJU4kMmt1cUVHVXBOLWM/edit?usp=sharing
You can compare this with the one which is shown in the video link given in that blog.
Things that I have tried:
Checked if all the required libraries are installed. I believe otherwise the code wouldn't compile and give me any results.
Checked if I have a graphics support on my machine:
$lspci | grep VGA
09:00.0 VGA compatible controller: NVIDIA Corporation G71GL [Quadro FX 3500] (rev a1)
My doubts:
If there is some library missing for OpenGL or OpenCV or PCL which is making the 3D reconstruction window suffer.
The controversial reprojectImageTo3D() function in OpenCV which is also used in the code by Martin Peris.
Some other reason that one of you could help me with ;-)
Other details:
Ubuntu Version : 12.04
OpenCV Version : 2.3.1-7
Any suggestions would really be helpful!
Thanks,
Pratul

RESOLVED!
It was actually a driver issue with my graphics card. To solve it I wiped off the currently installed driver and then re-installed an updated one and that worked like a charm.
Details of this solution I have posted on the PCL mailing list as I didn't wanted to repeat myself here.
enter link description here
I hope this helps.

Related

When using opencl with torch, lua uses integrated graphics not dedicated gpu

I am using Andrej Karpathy's code to train a rnn. When I give the flag "-opencl 1" to tell it to use an opencl gpu, it uses integrated graphics and nothing else.
I tried reinstalling cltorch and using different flags, but nothing has seemed to work. To add to this I can't see if my gpu is under load because I'm on macos. I looked through the code and I could't find any errors, but I have little experience with lua.
Code can be found here: https://github.com/karpathy/char-rnn.
I expect with the flag "opencl 1" or something to the like, my radeon pro 560x will be used to train on my dataset and not my cpu or integrated graphics.
When reading instructions I thought just -opencl flag needed to be used but it turns out -gpuid needs to be used in conjuction with it as well. This was also after a reinstall of torch and opencl drivers, so that could have been a problem as well.

Using OpenCV in Android to find an image match

I am trying to build an Android application that compares a photo taken by the device camera to find a match in a set of images.
I have configured OpenCV on Android Studio, but that is quite it.
Could someone please help by linking to resources or suggesting tutorials?
The OpenCV documentation does not have anything on Android Studio and the sample codes seem to be in C++.
My idea is to do the same things... I've searched some samples on GitHub but I've not found almost anything useful... These are some links:
https://github.com/search?utf8=%E2%9C%93&q=sift+android&type=Repositories&ref=searchresults
https://github.com/search?utf8=%E2%9C%93&q=opencv+android&type=Repositories&ref=searchresults
we have almost the same project. this links might help
https://github.com/torcellite/imageComparator
https://medium.com/#akshikawijesundara/object-recognition-with-opencv-on-android-6435277ab285
in OpenCV there are plenty algorithm that we can use to find image match such as BRISK, ORB, FREAK, SIFT and SURF (SIFT and SURF available only in nonfree version since those algorithm patented).
I hope this will help

Point Grey Bumblebee2 firewire 1394 with Nvidia Jetson TK1 board

I have successfully interfaced Point Grey Bumblebee2 firewire1394 camera with Nvida Jetson TK1 board and I get the video using Coriander and video for Linux loop back device is working as well. But when I tried to access camera using OpenCV and Coriander at the same time, I have conflicts. And when I tried to access the video from camera by closing the Coriander then I can get the video but in that case I am not able to change the mode and format of the video. Anyone can help me to resolve this problem. Can I change the video mode of the camera from OpenCV.
You will have to install the flycapture sdk for ARM if you want to do it manually (by code). The flycap UI software i dont believe works on ARM, let alone ubuntu 14.04, just ubuntu 12.04 x86. If you have access, what I usually do is plug it into my windows machine and use the Flycap software to change the configurations on the camera.
I found this question completely randomly, but coincidentally I am trying to interface the bumblebee2 with the jetson right now as well. Would you care to share as to what firewire mini-PCIe you used and how you went about any configurations (stock or grinch kernel, which L4T version) ?
Also, although not fully complete, you can view a code example as to how to interface with the camera using the flycaputre sdk here: https://github.com/ros-drivers/pointgrey_camera_driver. It is a ROS driver, but you can just reference the PointGreyCamera.cpp file for examples if your not using ROS.
Hope this helps
This is not well advertised, but PtGrey do not support firewire on ARM (page 4):
Before installing FlyCapture, you must have the following prerequisites:... A Point Grey USB 3.0 camera, (Blackfly, Grasshopper3, or Flea3)
Other Point Grey imaging cameras (FireWire, GigE, or CameraLink) are NOT supported
However as you have seen it is possible to use the camera (e.g. in Coriander) using standard firewire tools.
libdc1394 or the videography library should do what you need.

Using kinect with OpenNi

I am newbie to kinect and openNi. But according to some old tutorials I have tried installing kinect sensor(primeSensor) and OpenNi for object detection with kinect. But as OpenNi project is closed now, I am not able to find alternatives to OpenNi, I also tried pcl libraries, but I was stuck there as I couldn't run any project because of: 'Entry point is not found error'.
I need to use kinect for object detection with windows 7 32 bit. I wanted to use pcl libraries with openNi.
Can anyone please guide me what should I do? Or it'll be really grateful if anyone could tell me from where should I start. Please give me some new tutorials for using kinect.
I use kinect 2.0, pcl and OpenCV in VS2012, OpenNI is no longer supported and I suggest you grab Kinect frame by this(it works fine):http://unanancyowen.com/?p=1232

Converting depth_image from Kinect to OpenCV classic format(IplImage) for displaying

I am working with OpenCV2.4.5 and OpenNI2.0 (with SDK Kinect 1.6) on visual studio 2012. I try to develop an application of gaze tracking, for that i use "Kinect sensor" to get image_data and i want to process this ilage on OpenCV (Features extraction and machine learning).
If any one has an example or or a good tuto, it will be very helpful for me.
Best regards.
why not start with an opencv sample here ?

Resources