mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-02 02:51:40 +00:00
Draw3dTargetsPipe returns immediately if coeffs are null (previously NPE crashlooped) (#485)
* Draw3dTargetsPipe returns immediately if coeffs are null * fix lint
This commit is contained in:
@@ -43,6 +43,11 @@ public class Draw3dTargetsPipe
|
|||||||
@Override
|
@Override
|
||||||
protected Void process(Pair<Mat, List<TrackedTarget>> in) {
|
protected Void process(Pair<Mat, List<TrackedTarget>> in) {
|
||||||
if (!params.shouldDraw) return null;
|
if (!params.shouldDraw) return null;
|
||||||
|
if (params.cameraCalibrationCoefficients == null
|
||||||
|
|| params.cameraCalibrationCoefficients.getCameraIntrinsicsMat() == null
|
||||||
|
|| params.cameraCalibrationCoefficients.getCameraExtrinsicsMat() == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
for (var target : in.getRight()) {
|
for (var target : in.getRight()) {
|
||||||
// draw convex hull
|
// draw convex hull
|
||||||
|
|||||||
Reference in New Issue
Block a user