优化扫码识别速度

This commit is contained in:
jenly1314
2018-08-23 16:20:05 +08:00
parent 02d3172a6f
commit cdb116200f
7 changed files with 13 additions and 13 deletions

View File

@@ -267,10 +267,10 @@ public final class CameraManager {
// Called early, before init even finished
return null;
}
rect.left = rect.left * cameraResolution.x / screenResolution.x;
rect.right = rect.right * cameraResolution.x / screenResolution.x;
rect.top = rect.top * cameraResolution.y / screenResolution.y;
rect.bottom = rect.bottom * cameraResolution.y / screenResolution.y;
// rect.left = rect.left * cameraResolution.x / screenResolution.x;
// rect.right = rect.right * cameraResolution.x / screenResolution.x;
// rect.top = rect.top * cameraResolution.y / screenResolution.y;
// rect.bottom = rect.bottom * cameraResolution.y / screenResolution.y;
framingRectInPreview = rect;
}
return framingRectInPreview;
@@ -329,8 +329,8 @@ public final class CameraManager {
return null;
}
// Go ahead and assume it's YUV rather than die.
return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top,
rect.width(), rect.height(), false);
return new PlanarYUVLuminanceSource(data, width, height, 0, 0,
width, height, false);
}
}