Skip to content

Commit

Permalink
More generous thresholds for corner detection
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-wolflein committed Nov 27, 2020
1 parent d829509 commit 008fd1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chesscog/corner_detection/detect_corners.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def find_corners(cfg: CN, img: np.ndarray) -> np.ndarray:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
edges = detect_edges(cfg, gray)
lines = detect_lines(cfg, edges)
if lines.shape[0] > 200:
if lines.shape[0] > 400:
return None
all_horizontal_lines, all_vertical_lines = cluster_horizontal_and_vertical_lines(
lines)
Expand Down Expand Up @@ -55,7 +55,7 @@ def find_corners(cfg: CN, img: np.ndarray) -> np.ndarray:
best_num_inliers = num_inliers
best_configuration = configuration
iterations += 1
if iterations > 100:
if iterations > 1000:
return None

# Retrieve best configuration
Expand Down

0 comments on commit 008fd1a

Please sign in to comment.