Ask Your Question

Lexus09's profile - activity

2017-05-16 09:05:35 -0500 commented answer Stereo Vision Distance Estimation Issue

Also, what I forgot to mention is that the disparity map becomes pretty average as distance is increased, hence the mediocre calculation

2017-05-16 09:04:40 -0500 commented answer Stereo Vision Distance Estimation Issue

Thank you for your reply, the problem is the quality of the disparity map achieved, which doesn't allow for an accurate calculation. If the object is, let's say, 1 meter away. The results are pretty accurate and on point, but when the 2-meter mark is surpassed, the problems arise.

Thanks

2017-05-16 09:02:42 -0500 commented answer Stereo Vision Distance Estimation Issue

Thank you for your reply. Do you think there is a certain depth limit on this matter? I am using 2 identical Logitech C270 webcams. Like do you think it could be viable for a distance of 20 meters for example?

Thanks!!

2017-05-16 08:39:13 -0500 asked a question Stereo Vision Distance Estimation Issue

Hi, I am attempting to calculate the distance to a given object in a pair of stereo images, using the SGBM algorithm. Depending on the calculated distance and my current coordinates, I am calculating the GPS coordinates of the given object.

Now the results are pretty average when I surpass the 2-meter mark and the results are very inaccurate. As the distance increases, the disparity map suffers greatly which inhibits the ability to accurately capture the object in the scene. Is there any way to get better distance results when testing on distances greater than the mentioned 2-meter mark? Or, do I consider this to be a limitation of my program?

Would highly appreciate any responses.

Thanks!

2017-03-27 13:06:10 -0500 commented question Stereo Vision (Python) - How can I improve my Stereo Rectification results?

Do you think it might affect the results obtained??

2017-03-26 14:05:57 -0500 commented question Stereo Vision (Python) - How can I improve my Stereo Rectification results?

Ok thank you! :)

2017-03-26 12:20:56 -0500 commented question Stereo Vision (Python) - How can I improve my Stereo Rectification results?

Can you guide me on how to do this? As I am pretty new to OpenCV/stereo vision in general. If not, thanks a million for your time and help, I really appreciate anyways :)

2017-03-26 10:57:17 -0500 commented question Stereo Vision (Python) - How can I improve my Stereo Rectification results?

Thank you for your comment, the thing is I am using the stereoCalibrate method, isn't that the same thing just for stereo cameras?

2017-03-26 10:22:30 -0500 received badge  Editor (source)
2017-03-26 10:20:59 -0500 asked a question Stereo Vision (Python) - How can I improve my Stereo Rectification results?

Hi all,

I am carrying out an undergraduate where I need to find out the depth of a stereo image, thus it is crucial to get a good disparity map for the calculations to be accurate. My rectification results are pretty mediocre at best and I have carried out the calibration countless times with no success, only minimal variations between results. I would highly appreciate experts' guidance on this issue. Like, can I try changing some parameters of my stereoRectify method? I already tried to tinker with the stereocalibrate parameters with minimal success.

I cannot post my results on this question as I have insufficient karma, but the rectified images look as if they were warped in a spiral manner and overriding the original video capture. Copy this in the URL if you wish to see a sample of my results: scontent.fmla1-2.fna.fbcdn.net/v/t35.0-12/17571001_10212528106338046_845875913_o.png?oh=3ef04efa50a3d9f4e4d253f2f57ae298&oe=58DAF735

This is my code for the calibration:

import cv,time,sys
import cv2
from itertools import izip
# python calibrate.py board_w,board_h and boards_n should be given by the user
n_boards=0  #no of boards
board_w=int(sys.argv[1])    # number of horizontal corners
board_h=int(sys.argv[2])    # number of vertical corners
n_boards=int(sys.argv[3])   # no. of views passed as pictures
board_n=board_w*board_h     # no of total corners
board_sz=(board_w,board_h)  # size of board

#   creation of memory storages for left camera
image_points0=cv.CreateMat(n_boards*board_n,2,cv.CV_32FC1)
object_points=cv.CreateMat(n_boards*board_n,3,cv.CV_32FC1)
point_counts=cv.CreateMat(n_boards,1,cv.CV_32SC1)
intrinsic_matrix0=cv.CreateMat(3,3,cv.CV_32FC1)
distortion_coefficient0=cv.CreateMat(5,1,cv.CV_32FC1)

#   creation of memory storages for right camera
image_points1=cv.CreateMat(n_boards*board_n,2,cv.CV_32FC1)
intrinsic_matrix1=cv.CreateMat(3,3,cv.CV_32FC1)
distortion_coefficient1=cv.CreateMat(5,1,cv.CV_32FC1)

R=cv.CreateMat(3,3,cv.CV_64F)
T=cv.CreateMat(3,1,cv.CV_64F)
E=cv.CreateMat(3,3,cv.CV_64F)
F=cv.CreateMat(3,3,cv.CV_64F)
#term_crit=(cv.CV_TERMCRIT_EPS+cv.CV_TERMCRIT_ITER,30,0.1)
#capture frames of specified properties and modification of matrix values
i=0
z=0     # to print number of frames
successes=0


#   capturing required number of views

found=0
with open('Left.txt','rb') as f:
    imgl= [line.strip() for line in f]
    with open('Right.txt','rb') as f1:
         imgr=[line.strip() for line in f1]
         for (image0,image1) in izip(imgl,imgr):
        if image0 =='' or image1== '' :
            break;
        else:

                Image0 = cv.LoadImage(image0)
                Image1 = cv.LoadImage(image1)

            gray_image0=cv.CreateImage(cv.GetSize(Image0),8,1)
            cv.CvtColor(Image0,gray_image0,cv.CV_BGR2GRAY)
            gray_image1=cv.CreateImage(cv.GetSize(Image1),8,1)
            cv.CvtColor(Image1,gray_image1,cv.CV_BGR2GRAY)
            (found0,corners0)=cv.FindChessboardCorners(gray_image0,board_sz,cv.CV_CALIB_CB_ADAPTIVE_THRESH| cv.CV_CALIB_CB_FILTER_QUADS)
            (found1,corners1)=cv.FindChessboardCorners(gray_image1,board_sz,cv.CV_CALIB_CB_ADAPTIVE_THRESH| cv.CV_CALIB_CB_FILTER_QUADS)
            cv.FindCornerSubPix(gray_image0,corners0,(11,11),(-1,-1),(cv.CV_TERMCRIT_EPS+cv.CV_TERMCRIT_ITER,30,0.001))
            cv.FindCornerSubPix(gray_image1,corners1,(11,11),(-1,-1),(cv.CV_TERMCRIT_EPS+cv.CV_TERMCRIT_ITER,30,0.001))     
            # if got a good ...
(more)