net.grelf.grip
Class StarSegmenter
java.lang.Object
net.grelf.grip.StarSegmenter
public class StarSegmenter
- extends java.lang.Object
Segments stars from images by using an algorithm designed specifically for the purpose. Tests on a
variety of images have shown that it works in the presence of considerable background variation, so
background correction is not a necessary preceding step. It even works if the stars are against a
background of nebulosity: it detects stars embedded in M42, for example.
There are two adjustable parameters, called difference and radius. Tests on a variety of images show that
values 38 and 16 respectively are suitable for these parameters. In GRIP, class Config enables these
two parameters to be varied if necessary: the user can do that through the Config menu.
Segmentation results in a binary mask from which the stars may be detected as blobs in the usual way. See
class Blob.
|
Method Summary |
static BlobMask |
segment(Image image,
int difference,
int radius)
Segment the image to detect pixels in stars using the given parameters. |
static void |
segment(ImFrame imf,
int difference,
int radius)
Segment the image to detect pixels in stars using the given parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StarSegmenter
public StarSegmenter()
segment
public static void segment(ImFrame imf,
int difference,
int radius)
- Segment the image to detect pixels in stars using the given parameters. Typical parameter values
are 38 and 16 respectively.
The image may have any number of bands.
After segmentation this method does a 1-pixel erosion followed by a 1-pixel dilation (see
PointList.erode () and .dilate ()) - this tends to separate blobs which are just joined by a pixel or two.
segment
public static BlobMask segment(Image image,
int difference,
int radius)
- Segment the image to detect pixels in stars using the given parameters. Typical parameter values
are 38 and 16 respectively.
Return a binary mask (values BlobMask.MASK_CLEAR or BlobMask.MASK_SET), suitable for setting into GlassPane.
Blobs may be detected in the mask in the usual way. The image may have any number of bands.
This method does NOT do an erode/dilate step, for speed in the batch astro-process.