private void calc() {
        int hMin = (int) ((this.cImage.getHeight()) / 4.0);
        int hMax = (int) ((this.cImage.getHeight()) * 3.0 / 4.0);
        init();

        for (int y = hMin; y < hMax; y++) {
            for (int x = 1; x < (this.cImage.getWidth() - 2); x++) {
                // only lower edges are considered
                if (ImageUtil.isBlack(this.cImage, x, y)) {
                    if (!ImageUtil.isBlack(this.cImage, x, y + 1)) {
                        calc(x, y);
                    }
                }
            }
        }

    }
private void calc ( ) { int hMin = ( int ) ( ( this . cImage . getHeight ( ) ) / 4.0 ) ; int hMax = ( int ) ( ( this . cImage . getHeight ( ) ) * 3.0 / 4.0 ) ; init ( ) ; for ( int y = hMin ; y < hMax ; y ++ ) { for ( int x = 1 ; x < ( this . cImage . getWidth ( ) - 2 ) ; x ++ ) { if ( ImageUtil . isBlack ( this . cImage , x , y ) ) { if ( ! ImageUtil . isBlack ( this . cImage , x , y + 1 ) ) { calc ( x , y ) ; } } } } }
Hough Transformation