def show_board(img_filename): corners_filename = os.path.splitext(img_filename)[0] + "_corners.txt" corners, chessboard = load_board(corners_filename) if corners is None: return img = imread(img_filename) pycb.draw_boards(img, corners, [chessboard])
from scipy.misc import imread from pycb import extract_chessboards, draw_boards img = imread("scene1.jpg") corners, chessboards = extract_chessboards(img) draw_boards(img, corners, chessboards)
from scipy.misc import imread from pycb import extract_chessboards, draw_boards img = imread("scene1.jpg") corners, chessboards, unrefined = extract_chessboards(img, include_unrefined=True) draw_boards(img, corners, chessboards, unrefined)