Skip to content

Commit

Permalink
feature/multi-target
Browse files Browse the repository at this point in the history
- Updated example for latest updates
  • Loading branch information
lessthanoptimal committed Aug 28, 2023
1 parent 89ab68f commit 68a7428
Showing 1 changed file with 4 additions and 5 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Peter Abeles. All Rights Reserved.
* Copyright (c) 2023, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -41,6 +41,7 @@
public class ExampleCalibrateMulti {
public static void main( String[] args ) {
// Creates a detector and specifies its physical characteristics
// Size units are not explicitly specified. You just need to be consistent.
CalibrationDetectorMultiECoCheck detector = FactoryFiducialCalibration.ecocheck(null,
ConfigECoCheckMarkers.parse("14x10n1", /* square size */1.0));

Expand All @@ -55,10 +56,8 @@ public static void main( String[] args ) {
var calibrator = new CalibrateMultiPlanar();
// Tell it what type of camera model to use
calibrator.getCalibratorMono().configurePinhole(true, 3, false);
// NOTE: For now only one calibration target is supported. Support for multiple targets is planned for
// the future.
calibrator.initialize(/*num cameras*/3, /*num targets*/1);
calibrator.setTargetLayout(0, detector.getLayout(0));
calibrator.initialize(/*num cameras*/3, /*num targets*/ detector.getTotalUniqueMarkers());
calibrator.setTargetLayouts(detector.getLayouts());
calibrator.setCameraProperties(0, 1224, 1024);
calibrator.setCameraProperties(1, 1224, 1024);
calibrator.setCameraProperties(2, 1224, 1024);
Expand Down

0 comments on commit 68a7428

Please sign in to comment.