Documentation of 'boofcv.alg.flow.DenseOpticalFlowBlockPyramid' Java class
DenseOpticalFlowBlockPyramid
boofcv.alg.flow

Class DenseOpticalFlowBlockPyramid<T extends ImageGray>

  • Direct Known Subclasses:
    DenseOpticalFlowBlockPyramid.F32, DenseOpticalFlowBlockPyramid.U8


    public abstract class DenseOpticalFlowBlockPyramid<T extends ImageGray>
    extends java.lang.Object

    Computes dense optical flow optical using pyramidal approach with square regions and a locally exhaustive search. Flow estimates from higher layers in the pyramid are used to provide an initial estimate flow lower layers. For each pixel in the 'prev' image, a square region centered around it is compared against all other regions within the specified search radius of it in image 'curr'. For each candidate flow the error is computed. After the best score has been found each local pixel which contributed to that square region is checked. When a pixel is checked its current score compared to see if it's better than the score it was previously assigned (if any) then its flow and score will be set to the current. This improves the handled along object edges. If only the flow is considered when a pixel is the center then it almost always fails at edges.

    When scoring hypotheses for optical flow and there is a tie, select the hypothesis with the least amount of motion. This only really comes into play when there is absolutely no texture in real-world data.

    By checking all pixels associated with the score and not just the center one to see if it has a better score the edges of objects is handled better.

    • Constructor Detail

      • DenseOpticalFlowBlockPyramid

        public DenseOpticalFlowBlockPyramid(int searchRadius,
                                            int regionRadius,
                                            int maxPerPixelError,
                                            java.lang.Class<T> imageType)
        Configures the search.
        Parameters:
        searchRadius - Determines the size of the area search for matches. area = (2*r + 1)^2
        regionRadius - Radius of the square region
        maxPerPixelError - Maximum error allowed per pixel.
        imageType - Type of image which is being processed.
    • Method Detail

      • process

        public void process(ImagePyramid<T> pyramidPrev,
                            ImagePyramid<T> pyramidCurr)
        Computes the optical flow form 'prev' to 'curr' and stores the output into output
        Parameters:
        pyramidPrev - Previous image
        pyramidCurr - Current image
      • getOpticalFlow

        public ImageFlow getOpticalFlow()
        Returns the found optical flow
      • getSearchRadius

        public int getSearchRadius()
      • getRegionRadius

        public int getRegionRadius()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.