mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
Modify pipes to pass around same Mat, fix Streamer leak
This commit is contained in:
@@ -40,7 +40,10 @@ public class USBCameraCapture implements CameraCapture {
|
||||
public Pair<Mat, Long> getFrame() {
|
||||
Long deltaTime;
|
||||
// TODO: Why multiply by 1000 here?
|
||||
deltaTime = cvSink.grabFrame(imageBuffer) * 1000L;
|
||||
Mat tempMat = new Mat();
|
||||
deltaTime = cvSink.grabFrame(tempMat) * 1000L;
|
||||
tempMat.copyTo(imageBuffer);
|
||||
tempMat.release();
|
||||
return Pair.of(imageBuffer, deltaTime);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user