|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.javaocr.filter.AbstractSinglePixelFilter
net.sourceforge.javaocr.filter.HistogramFilter
public class HistogramFilter
collect image histogram and perform useful calculations on it
| Field Summary | |
|---|---|
(package private) int |
amount_bins
|
private static int |
DEFAULT_BINS
|
(package private) int[] |
defaultSmooth
|
(package private) int[] |
histogramm
|
(package private) int |
totalCount
|
| Constructor Summary | |
|---|---|
HistogramFilter()
|
|
HistogramFilter(int amount_bins)
|
|
| Method Summary | |
|---|---|
int |
adaptiveThreshold()
compute adaptive threshold in iterative way starting from the middle of histogramm. |
int |
adaptiveThreshold(int threshold)
recursively compute adaptive threshold |
private int |
computeM(int from,
int to)
compute meadian out of defined span |
void |
fold(int[] folder)
Deprecated. does it makes sense at all? |
int[] |
getHistogramm()
|
int |
getTotalCount()
|
protected void |
processPixel(Image image)
process single image pixel subclass shall retrieve current pixel value with image.next() and store it with image.put() after processing |
void |
reset()
|
void |
smooth()
Deprecated. does it makes sense at all? |
| Methods inherited from class net.sourceforge.javaocr.filter.AbstractSinglePixelFilter |
|---|
process |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int[] defaultSmooth
int[] histogramm
int totalCount
private static final int DEFAULT_BINS
final int amount_bins
| Constructor Detail |
|---|
public HistogramFilter()
public HistogramFilter(int amount_bins)
| Method Detail |
|---|
public int[] getHistogramm()
public int getTotalCount()
public void reset()
protected void processPixel(Image image)
AbstractSinglePixelFilter
processPixel in class AbstractSinglePixelFilterpublic void smooth()
public void fold(int[] folder)
throws IllegalArgumentException
folder - array contaning folding coefficients. must have odd length
IllegalArgumentExceptionpublic int adaptiveThreshold()
public int adaptiveThreshold(int threshold)
threshold - start value for threshold computation
private int computeM(int from,
int to)
from - value (inclusive)to - too value (exclusive)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||