mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
Re-enable OpenCV ArUco detector for AprilTags (#916)
- Fixes ArUco on picam - Adds `ArucoPoseEstimatorPipe` for single-tag pose estimation - Previously, `Aruco.estimatePoseSingleMarkers()` was used for tag pose estimation. This uses the default `SOLVEPNP_ITERATIVE` solver and I believe the method is removed in opencv 4.8. The `SOLVEPNP_IPPE_SQUARE` solver implemented is more appropriate for markers. - Pipeline architecture cleanup - Re-enables ArUco pipeline in UI - Multi-tag support ArUco detector support is still considered experimental at this time. This should enable a baseline of support for initial testing, but expect some quirks to remain across platforms.
This commit is contained in:
@@ -245,11 +245,22 @@ export const DefaultAprilTagPipelineSettings: AprilTagPipelineSettings = {
|
||||
|
||||
export interface ArucoPipelineSettings extends PipelineSettings {
|
||||
pipelineType: PipelineType.Aruco;
|
||||
decimate: number;
|
||||
threads: number;
|
||||
numIterations: number;
|
||||
cornerAccuracy: number;
|
||||
|
||||
tagFamily: AprilTagFamily;
|
||||
|
||||
threshWinSizes: WebsocketNumberPair | [number, number];
|
||||
threshStepSize: number;
|
||||
threshConstant: number;
|
||||
debugThreshold: boolean;
|
||||
|
||||
useCornerRefinement: boolean;
|
||||
|
||||
useAruco3: boolean;
|
||||
aruco3MinMarkerSideRatio: number;
|
||||
aruco3MinCanonicalImgSide: number;
|
||||
|
||||
doMultiTarget: boolean;
|
||||
doSingleTargetAlways: boolean;
|
||||
}
|
||||
export type ConfigurableArucoPipelineSettings = Partial<Omit<ArucoPipelineSettings, "pipelineType">> &
|
||||
ConfigurablePipelineSettings;
|
||||
@@ -262,11 +273,17 @@ export const DefaultArucoPipelineSettings: ArucoPipelineSettings = {
|
||||
ledMode: false,
|
||||
pipelineType: PipelineType.Aruco,
|
||||
|
||||
decimate: 1,
|
||||
threads: 2,
|
||||
numIterations: 100,
|
||||
cornerAccuracy: 25,
|
||||
useAruco3: true
|
||||
tagFamily: AprilTagFamily.Family16h5,
|
||||
threshWinSizes: { first: 11, second: 91 },
|
||||
threshStepSize: 40,
|
||||
threshConstant: 10,
|
||||
debugThreshold: false,
|
||||
useCornerRefinement: true,
|
||||
useAruco3: false,
|
||||
aruco3MinMarkerSideRatio: 0.02,
|
||||
aruco3MinCanonicalImgSide: 32,
|
||||
doMultiTarget: false,
|
||||
doSingleTargetAlways: false
|
||||
};
|
||||
|
||||
export type ActivePipelineSettings =
|
||||
|
||||
Reference in New Issue
Block a user