CoarseCentroids:

Path: SpacecraftEstimation/StarCentroiding

% Finds the centroids given a pixelmap.
 This uses the center of mass method. The centroids are calculated assuming a
 lost-in-space condition. If the noise floor 'b' is empty, a noise floor will
 be calculated from the pixelmap histogram. To calculate an edge noise instead
 specify true for the edge flag.

 x is defined in the column direction, y in the row direction.
 iC is in the same units as the intensity of the pixel map.
 With one output it will return [x0;y0;iC]

 Type CoarseCentroids for a demo which will generate a small image using
 ImagerPSF, add noise with PoissonNoise, calculate the centroids and plot the
 results.
--------------------------------------------------------------------------
   Form:
       options = CoarseCentroids;
   [r0, iC, d] = CoarseCentroids( pixels, options, doPlot )
          [x0] = CoarseCentroids( pixels, options, doPlot )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   pixels     (:,:)  Pixel map
   options     (.)   Options data
                       .edge    (1)  Logical for computing edge noise
                       .blobify (1)  Logical for using the Blobify algo
                       .T      (1,1) Threshold indicating a star is present
                       .b      (1,1) Sky-background noise floor
                       .nROI   (1,1) Size of region of interest (pixels)
                       .minPix (1,1) Minimum number of pixels for valid star
   doPlot     (1,1)  Specify true to generate the demo plots
                     -- Blobs if blobify was performed
                     -- Pixels above threshold
                     -- Pixelmap with centroids

   -------
   Outputs
   -------
   r0           (2,:)  (x,y) centroid (column,row)
   iC           (1,:)  Total intensity of the centroids
   d             (.)   Algorithm data
                       .R  (1,1) RMS of sky-background noise

--------------------------------------------------------------------------
   Reference: Liebe, C. "Accuracy Performance of Star Trackers - A Tutorial",
   IEEE Transactions on Aerospace and Electronic Systems. Vol. 38, N0. 2,
   April, 2002.
--------------------------------------------------------------------------
   See also FitHist, Blobify, CentroidCOM
--------------------------------------------------------------------------

Children:

SpacecraftEstimation: StarCentroiding/Blobify
SpacecraftEstimation: StarCentroiding/CentroidCOM
SpacecraftEstimation: StarProcessing/ApplyThreshold
SpacecraftEstimation: StarProcessing/FitHist
SpacecraftEstimation: StarVisualization/DrawBlobs
SpacecraftEstimation: StarVisualization/PlotCentroids
Common: CommonData/SwooshWatermark
Common: General/DeBlankLT
Common: General/Watermark
Common: Graphics/NewFig
Common: Graphics/PltStyle
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Imaging: PSFUtils/ImagerPSF
Imaging: PSFUtils/RHSGaussianPSF
Imaging: Utilities/PoissonNoise
Math: Linear/Mag

Back to the SpacecraftEstimation Module page