diff --git a/Lookify/.idea/.name b/Lookify/.idea/.name new file mode 100644 index 0000000..8e9d508 --- /dev/null +++ b/Lookify/.idea/.name @@ -0,0 +1 @@ +Lookify_robocze \ No newline at end of file diff --git a/Lookify/app/build.gradle b/Lookify/app/build.gradle index 98d1de3..7868e3c 100644 --- a/Lookify/app/build.gradle +++ b/Lookify/app/build.gradle @@ -4,7 +4,7 @@ android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { - applicationId "com.example.test" + applicationId "com.example.lookify_robocze" minSdkVersion 15 targetSdkVersion 29 versionCode 1 @@ -27,4 +27,5 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation project(path: ':openCVLibrary348') + } diff --git a/Lookify/app/src/androidTest/java/com/example/lookify_robocze/ExampleInstrumentedTest.java b/Lookify/app/src/androidTest/java/com/example/lookify_robocze/ExampleInstrumentedTest.java new file mode 100644 index 0000000..70d667f --- /dev/null +++ b/Lookify/app/src/androidTest/java/com/example/lookify_robocze/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package com.example.lookify_robocze; + +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 Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("com.example.lookify_robocze", appContext.getPackageName()); + } +} diff --git a/Lookify/app/src/main/AndroidManifest.xml b/Lookify/app/src/main/AndroidManifest.xml index 73a34fb..b0263ca 100644 --- a/Lookify/app/src/main/AndroidManifest.xml +++ b/Lookify/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.example.lookify_robocze"> @@ -9,6 +9,12 @@ + + + + + + + \ No newline at end of file diff --git a/Lookify/app/src/main/res/values/strings.xml b/Lookify/app/src/main/res/values/strings.xml index 3ec1843..c2efff0 100644 --- a/Lookify/app/src/main/res/values/strings.xml +++ b/Lookify/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - TEST + Lookify_robocze diff --git a/Lookify/app/src/test/java/com/example/lookify_robocze/ExampleUnitTest.java b/Lookify/app/src/test/java/com/example/lookify_robocze/ExampleUnitTest.java new file mode 100644 index 0000000..0c8fcc1 --- /dev/null +++ b/Lookify/app/src/test/java/com/example/lookify_robocze/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.lookify_robocze; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/Lookify/gradle/wrapper/gradle-wrapper.properties b/Lookify/gradle/wrapper/gradle-wrapper.properties index 9965648..b300c31 100644 --- a/Lookify/gradle/wrapper/gradle-wrapper.properties +++ b/Lookify/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -#Sat Nov 30 00:11:39 CET 2019 +#Tue Dec 03 21:31:50 CET 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/Lookify/openCVLibrary348/build.gradle b/Lookify/openCVLibrary348/build.gradle index 0ca4988..f5347bc 100644 --- a/Lookify/openCVLibrary348/build.gradle +++ b/Lookify/openCVLibrary348/build.gradle @@ -5,7 +5,7 @@ android { buildToolsVersion "28.0.3" defaultConfig { - minSdkVersion 8 + minSdkVersion 14 targetSdkVersion 29 } diff --git a/Lookify/openCVLibrary348/build/.transforms/08e825bd2f3388f5843e5ed7465b84af.bin b/Lookify/openCVLibrary348/build/.transforms/08e825bd2f3388f5843e5ed7465b84af.bin new file mode 100644 index 0000000..849b2a6 --- /dev/null +++ b/Lookify/openCVLibrary348/build/.transforms/08e825bd2f3388f5843e5ed7465b84af.bin @@ -0,0 +1 @@ +o/full diff --git a/Lookify/openCVLibrary348/build/.transforms/08e825bd2f3388f5843e5ed7465b84af/full/classes.dex b/Lookify/openCVLibrary348/build/.transforms/08e825bd2f3388f5843e5ed7465b84af/full/classes.dex new file mode 100644 index 0000000..470495f Binary files /dev/null and b/Lookify/openCVLibrary348/build/.transforms/08e825bd2f3388f5843e5ed7465b84af/full/classes.dex differ diff --git a/Lookify/openCVLibrary348/build/.transforms/097e7bd02ee0e8d9217d524e8a59bb20.bin b/Lookify/openCVLibrary348/build/.transforms/097e7bd02ee0e8d9217d524e8a59bb20.bin new file mode 100644 index 0000000..849b2a6 --- /dev/null +++ b/Lookify/openCVLibrary348/build/.transforms/097e7bd02ee0e8d9217d524e8a59bb20.bin @@ -0,0 +1 @@ +o/full diff --git a/Lookify/openCVLibrary348/build/.transforms/097e7bd02ee0e8d9217d524e8a59bb20/full/classes.dex b/Lookify/openCVLibrary348/build/.transforms/097e7bd02ee0e8d9217d524e8a59bb20/full/classes.dex new file mode 100644 index 0000000..f87b78d Binary files /dev/null and b/Lookify/openCVLibrary348/build/.transforms/097e7bd02ee0e8d9217d524e8a59bb20/full/classes.dex differ diff --git a/Lookify/openCVLibrary348/build/.transforms/305de2ae340e1625118a26b2af712a6f.bin b/Lookify/openCVLibrary348/build/.transforms/305de2ae340e1625118a26b2af712a6f.bin new file mode 100644 index 0000000..1ed65e0 --- /dev/null +++ b/Lookify/openCVLibrary348/build/.transforms/305de2ae340e1625118a26b2af712a6f.bin @@ -0,0 +1 @@ +i/ diff --git a/Lookify/openCVLibrary348/build/.transforms/5562ae5351d012ac6f9ed3b9b0ce07ec.bin b/Lookify/openCVLibrary348/build/.transforms/5562ae5351d012ac6f9ed3b9b0ce07ec.bin new file mode 100644 index 0000000..1ed65e0 --- /dev/null +++ b/Lookify/openCVLibrary348/build/.transforms/5562ae5351d012ac6f9ed3b9b0ce07ec.bin @@ -0,0 +1 @@ +i/ diff --git a/Lookify/openCVLibrary348/build/.transforms/a0e12bc9b57188cd8afb0aac2f56023f.bin b/Lookify/openCVLibrary348/build/.transforms/a0e12bc9b57188cd8afb0aac2f56023f.bin new file mode 100644 index 0000000..1ed65e0 --- /dev/null +++ b/Lookify/openCVLibrary348/build/.transforms/a0e12bc9b57188cd8afb0aac2f56023f.bin @@ -0,0 +1 @@ +i/ diff --git a/Lookify/openCVLibrary348/build/.transforms/c5065f2ea1a324533d2ae2009999b747.bin b/Lookify/openCVLibrary348/build/.transforms/c5065f2ea1a324533d2ae2009999b747.bin new file mode 100644 index 0000000..849b2a6 --- /dev/null +++ b/Lookify/openCVLibrary348/build/.transforms/c5065f2ea1a324533d2ae2009999b747.bin @@ -0,0 +1 @@ +o/full diff --git a/Lookify/openCVLibrary348/build/.transforms/c5065f2ea1a324533d2ae2009999b747/full/classes.dex b/Lookify/openCVLibrary348/build/.transforms/c5065f2ea1a324533d2ae2009999b747/full/classes.dex new file mode 100644 index 0000000..f87b78d Binary files /dev/null and b/Lookify/openCVLibrary348/build/.transforms/c5065f2ea1a324533d2ae2009999b747/full/classes.dex differ diff --git a/Lookify/openCVLibrary348/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml b/Lookify/openCVLibrary348/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml index 1d6fd7c..8f3b6d2 100644 --- a/Lookify/openCVLibrary348/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +++ b/Lookify/openCVLibrary348/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml @@ -5,7 +5,7 @@ android:versionName="3.4.8" > \ No newline at end of file diff --git a/Lookify/openCVLibrary348/build/intermediates/compile_library_classes/debug/classes.jar b/Lookify/openCVLibrary348/build/intermediates/compile_library_classes/debug/classes.jar index cce7ad7..d7924a7 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/compile_library_classes/debug/classes.jar and b/Lookify/openCVLibrary348/build/intermediates/compile_library_classes/debug/classes.jar differ diff --git a/Lookify/openCVLibrary348/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar b/Lookify/openCVLibrary348/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar index fcab522..b724a64 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar and b/Lookify/openCVLibrary348/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/R.jar differ diff --git a/Lookify/openCVLibrary348/build/intermediates/full_jar/debug/createFullJarDebug/full.jar b/Lookify/openCVLibrary348/build/intermediates/full_jar/debug/createFullJarDebug/full.jar index cce7ad7..d7924a7 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/full_jar/debug/createFullJarDebug/full.jar and b/Lookify/openCVLibrary348/build/intermediates/full_jar/debug/createFullJarDebug/full.jar differ diff --git a/Lookify/openCVLibrary348/build/intermediates/incremental/debug-mergeNativeLibs/merge-state b/Lookify/openCVLibrary348/build/intermediates/incremental/debug-mergeNativeLibs/merge-state index 9b04f49..fcfb83e 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/incremental/debug-mergeNativeLibs/merge-state and b/Lookify/openCVLibrary348/build/intermediates/incremental/debug-mergeNativeLibs/merge-state differ diff --git a/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml b/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml index 7fde261..4369567 100644 --- a/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +++ b/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugShaders/merger.xml b/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugShaders/merger.xml index 01dbf31..7732186 100644 --- a/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugShaders/merger.xml +++ b/Lookify/openCVLibrary348/build/intermediates/incremental/mergeDebugShaders/merger.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugAssets/merger.xml b/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugAssets/merger.xml index 0253fba..6b252d2 100644 --- a/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugAssets/merger.xml +++ b/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugAssets/merger.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/compile-file-map.properties b/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/compile-file-map.properties index c5da989..943efa7 100644 --- a/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +++ b/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/compile-file-map.properties @@ -1 +1 @@ -#Sat Nov 30 00:33:23 CET 2019 +#Wed Dec 04 17:04:23 CET 2019 diff --git a/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/merger.xml b/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/merger.xml index 2d7fc93..8227ec4 100644 --- a/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/merger.xml +++ b/Lookify/openCVLibrary348/build/intermediates/incremental/packageDebugResources/merger.xml @@ -1,12 +1,12 @@ - + - + diff --git a/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$1.class b/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$1.class index 6c86350..19e6cd5 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$1.class and b/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$1.class differ diff --git a/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$CvCameraViewListenerAdapter.class b/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$CvCameraViewListenerAdapter.class index d45f754..55b796a 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$CvCameraViewListenerAdapter.class and b/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase$CvCameraViewListenerAdapter.class differ diff --git a/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase.class b/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase.class index 0bc7f8b..9348b5b 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase.class and b/Lookify/openCVLibrary348/build/intermediates/javac/debug/classes/org/opencv/android/CameraBridgeViewBase.class differ diff --git a/Lookify/openCVLibrary348/build/intermediates/library_manifest/debug/AndroidManifest.xml b/Lookify/openCVLibrary348/build/intermediates/library_manifest/debug/AndroidManifest.xml index 1d6fd7c..8f3b6d2 100644 --- a/Lookify/openCVLibrary348/build/intermediates/library_manifest/debug/AndroidManifest.xml +++ b/Lookify/openCVLibrary348/build/intermediates/library_manifest/debug/AndroidManifest.xml @@ -5,7 +5,7 @@ android:versionName="3.4.8" > \ No newline at end of file diff --git a/Lookify/openCVLibrary348/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt b/Lookify/openCVLibrary348/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt index 10bcd91..b194c43 100644 --- a/Lookify/openCVLibrary348/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +++ b/Lookify/openCVLibrary348/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt @@ -5,10 +5,10 @@ 5 android:versionName="3.4.8" > 6 7 C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 -8 android:minSdkVersion="8" -8-->C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 +7-->C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 +8 android:minSdkVersion="14" +8-->C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 9 android:targetSdkVersion="29" /> -9-->C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:15-44 +9-->C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:15-44 10 11 diff --git a/Lookify/openCVLibrary348/build/intermediates/runtime_library_classes/debug/classes.jar b/Lookify/openCVLibrary348/build/intermediates/runtime_library_classes/debug/classes.jar index cce7ad7..d7924a7 100644 Binary files a/Lookify/openCVLibrary348/build/intermediates/runtime_library_classes/debug/classes.jar and b/Lookify/openCVLibrary348/build/intermediates/runtime_library_classes/debug/classes.jar differ diff --git a/Lookify/openCVLibrary348/build/outputs/logs/manifest-merger-debug-report.txt b/Lookify/openCVLibrary348/build/outputs/logs/manifest-merger-debug-report.txt index a215091..3130a27 100644 --- a/Lookify/openCVLibrary348/build/outputs/logs/manifest-merger-debug-report.txt +++ b/Lookify/openCVLibrary348/build/outputs/logs/manifest-merger-debug-report.txt @@ -1,37 +1,37 @@ -- Merging decision tree log --- manifest -ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 +ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:1-8:12 package - ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:3:7-27 - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml + ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:3:7-27 + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml android:versionName - ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:5:7-34 - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml + ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:5:7-34 + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml xmlns:android - ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:2:11-69 + ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:2:11-69 android:versionCode - ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:4:7-33 - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml + ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:4:7-33 + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml uses-sdk -ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 -INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 +ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 +INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 android:targetSdkVersion - ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:15-44 - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml + ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:15-44 + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml android:minSdkVersion - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml - ADDED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 - INJECTED from C:\HDD\Moi\Studia\Informatyka\TEST\openCVLibrary348\src\main\AndroidManifest.xml + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml + ADDED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml:7:5-47 + INJECTED from C:\HDD\Moi\Studia\Informatyka\Lookify_robocze_kopia\openCVLibrary348\src\main\AndroidManifest.xml diff --git a/Lookify/openCVLibrary348/src/main/java/org/opencv/android/CameraBridgeViewBase.java b/Lookify/openCVLibrary348/src/main/java/org/opencv/android/CameraBridgeViewBase.java index 681b7ab..8b27872 100644 --- a/Lookify/openCVLibrary348/src/main/java/org/opencv/android/CameraBridgeViewBase.java +++ b/Lookify/openCVLibrary348/src/main/java/org/opencv/android/CameraBridgeViewBase.java @@ -2,7 +2,6 @@ package org.opencv.android; import java.util.List; -import org.opencv.BuildConfig; import org.opencv.R; import org.opencv.core.Mat; import org.opencv.core.Size; @@ -11,15 +10,18 @@ import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; +import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; +import android.graphics.Matrix; import android.graphics.Rect; import android.util.AttributeSet; import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; + /** * This is a basic class, implementing the interaction with Camera and OpenCV library. * The main responsibility of it - is to control when camera can be enabled, process the frame, @@ -379,12 +381,47 @@ public abstract class CameraBridgeViewBase extends SurfaceView implements Surfac } } + // Metody updateMatrix i deliverAndDrawFrame zaczerpnięte z https://heartbeat.fritz.ai/working-with-the-opencv-camera-for-android-rotating-orienting-and-scaling-c7006c3e1916 + private final Matrix mMatrix = new Matrix(); + + private void updateMatrix() { + float mw = this.getWidth(); + float mh = this.getHeight(); + float hw = this.getWidth() / 2.0f; + float hh = this.getHeight() / 2.0f; + float cw = (float)Resources.getSystem().getDisplayMetrics().widthPixels; + float ch = (float)Resources.getSystem().getDisplayMetrics().heightPixels; + float scale = cw / mh; + float scale2 = ch / mw; + if(scale2 > scale){ + scale = scale2; + } + mMatrix.reset(); + mMatrix.preTranslate(hw, hh); + mMatrix.preRotate(90); + mMatrix.preTranslate(-hw, -hh); + mMatrix.preScale(scale,scale,hw,hh); + } + + @Override + public void layout(int l, int t, int r, int b) { + super.layout(l, t, r, b); + updateMatrix(); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + updateMatrix(); + } + /** * This method shall be called by the subclasses when they have valid * object and want it to be delivered to external client (via callback) and * then displayed on the screen. * @param frame - the current frame to be delivered */ + protected void deliverAndDrawFrame(CvCameraViewFrame frame) { Mat modified; @@ -410,23 +447,26 @@ public abstract class CameraBridgeViewBase extends SurfaceView implements Surfac Canvas canvas = getHolder().lockCanvas(); if (canvas != null) { canvas.drawColor(0, android.graphics.PorterDuff.Mode.CLEAR); - if (BuildConfig.DEBUG) - Log.d(TAG, "mStretch value: " + mScale); + int saveCount = canvas.save(); + canvas.setMatrix(mMatrix); if (mScale != 0) { canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()), - new Rect((int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2), - (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2), - (int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2 + mScale*mCacheBitmap.getWidth()), - (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2 + mScale*mCacheBitmap.getHeight())), null); + new Rect((int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2), + (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2), + (int)((canvas.getWidth() - mScale*mCacheBitmap.getWidth()) / 2 + mScale*mCacheBitmap.getWidth()), + (int)((canvas.getHeight() - mScale*mCacheBitmap.getHeight()) / 2 + mScale*mCacheBitmap.getHeight())), null); } else { - canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()), - new Rect((canvas.getWidth() - mCacheBitmap.getWidth()) / 2, - (canvas.getHeight() - mCacheBitmap.getHeight()) / 2, - (canvas.getWidth() - mCacheBitmap.getWidth()) / 2 + mCacheBitmap.getWidth(), - (canvas.getHeight() - mCacheBitmap.getHeight()) / 2 + mCacheBitmap.getHeight()), null); + canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()), + new Rect((canvas.getWidth() - mCacheBitmap.getWidth()) / 2, + (canvas.getHeight() - mCacheBitmap.getHeight()) / 2, + (canvas.getWidth() - mCacheBitmap.getWidth()) / 2 + mCacheBitmap.getWidth(), + (canvas.getHeight() - mCacheBitmap.getHeight()) / 2 + mCacheBitmap.getHeight()), null); } + //Restore canvas after draw bitmap + canvas.restoreToCount(saveCount); + if (mFpsMeter != null) { mFpsMeter.measure(); mFpsMeter.draw(canvas, 20, 30); diff --git a/Lookify/settings.gradle b/Lookify/settings.gradle index 656f700..6557fe9 100644 --- a/Lookify/settings.gradle +++ b/Lookify/settings.gradle @@ -1,3 +1,3 @@ include ':app' -rootProject.name='TEST' +rootProject.name='Lookify_robocze' include ':openCVLibrary348'