Class libdt.PatchExtractor

java.lang.Object
gov.nih.mipav.model.algorithms.libdt.PatchExtractor
Enclosing class:
libdt

class libdt.PatchExtractor extends Object
Class for extracting spatio-temporal patches (cubes) from a video (online mode). The extractor works in an "online" mode, where frames are added sequentially. When enough frames are added a true flag is returned, which indicates that new patches have been formed. Normalization of patches is handled efficiently, and access is given to the current video buffer. Also included is a function for converting a set of labels corresponding to each patche to an image. The actual patches will be in different places, depending on the normalization used: 1) norm_none --> patches are sub-videos of the buffer (vbuf); 2) norm_zm --> patches are sub-videos of the buffer (vbuf_zm); 3) norm_zmuv --> patches are local copies. Note that in some cases, the patches are just references to a sub-videos of the video buffer. Hence, it is not allowed to modify the patches. \sa PatchOptions, PatchBatchExtractor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    invalid input: '<' offset to center of patch.
    invalid input: '<' all x-locations on step grid.
    javax.vecmath.Point3i
    invalid input: '<' value of curz that will form a new patch.
    int
    invalid input: '<' current z location of the patches (z of the first frame of the patch).
    boolean
    invalid input: '<' the set of patches.
    invalid input: '<' flag if vbuf_zm is used.
    invalid input: '<' center frame of the video buffer (reference to vbuf).
    Vector<javax.vecmath.Point2i>
    invalid input: '<' number of columns in the video frame.
    invalid input: '<' (y,x) coordinates of top-left of each patch.
    int
    invalid input: '<' patch mask depending on pixel variance.
    int
    invalid input: '<' z location for next frame added.
    invalid input: '<' video buffer w/o mean [vrows,vcols,patopt.win.z] type=OPT_MAT_TYPE.
    fill type for generating images from patch labels.
    invalid input: '<' all y-locations on step grid.
    invalid input: '<' video buffer to store current frames [vrows,vcols,patopt.win.z] type=OPT_MAT_TYPE.
    int
    invalid input: '<' options for extracting patches.
    int
    invalid input: '<' options for extracting patches.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PatchExtractor(libdt.PatchOptions patopt, int vrows, int vcols)
    invalid input: '<' center frames of the video buffer (reference to vbuf).
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
     
    (package private) void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • patopt

      public libdt.PatchOptions patopt
      fill type for generating images from patch labels. \sa patchLabelsToImage
    • vrows

      public int vrows
      invalid input: '<' options for extracting patches.
    • vcols

      public int vcols
      invalid input: '<' options for extracting patches.
    • locyx

      public Vector<javax.vecmath.Point2i> locyx
      invalid input: '<' number of columns in the video frame.
    • locyx_mask

      public Vector<Boolean> locyx_mask
      invalid input: '<' (y,x) coordinates of top-left of each patch.
    • locz

      public int locz
      invalid input: '<' patch mask depending on pixel variance.
    • curz

      public int curz
      invalid input: '<' current z location of the patches (z of the first frame of the patch).
    • nextz

      public int nextz
      invalid input: '<' z location for next frame added.
    • coff

      public javax.vecmath.Point3i coff
      invalid input: '<' value of curz that will form a new patch.
    • allx

      public Vector<Integer> allx
      invalid input: '<' offset to center of patch.
    • ally

      public Vector<Integer> ally
      invalid input: '<' all x-locations on step grid.
    • vbuf

      public libdt.Mat[] vbuf
      invalid input: '<' all y-locations on step grid.
    • vbuf_zm

      public libdt.Mat[] vbuf_zm
      invalid input: '<' video buffer to store current frames [vrows,vcols,patopt.win.z] type=OPT_MAT_TYPE.
    • patches

      public Vector<libdt.Mat[]> patches
      invalid input: '<' video buffer w/o mean [vrows,vcols,patopt.win.z] type=OPT_MAT_TYPE.
    • flag_zm

      public boolean flag_zm
      invalid input: '<' the set of patches.
    • frame_center

      public libdt.Mat frame_center
      invalid input: '<' flag if vbuf_zm is used.
    • frame_patches

      public libdt.Mat[] frame_patches
      invalid input: '<' center frame of the video buffer (reference to vbuf).
  • Constructor Details

    • PatchExtractor

      public PatchExtractor(libdt.PatchOptions patopt, int vrows, int vcols)
      invalid input: '<' center frames of the video buffer (reference to vbuf).
  • Method Details

    • getLoc

      void getLoc()
    • reset

      void reset()