Android: Ignore the return value of Matrix.mapRect(), as it cannot always be trusted; there's no reason for it to legitimately ever be false in the demo anyway.
Change: 143827418
This commit is contained in:
parent
004fc82c29
commit
1095b9b867
@ -167,13 +167,11 @@ public class MultiBoxTracker {
|
||||
(int) (multiplier * frameWidth),
|
||||
sensorOrientation,
|
||||
false);
|
||||
|
||||
for (final TrackedRecognition recognition : trackedObjects) {
|
||||
final ObjectTracker.TrackedObject trackedObject = recognition.trackedObject;
|
||||
|
||||
final RectF trackedPos = trackedObject.getTrackedPositionInPreviewFrame();
|
||||
|
||||
if (getFrameToCanvasMatrix().mapRect(trackedPos)) {
|
||||
getFrameToCanvasMatrix().mapRect(trackedPos);
|
||||
boxPaint.setColor(recognition.color);
|
||||
|
||||
final float cornerSize = Math.min(trackedPos.width(), trackedPos.height()) / 8.0f;
|
||||
@ -186,7 +184,6 @@ public class MultiBoxTracker {
|
||||
borderedText.drawText(canvas, trackedPos.left + cornerSize, trackedPos.bottom, labelString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void onFrame(
|
||||
final int w,
|
||||
|
Loading…
x
Reference in New Issue
Block a user