net.aerith.misao.image
Class DefaultLevelAdjustmentSet
java.lang.Object
|
+--net.aerith.misao.image.LevelAdjustmentSet
|
+--net.aerith.misao.image.DefaultLevelAdjustmentSet
- public class DefaultLevelAdjustmentSet
- extends LevelAdjustmentSet
The DefaultLevelAdjustmentSet
represents a set of the
original statistics and the current level to view of an image.
In this constructor, the minimum and maximum value is set properly
so that the stars on the image will be visible by default on the
screen. In order to set the value properly even in the case of an
image half of whose area is filled with illegal value like 0, it
calculates the minimum and maximum value in the following steps:
- Creates a histogram.
- Smoothes the histogram by median filter.
- Creates a mini image based on the smoothed histogram.
- Calculates the average and standard deviation of pixel values.
- Set the minimum as average - 1.0 * deviation, the
maximum as average + 4.25 * deviation.
Sometimes there may be a few extremely high-value pixels. In that
case, the division step of the histogram will be very rough and
the average and standard deviation calculated in the above steps
will be inaccurate. So in order to avoid the influence of rare
high-value pixels, only values of common pixels are used to create
the histogram. Actually, it calculates the minimum and maximum
value in the following steps:
- Creates a histogram.
- Smoothes the histogram by median filter.
- Estimates the range of common pixels.
- Creates a histogram using only the common pixels.
- Smoothes the histogram by median filter.
- Creates a mini image based on the smoothed histogram.
- Calculates the average and standard deviation of pixel values.
- Set the minimum as average - 1.0 * deviation, the
maximum as average + 4.25 * deviation.
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
DefaultLevelAdjustmentSet
public DefaultLevelAdjustmentSet(MonoImage mono_image)
- Constructs a
DefaultLevelAdjustmentSet
based on
the specified image.
- Parameters:
mono_image
- the image.