How to find the disparity in image processing.

Click For Summary
To calculate the distance Z of an object from a camera using the formula Z = bf/D, where b is the baseline and D is the disparity, understanding how to compute disparity is crucial. Disparity is derived from the corresponding points in two images captured from slightly different positions. The discussion emphasizes the need for a clear algorithm to find disparity using C#, as the user is required to develop the solution independently without libraries like OpenCV. The relationship between disparity and the corresponding points in images is highlighted, with a focus on whether disparity is measured in pixels and how it integrates into the distance calculation. The conversion of focal length into pixel units is also questioned, indicating a need for clarity on these conversions. Additionally, the relevance of the essential and fundamental matrices in finding disparity is debated, with the user expressing a desire to avoid their complexity if disparity can be computed directly. The discussion points towards the necessity of understanding the mathematics behind the algorithm for effective implementation.
ngkamsengpeter
Messages
193
Reaction score
0
Given 2 image taken from 2 camera in canonical position, and the baseline is b, we can find the distance Z of an object from the camera. We know that

Z=bf/D where D is disparity.

I read some books but still have no idea of how to find the disparity using c#. Can someone suggest some mathematics and algorithm for me?
I also read about finding the correspondence point of the image but i have no idea of how the corresponding point related to disparity. And what is the unit of disparity we found using algorithm.Is it in unit of pixel and can we plug directly into above equation to find Z in unit of mm or cm? Or how can we convert focal length into pixel?

I also read about the essential matrix and fundamental matrix, do i really need to find them? because if i can find disparity without using these matrix, then i already can find the distance using formula above. This matrices is very difficult to solve.

My supervisor require me to write the entire algorithm by myself without using any library such as opencv. So someone please give me the mathematics behind the algorithm.
 
Technology news on Phys.org
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 11 ·
Replies
11
Views
2K