FLIR ADK
Getting Sta rt e d
The information contained herein does not contain technology as
defined by EAR,15 CFR772, is publicly available, and therefore
not subject to EAR.
27
mono_img = img.astype(numpy.uint8)
return mono_img
else:
- return self.br.imgmsg_to_cv2(msg, "mono8")
+ mono8a = self.br.imgmsg_to_cv2(msg, “mono8)
+ mono8b = numpy.array(255 - mono8a, dtype=numpy.uint8)
+ return mono8b
2) When calling findChessboardCorners, only use the adaptive threshold flag.
def _get_corners(img, board, refine = True, checkerboard_flags=0):
"""
Get corners for a particular chessboard for an image
"""
h = img.shape[0]
w = img.shape[1]
if len(img.shape) == 3 and img.shape[2] == 3:
mono = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
else:
mono = img
(ok, corners) = cv2.findChessboardCorners(mono, (board.n_cols,
- board.n_rows), flags = cv2.CALIB_CB_ADAPTIVE_THRESH |
- cv2.CALIB_CB_NORMALIZE_IMAGE | checkerboard_flags)
+ board.n_rows), flags = cv2.CALIB_CB_ADAPTIVE_THRESH)
if not ok:
return (ok, corners)