Package boofcv.alg.mvs
Class ScoreRectifiedViewCoveragePixels
java.lang.Object
boofcv.alg.mvs.ScoreRectifiedViewCoveragePixels
Scores different views to act as a common view based on coverage of rectified image. It works by using a shrunk
down image to compute the area which would be covered by multiple stereo images. An image
with more coverage and more images overlaying it is scored higher.
-
Field Summary
Modifier and TypeFieldDescriptiondouble
Average value of covered pixelsdouble
The actual fraction of the image covered by neighboring viewsint
Maximum length the largest side can bedouble
The found area covered score.double
This is used to adjust the influence of average. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addView
(int width, int height, DMatrixRMaj rect, float quality3D, boofcv.alg.mvs.ScoreRectifiedViewCoveragePixels.Operation op) Adds a view by specifying how target view would be rectified for this stereo pair.double
fractionIntersection
(int width, int height, DMatrixRMaj rect) Computes the fraction of the rectified image which is inside the imagevoid
initialize
(int width, int height, PixelTransform<Point2D_F64> transform_pixel_to_undist) Initializes data structures and specifies lens distortion for the target viewvoid
process()
Processes viewed image and computes a coverage score.
-
Field Details
-
maxSide
public int maxSideMaximum length the largest side can be -
score
public double scoreThe found area covered score. Computed from fraction of area covered and average count -
scoreAverageOffset
public double scoreAverageOffsetThis is used to adjust the influence of average. Larger the value less influence -
covered
public double coveredThe actual fraction of the image covered by neighboring views -
averageValue
public double averageValueAverage value of covered pixels
-
-
Constructor Details
-
ScoreRectifiedViewCoveragePixels
public ScoreRectifiedViewCoveragePixels()
-
-
Method Details
-
initialize
public void initialize(int width, int height, PixelTransform<Point2D_F64> transform_pixel_to_undist) Initializes data structures and specifies lens distortion for the target view- Parameters:
width
- Width of original image in this viewheight
- Height of original image in this viewtransform_pixel_to_undist
- Lens distortion model from distorted to undistorted pixels
-
addView
public void addView(int width, int height, DMatrixRMaj rect, float quality3D, boofcv.alg.mvs.ScoreRectifiedViewCoveragePixels.Operation op) Adds a view by specifying how target view would be rectified for this stereo pair.- Parameters:
width
- (Input) Width of the new view being addedheight
- (Input) Height of the new view being addedrect
- (Input) Homography from undistorted pixels to rectified pixels in this view.quality3D
- (Input) Signifies the quality of 3D information available. Higher numbers mean more 3D information from this view. A value of 0 indicates no 3D information. Typically this ranges from 0 to 1.
-
fractionIntersection
Computes the fraction of the rectified image which is inside the image -
process
public void process()Processes viewed image and computes a coverage score.
-