ingenuitas/SimpleCV — pull request #170 by vijaym123 (2012-07-24 20:59:11+00:00)
Title: Design of stereo vision class 

i have put all the stereo images in sampleimages folder.

The design of the class is such that each object of stereovision class represents a pair of stereo images.

```python
from SimpleCV import *
img1 = Image('left.png')
img2 = Image('right.png')
cam = StereoCamera(img1,img2)
print cam.F # represents fundamental matrix
print cam.ptsLeft # represents set of points in left image that have corresponding points in right image
print cam.ptsRight # represents set of points in right image that have corresponding points in left image
print cam.H #represents Homography matrix
```
## Disparity Map : ##

there are 3 methods in finding disparity map
* Block Matching algorithm
* Semi Global Block Matching algorithm
* Graph Cut algorithm.

I have kept the minimum disparity to be zero and maximum disparity to passed as a parameter
```python
from SimpleCV import *
img1 = Image('left.png')
img2 = Image('right.png')
cam = StereoCamera(img1,img2)
disp = cam.findDisparityMap(nDisparity=64,method="BM") #Block Matching Algorithm
disp = cam.findDisparityMap(nDisparity=64,method="GC") # Graph Cut Algorithm
disp = cam.findDisparityMap(nDisparity=64,method="SGBM") #Semi Global Block Matching Algorithm
disp.show()
```

## Epipolar Line : ##
For finding the Epipolar line given a point and which Image. Eline return a Line in the form of a Feature object.
It can be easily demonstrated from the following example
```python
from SimpleCV import *
img1 = Image('left.png')
img2 = Image('right.png')
cam = StereoCamera(img1,img2)
point = cam.ptsLeft[0]
epiline = cam.Eline(point, 1)
epiline.draw(Color.BLACK,4)
img1.show()
point = cam.ptsRight[0]
epiline = cam.Eline(point, 2)
epiline.draw(Color.BLACK,4)
img2.show()
```

## Corresponding Point : ##
To find the corresponding point from one Image to another.

```python
from SimpleCV import *
img1 = Image('left.png')
img2 = Image('right.png')
cam = StereoCamera(img1,img2)
point = cam.ptsLeft[0]
point2 = projectPoint(point, 2)
```