SUBMASK - kpmoorse/sim_reg GitHub Wiki

sub = submask(img, ctr, varargin)
Extract a masked subset of the input image around the input centroid

Take as inputs:

  • img [MxN numeric array]: full image from which to extract a subimage
  • ctr [2x1 or 1x2 numeric array]: centroid about which to extract subimage
  • varargin:
    • Radius [0 < int]: pixel radius of the extracted subimage; default is 20
    • Mask [MxM boolean array]: mask of pixels in subimage to maintain (~Mask is set to zero); default is a circle