@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
@ -0,0 +1 @@
|
||||
/build
|
@ -0,0 +1,59 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.mindspore.imagesegmentation"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
noCompress "ms"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'download.gradle'
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ['*.aar', '*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
||||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* To download necessary library from HuaWei server.
|
||||
* Including mindspore-lite .so file, minddata-lite .so file and model file.
|
||||
* The libraries can be downloaded manually.
|
||||
*/
|
||||
def mindsporeLite_Version = "mindspore-lite-maven-1.0.1"
|
||||
def targetModelFile = "src/main/assets/mobile_segment.ms"
|
||||
def modelDownloadUrl = "https://download.mindspore.cn/model_zoo/official/lite/mobile_segment_lite/mobile_segment.ms"
|
||||
def mindsporeLiteDownloadUrl = "https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.0.1/lite/java/${mindsporeLite_Version}.zip"
|
||||
def mindSporeLibrary = "libs/${mindsporeLite_Version}.zip"
|
||||
def cleantargetMindSporeInclude = "libs"
|
||||
def targetMindSporeInclude = "libs/"
|
||||
|
||||
|
||||
task downloadModelFile(type: DownloadUrlTask) {
|
||||
doFirst {
|
||||
println "Downloading ${modelDownloadUrl}"
|
||||
}
|
||||
sourceUrl = "${modelDownloadUrl}"
|
||||
target = file("${targetModelFile}")
|
||||
}
|
||||
|
||||
|
||||
task downloadMindSporeLibrary(type: DownloadUrlTask) {
|
||||
doFirst {
|
||||
println "Downloading ${mindsporeLiteDownloadUrl}"
|
||||
}
|
||||
sourceUrl = "${mindsporeLiteDownloadUrl}"
|
||||
target = file("${mindSporeLibrary}")
|
||||
}
|
||||
|
||||
task unzipMindSporeInclude(type: Copy, dependsOn: ['downloadMindSporeLibrary']) {
|
||||
doFirst {
|
||||
println "Unzipping ${mindSporeLibrary}"
|
||||
}
|
||||
from zipTree("${mindSporeLibrary}")
|
||||
into "${targetMindSporeInclude}"
|
||||
}
|
||||
|
||||
task cleanUnusedmindsporeFiles(type: Delete, dependsOn: ['unzipMindSporeInclude']) {
|
||||
delete fileTree("${cleantargetMindSporeInclude}").matching {
|
||||
include "*.zip"
|
||||
}
|
||||
}
|
||||
|
||||
if (file("libs/mindspore-lite-1.0.1.aar").exists()) {
|
||||
downloadMindSporeLibrary.enabled = false
|
||||
unzipMindSporeInclude.enabled = false
|
||||
cleanUnusedmindsporeFiles.enabled = false
|
||||
}
|
||||
|
||||
|
||||
if (file("src/main/assets/mobile_segment.ms").exists()) {
|
||||
downloadModelFile.enabled = false
|
||||
}
|
||||
|
||||
preBuild.dependsOn downloadModelFile
|
||||
preBuild.dependsOn downloadMindSporeLibrary
|
||||
preBuild.dependsOn unzipMindSporeInclude
|
||||
preBuild.dependsOn cleanUnusedmindsporeFiles
|
||||
|
||||
class DownloadUrlTask extends DefaultTask {
|
||||
@Input
|
||||
String sourceUrl
|
||||
|
||||
@OutputFile
|
||||
File target
|
||||
|
||||
@TaskAction
|
||||
void download() {
|
||||
ant.get(src: sourceUrl, dest: target)
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
@ -0,0 +1,26 @@
|
||||
package com.mindspore.imagesegmentation;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.mindspore.imagesegmentation", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mindspore.imagesegmentation">
|
||||
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEM" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.ImageSegmentation">
|
||||
<activity android:name=".MainActivity"
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.mindspore.imagesegmentation.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths"/>
|
||||
</provider>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,151 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.mindspore.imagesegmentation;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.media.ExifInterface;
|
||||
import android.net.Uri;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class BitmapUtils {
|
||||
private static final String TAG = "BitmapUtils";
|
||||
|
||||
public static void recycleBitmap(Bitmap... bitmaps) {
|
||||
for (Bitmap bitmap : bitmaps) {
|
||||
if (bitmap != null && !bitmap.isRecycled()) {
|
||||
bitmap.recycle();
|
||||
bitmap = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String getImagePath(Activity activity, Uri uri) {
|
||||
String[] projection = {MediaStore.Images.Media.DATA};
|
||||
Cursor cursor = activity.managedQuery(uri, projection, null, null, null);
|
||||
int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
cursor.moveToFirst();
|
||||
return cursor.getString(columnIndex);
|
||||
}
|
||||
|
||||
public static Bitmap loadFromPath(Activity activity, int id, int width, int height) {
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
options.inJustDecodeBounds = true;
|
||||
InputStream is = activity.getResources().openRawResource(id);
|
||||
int sampleSize = calculateInSampleSize(options, width, height);
|
||||
options.inSampleSize = sampleSize;
|
||||
options.inJustDecodeBounds = false;
|
||||
return zoomImage(BitmapFactory.decodeStream(is), width, height);
|
||||
}
|
||||
|
||||
public static Bitmap loadFromPath(Activity activity, Uri uri, int width, int height) {
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
options.inJustDecodeBounds = true;
|
||||
|
||||
String path = getImagePath(activity, uri);
|
||||
BitmapFactory.decodeFile(path, options);
|
||||
int sampleSize = calculateInSampleSize(options, width, height);
|
||||
options.inSampleSize = sampleSize;
|
||||
options.inJustDecodeBounds = false;
|
||||
|
||||
Bitmap bitmap = zoomImage(BitmapFactory.decodeFile(path, options), width, height);
|
||||
return rotateBitmap(bitmap, getRotationAngle(path));
|
||||
}
|
||||
|
||||
private static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {
|
||||
final int width = options.outWidth;
|
||||
final int height = options.outHeight;
|
||||
int inSampleSize = 1;
|
||||
|
||||
if (height > reqHeight || width > reqWidth) {
|
||||
// Calculate height and required height scale.
|
||||
final int heightRatio = Math.round((float) height / (float) reqHeight);
|
||||
// Calculate width and required width scale.
|
||||
final int widthRatio = Math.round((float) width / (float) reqWidth);
|
||||
// Take the larger of the values.
|
||||
inSampleSize = heightRatio > widthRatio ? heightRatio : widthRatio;
|
||||
}
|
||||
return inSampleSize;
|
||||
}
|
||||
|
||||
// Scale pictures to screen width.
|
||||
private static Bitmap zoomImage(Bitmap imageBitmap, int targetWidth, int maxHeight) {
|
||||
float scaleFactor =
|
||||
Math.max(
|
||||
(float) imageBitmap.getWidth() / (float) targetWidth,
|
||||
(float) imageBitmap.getHeight() / (float) maxHeight);
|
||||
Bitmap resizedBitmap =
|
||||
Bitmap.createScaledBitmap(
|
||||
imageBitmap,
|
||||
(int) (imageBitmap.getWidth() / scaleFactor),
|
||||
(int) (imageBitmap.getHeight() / scaleFactor),
|
||||
true);
|
||||
|
||||
return resizedBitmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the rotation angle of the photo.
|
||||
*
|
||||
* @param path photo path.
|
||||
* @return angle.
|
||||
*/
|
||||
public static int getRotationAngle(String path) {
|
||||
int rotation = 0;
|
||||
try {
|
||||
ExifInterface exifInterface = new ExifInterface(path);
|
||||
int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
|
||||
switch (orientation) {
|
||||
case ExifInterface.ORIENTATION_ROTATE_90:
|
||||
rotation = 90;
|
||||
break;
|
||||
case ExifInterface.ORIENTATION_ROTATE_180:
|
||||
rotation = 180;
|
||||
break;
|
||||
case ExifInterface.ORIENTATION_ROTATE_270:
|
||||
rotation = 270;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Failed to get rotation: " + e.getMessage());
|
||||
}
|
||||
return rotation;
|
||||
}
|
||||
|
||||
public static Bitmap rotateBitmap(Bitmap bitmap, int angle) {
|
||||
Matrix matrix = new Matrix();
|
||||
matrix.postRotate(angle);
|
||||
Bitmap result = null;
|
||||
try {
|
||||
result = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
|
||||
} catch (OutOfMemoryError e) {
|
||||
Log.e(TAG, "Failed to rotate bitmap: " + e.getMessage());
|
||||
}
|
||||
if (result == null) {
|
||||
return bitmap;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.mindspore.imagesegmentation;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
public interface OnBackgroundImageListener {
|
||||
void onBackImageSelected(int position);
|
||||
|
||||
void onImageAdd(View view);
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.mindspore.imagesegmentation;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
public class StyleRecyclerViewAdapter extends RecyclerView.Adapter<StyleRecyclerViewAdapter.StyleItemViewHolder> {
|
||||
|
||||
private final int[] IMAGES;
|
||||
private final Context context;
|
||||
private final OnBackgroundImageListener mListener;
|
||||
|
||||
public StyleRecyclerViewAdapter(Context context, int[] IMAGES, OnBackgroundImageListener mListener) {
|
||||
this.IMAGES = IMAGES;
|
||||
this.context = context;
|
||||
this.mListener = mListener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public StyleItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(context)
|
||||
.inflate(R.layout.image_item, parent, false);
|
||||
return new StyleItemViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull StyleItemViewHolder holder, int position) {
|
||||
Glide.with(context).
|
||||
load(IMAGES[position]).
|
||||
into(holder.getImageView());
|
||||
|
||||
View view = holder.getMView();
|
||||
view.setTag(IMAGES[position]);
|
||||
view.setOnClickListener(view1 -> {
|
||||
if (mListener != null) {
|
||||
if (IMAGES.length - 1 == position) {
|
||||
mListener.onImageAdd(holder.getImageView());
|
||||
} else {
|
||||
mListener.onBackImageSelected(position);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return IMAGES == null ? 0 : IMAGES.length;
|
||||
}
|
||||
|
||||
|
||||
public class StyleItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView imageView;
|
||||
private final View mView;
|
||||
|
||||
public final ImageView getImageView() {
|
||||
return this.imageView;
|
||||
}
|
||||
|
||||
public final void setImageView(ImageView imageView) {
|
||||
this.imageView = imageView;
|
||||
}
|
||||
|
||||
public final View getMView() {
|
||||
return this.mView;
|
||||
}
|
||||
|
||||
public StyleItemViewHolder(View mView) {
|
||||
super(mView);
|
||||
this.mView = mView;
|
||||
this.imageView = mView.findViewById(R.id.image_view);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.mindspore.imagesegmentation.help;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ModelTrackingResult {
|
||||
private Bitmap bitmapResult;
|
||||
private Bitmap bitmapOriginal;
|
||||
private Bitmap bitmapMaskOnly;
|
||||
private String executionLog;
|
||||
private Set<Integer> itemsFound;
|
||||
|
||||
public ModelTrackingResult(Bitmap bitmapResult, Bitmap bitmapOriginal, Bitmap bitmapMaskOnly, String executionLog, Set<Integer> itemsFound) {
|
||||
this.bitmapResult = bitmapResult;
|
||||
this.bitmapOriginal = bitmapOriginal;
|
||||
this.bitmapMaskOnly = bitmapMaskOnly;
|
||||
this.executionLog = executionLog;
|
||||
this.itemsFound = itemsFound;
|
||||
}
|
||||
|
||||
public Bitmap getBitmapResult() {
|
||||
return bitmapResult;
|
||||
}
|
||||
|
||||
public ModelTrackingResult setBitmapResult(Bitmap bitmapResult) {
|
||||
this.bitmapResult = bitmapResult;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Bitmap getBitmapOriginal() {
|
||||
return bitmapOriginal;
|
||||
}
|
||||
|
||||
public ModelTrackingResult setBitmapOriginal(Bitmap bitmapOriginal) {
|
||||
this.bitmapOriginal = bitmapOriginal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Bitmap getBitmapMaskOnly() {
|
||||
return bitmapMaskOnly;
|
||||
}
|
||||
|
||||
public ModelTrackingResult setBitmapMaskOnly(Bitmap bitmapMaskOnly) {
|
||||
this.bitmapMaskOnly = bitmapMaskOnly;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExecutionLog() {
|
||||
return executionLog;
|
||||
}
|
||||
|
||||
public ModelTrackingResult setExecutionLog(String executionLog) {
|
||||
this.executionLog = executionLog;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Set<Integer> getItemsFound() {
|
||||
return itemsFound;
|
||||
}
|
||||
|
||||
public ModelTrackingResult setItemsFound(Set<Integer> itemsFound) {
|
||||
this.itemsFound = itemsFound;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 28 KiB |