001/* 002 * Copyright (C) Photon Vision. 003 * 004 * This program is free software: you can redistribute it and/or modify 005 * it under the terms of the GNU General Public License as published by 006 * the Free Software Foundation, either version 3 of the License, or 007 * (at your option) any later version. 008 * 009 * This program is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 012 * GNU General Public License for more details. 013 * 014 * You should have received a copy of the GNU General Public License 015 * along with this program. If not, see <https://www.gnu.org/licenses/>. 016 */ 017 018package org.photonvision.vision.pipeline.result; 019 020import java.util.List; 021import java.util.stream.Collectors; 022import org.opencv.core.Point; 023import org.photonvision.vision.frame.Frame; 024import org.photonvision.vision.target.TrackedTarget; 025 026public class CalibrationPipelineResult extends CVPipelineResult { 027 private static List<TrackedTarget> cornersToTarget(List<List<Point>> corners) { 028 return corners.stream().map(TrackedTarget::new).collect(Collectors.toList()); 029 } 030 031 public CalibrationPipelineResult( 032 long sequenceID, 033 double latencyNanos, 034 double fps, 035 Frame outputFrame, 036 List<List<Point>> corners) { 037 super(sequenceID, latencyNanos, fps, cornersToTarget(corners), outputFrame); 038 } 039}