public static GrayU8 denseDisparity ( GrayU8 rectLeft , GrayU8 rectRight , int regionSize , int minDisparity , int maxDisparity ) { // A slower but more accuracy algorithm is selected // All of these parameters should be turned StereoDisparity < GrayU8 , GrayU8 > disparityAlg = FactoryStereoDisparity . regionWta ( DisparityAlgorithms . RECT_FIVE , minDisparity , maxDisparity , regionSize , regionSize , 25 , 1 , 0.2 , GrayU8 . class ) ; // process and return the results disparityAlg . process ( rectLeft , rectRight ) ; return disparityAlg . getDisparity ( ) ; }
Computes the dense disparity between between two stereo images . The input images must be rectified with lens distortion removed to work! Floating point images are also supported .