public class StereoDisparityWtoNaiveFive<I extends ImageSingleBand>
extends java.lang.Object
DisparityScoreWindowFive
.Constructor and Description |
---|
StereoDisparityWtoNaiveFive(int minDisparity,
int maxDisparity,
int radiusWidth,
int radiusHeight)
Configure parameters
|
Modifier and Type | Method and Description |
---|---|
protected double |
computeScore(int leftX,
int rightX,
int centerY)
Compute the score for five local regions and just use the center + the two best
|
protected double |
computeScoreRect(int leftX,
int rightX,
int centerY)
Compute SAD (Sum of Absolute Difference) error.
|
void |
process(I left,
I right,
ImageFloat32 imageDisparity)
Computes the disparity for two stereo images along the image's right axis.
|
protected double |
selectBest(int length)
Select best disparity using the inner takes all approach
|
public StereoDisparityWtoNaiveFive(int minDisparity, int maxDisparity, int radiusWidth, int radiusHeight)
minDisparity
- Minimum disparity it will consider in pixels.maxDisparity
- Maximum allowed disparity in pixels.radiusWidth
- Radius of the region along x-axis.radiusHeight
- Radius of the region along y-axis.public void process(I left, I right, ImageFloat32 imageDisparity)
left
- Left camera image.right
- Right camera image.protected double selectBest(int length)
length
- The max allowed disparity at this pixelprotected double computeScore(int leftX, int rightX, int centerY)
leftX
- X-axis center left imagerightX
- X-axis center left imagecenterY
- Y-axis center for both imagesprotected double computeScoreRect(int leftX, int rightX, int centerY)
leftX
- X-axis center left imagerightX
- X-axis center left imagecenterY
- Y-axis center for both imagesCopyright © 2011-2012 Peter Abeles