类 SearchBasedDetector
- java.lang.Object
-
- cc.chungkwong.mathocr.offline.skew.SearchBasedDetector
-
- 所有已实现的接口:
SkewDetector
- 直接已知子类:
HTDetector,PCPDetector,PPDetector,TCDetector
public abstract class SearchBasedDetector extends Object implements SkewDetector
Search based skew detector- 作者:
- Chan Chung Kwong
-
-
构造器概要
构造器 构造器 说明 SearchBasedDetector()Create a skew detectorSearchBasedDetector(SearchStrategy strategy)Create a skew detector with specified search strategy
-
-
-
构造器详细资料
-
SearchBasedDetector
public SearchBasedDetector()
Create a skew detector
-
SearchBasedDetector
public SearchBasedDetector(SearchStrategy strategy)
Create a skew detector with specified search strategy- 参数:
strategy-
-
-
方法详细资料
-
detect
public double detect(BufferedImage image)
从接口复制的说明:SkewDetectorDetect skew- 指定者:
detect在接口中SkewDetector- 参数:
image- to be detected- 返回:
- the angle in radius
-
getCost
protected abstract double getCost(byte[] pixels, int width, int height, double theta)Calculate cost for a angle(lower is better)- 参数:
pixels- pixel arraywidth- width of the bitmapheight- height of the bitmaptheta- angle- 返回:
- the cost
-
-