Internal change
PiperOrigin-RevId: 515187139
This commit is contained in:
parent
9f1f4273d0
commit
8d9f627fd9
|
@ -28,10 +28,10 @@ import java.util.Map;
|
||||||
/** The base class of MediaPipe vision tasks. */
|
/** The base class of MediaPipe vision tasks. */
|
||||||
public class BaseVisionTaskApi implements AutoCloseable {
|
public class BaseVisionTaskApi implements AutoCloseable {
|
||||||
private static final long MICROSECONDS_PER_MILLISECOND = 1000;
|
private static final long MICROSECONDS_PER_MILLISECOND = 1000;
|
||||||
private final TaskRunner runner;
|
protected final TaskRunner runner;
|
||||||
private final RunningMode runningMode;
|
protected final RunningMode runningMode;
|
||||||
private final String imageStreamName;
|
protected final String imageStreamName;
|
||||||
private final String normRectStreamName;
|
protected final String normRectStreamName;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
System.loadLibrary("mediapipe_tasks_vision_jni");
|
System.loadLibrary("mediapipe_tasks_vision_jni");
|
||||||
|
@ -145,7 +145,7 @@ public class BaseVisionTaskApi implements AutoCloseable {
|
||||||
* Converts an {@link ImageProcessingOptions} instance into a {@link NormalizedRect} protobuf
|
* Converts an {@link ImageProcessingOptions} instance into a {@link NormalizedRect} protobuf
|
||||||
* message.
|
* message.
|
||||||
*/
|
*/
|
||||||
private static NormalizedRect convertToNormalizedRect(
|
protected static NormalizedRect convertToNormalizedRect(
|
||||||
ImageProcessingOptions imageProcessingOptions) {
|
ImageProcessingOptions imageProcessingOptions) {
|
||||||
RectF regionOfInterest =
|
RectF regionOfInterest =
|
||||||
imageProcessingOptions.regionOfInterest().isPresent()
|
imageProcessingOptions.regionOfInterest().isPresent()
|
||||||
|
|
|
@ -33,7 +33,7 @@ public abstract class ImageSegmenterResult implements TaskResult {
|
||||||
* @param timestampMs a timestamp for this result.
|
* @param timestampMs a timestamp for this result.
|
||||||
*/
|
*/
|
||||||
// TODO: consolidate output formats across platforms.
|
// TODO: consolidate output formats across platforms.
|
||||||
static ImageSegmenterResult create(List<MPImage> segmentations, long timestampMs) {
|
public static ImageSegmenterResult create(List<MPImage> segmentations, long timestampMs) {
|
||||||
return new AutoValue_ImageSegmenterResult(
|
return new AutoValue_ImageSegmenterResult(
|
||||||
Collections.unmodifiableList(segmentations), timestampMs);
|
Collections.unmodifiableList(segmentations), timestampMs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user