net.aerith.misao.image.filter
Class BloomingCancelFilter

java.lang.Object
  |
  +--net.aerith.misao.image.filter.Filter
        |
        +--net.aerith.misao.image.filter.BloomingCancelFilter

public class BloomingCancelFilter
extends Filter

The BloomingCancelFilter is an image processing filter to cancel the blooming. The result is stored in the original image.

In the case both the blooming and streaks appear, operate the StreakCancelFilter at first, then operate this BloomingCancelFilter.

There are some requirements.


Inner Class Summary
protected  class BloomingCancelFilter.BloomingStar
          The BloomingStar is a set of adjoining pixels, peak value, center position and radius of a blooming star.
 
Field Summary
protected  MonoImage blooming_flag_image
          The blooming flag image.
protected  Position[] blooming_positions
          The list of blooming star positions.
protected  double blooming_threshold_ratio
          The threshold ratio to regard a pixel is saturated.
protected  boolean keep_blooming_flag_image
          True when to keep the blooming flag image.
protected static int LEFT
          The value of influenced direction which represents left.
protected static int RIGHT
          The value of influenced direction which represents right.
 
Fields inherited from class net.aerith.misao.image.filter.Filter
monitor_set
 
Constructor Summary
BloomingCancelFilter()
          Constructs a filter.
 
Method Summary
 MonoImage getBloomingFlagImage()
          Gets the blooming flag image.
 Position[] getBloomingPositions()
          Gets the list of blooming star positions.
 void keepBloomingFlagImage()
          Sets the flag to keep the blooming flag image.
 MonoImage operate(MonoImage image)
          Operates the image processing filter and stores the result into the original image buffer.
 
Methods inherited from class net.aerith.misao.image.filter.Filter
addMonitor, setMonitor
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

blooming_threshold_ratio

protected double blooming_threshold_ratio
The threshold ratio to regard a pixel is saturated. When 1.0, only the biggest pixels are regarded as saturated.

keep_blooming_flag_image

protected boolean keep_blooming_flag_image
True when to keep the blooming flag image.

LEFT

protected static final int LEFT
The value of influenced direction which represents left.

RIGHT

protected static final int RIGHT
The value of influenced direction which represents right.

blooming_flag_image

protected MonoImage blooming_flag_image
The blooming flag image.

blooming_positions

protected Position[] blooming_positions
The list of blooming star positions.
Constructor Detail

BloomingCancelFilter

public BloomingCancelFilter()
Constructs a filter.
Method Detail

keepBloomingFlagImage

public void keepBloomingFlagImage()
Sets the flag to keep the blooming flag image.

getBloomingFlagImage

public MonoImage getBloomingFlagImage()
Gets the blooming flag image. This is only for debugging use. The flag is 2 if the pixel is saturated, 1 if the pixel is also blooming, not saturated but adjoining to the saturated pixels, and 0 if not blooming.
Returns:
the blooming flag image.

getBloomingPositions

public Position[] getBloomingPositions()
Gets the list of blooming star positions.
Returns:
the list of blooming star positions.

operate

public MonoImage operate(MonoImage image)
Operates the image processing filter and stores the result into the original image buffer.

There are some requirements.

The process in this method assumes that the blooming influences badly towards right. But in the case it does towards left, the image is automatically reversed and processed properly.

Overrides:
operate in class Filter
Parameters:
image - the original image to process.
Returns:
the original image buffer.