Class IntersectionFinder

java.lang.Object
  |
  +--IntersectionFinder

public class IntersectionFinder
extends java.lang.Object

Finds intersections of LineSegment objects, and expands/combines the objects accordingly


Field Summary
 int tick_count
           
 int TICK_ID_START
           
 
Constructor Summary
IntersectionFinder(java.util.Vector _segments, int[][] _pixels, LineSegmentFitter _fitter)
           
 
Method Summary
 void chainAndMarkSegments()
          Chain Segments together that are within CHAINING_BOX_SIZE of each other.
 void extendSegments()
          Perform 2-wing extensions on all unchained endpoints.
 TroubleSpot[] findTroubleSpots()
          Finds failures close to one another in the image, and returns an array of TroubleSpots
 void handleTroubleSpot(TroubleSpot ts)
           
 void handleTroubleSpot1(TroubleSpot ts)
          special case for troublespot with 1 endpoint - just perform one-wing extension on the segment
 void handleTroubleSpot2(TroubleSpot ts)
          special case for troublespot with 2 endpoints - could be a single line broken up by a tick mark that was too small to be assigned its own segment.
 void handleTroubleSpotN(TroubleSpot ts)
          Generic case: check for colinear lines, merge them, and extend others
 void handleTroubleSpotTick(TroubleSpot ts)
          Special case for tick marks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tick_count

public int tick_count

TICK_ID_START

public int TICK_ID_START
Constructor Detail

IntersectionFinder

public IntersectionFinder(java.util.Vector _segments,
                          int[][] _pixels,
                          LineSegmentFitter _fitter)
Method Detail

chainAndMarkSegments

public void chainAndMarkSegments()
Chain Segments together that are within CHAINING_BOX_SIZE of each other. Also mark the chained endpoints so we dont try to extend them later.


extendSegments

public void extendSegments()
Perform 2-wing extensions on all unchained endpoints. This is done before intersection finding in order to make Endpoints of intersecting and colinear segments as close as possible to each other.


handleTroubleSpot

public void handleTroubleSpot(TroubleSpot ts)

handleTroubleSpot1

public void handleTroubleSpot1(TroubleSpot ts)
special case for troublespot with 1 endpoint - just perform one-wing extension on the segment


handleTroubleSpot2

public void handleTroubleSpot2(TroubleSpot ts)
special case for troublespot with 2 endpoints - could be a single line broken up by a tick mark that was too small to be assigned its own segment.


handleTroubleSpotN

public void handleTroubleSpotN(TroubleSpot ts)
Generic case: check for colinear lines, merge them, and extend others


handleTroubleSpotTick

public void handleTroubleSpotTick(TroubleSpot ts)
Special case for tick marks


findTroubleSpots

public TroubleSpot[] findTroubleSpots()
Finds failures close to one another in the image, and returns an array of TroubleSpots