public class ChessboardCornerFinder extends Object implements ImageAnalyser<FImage>
This is improved variant of chessboard corner detection algorithm that uses a graph of connected quads. It is based on the code contributed by Vladimir Vezhnevets and Philip Gruebele. Here is the copyright notice from the original Vladimir's code:
The algorithms developed and implemented by Vezhnevets Vldimir aka Dead Moroz (vvp@graphics.cs.msu.ru) See http://graphics.cs.msu.su/en/research/calibration/opencv.html for detailed information.
Reliability additions and modifications made by Philip Gruebele.
Some further improvements for detection of partially occluded boards at non-ideal lighting conditions have been made by Alex Bovyrin and Kurt Kolonige.
Modifier and Type | Class and Description |
---|---|
static class |
ChessboardCornerFinder.Options
Options for controlling how the corner finder works
|
Constructor and Description |
---|
ChessboardCornerFinder(int patternWidth,
int patternHeight,
ChessboardCornerFinder.Options... opts)
Construct with the given pattern size and options set.
|
Modifier and Type | Method and Description |
---|---|
void |
analyseImage(FImage image)
Analyse an image.
|
void |
drawChessboardCorners(MBFImage image)
Draw the predicted chessboard corners from the last call to
analyseImage(FImage) on the given image. |
static void |
drawChessboardCorners(MBFImage image,
int patternWidth,
int patternHeight,
List<? extends Point2d> corners,
boolean found)
Draw the given chessboard corners from on the given image.
|
List<Point2dImpl> |
getCorners()
Get any corners detected by the last call to
analyseImage(FImage) . |
boolean |
isFound()
Was a chessboard found in the last call to
analyseImage(FImage) ? |
static void |
main(String[] args)
Simple test program
|
public ChessboardCornerFinder(int patternWidth, int patternHeight, ChessboardCornerFinder.Options... opts)
patternWidth
- the pattern widthpatternHeight
- the pattern heightopts
- the optionspublic void analyseImage(FImage image)
ImageAnalyser
analyseImage
in interface ImageAnalyser<FImage>
image
- The image to process in place.public boolean isFound()
analyseImage(FImage)
?public List<Point2dImpl> getCorners()
analyseImage(FImage)
.public void drawChessboardCorners(MBFImage image)
analyseImage(FImage)
on the given image.image
- the image to draw onpublic static void drawChessboardCorners(MBFImage image, int patternWidth, int patternHeight, List<? extends Point2d> corners, boolean found)
image
- the image to draw onpatternWidth
- the chessboard pattern widthpatternHeight
- the chessboard pattern heightcorners
- the cornersfound
- true if the corners were foundpublic static void main(String[] args) throws IOException
args
- IOException