Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-129
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-129
2021-129
Commits
db09141e
Commit
db09141e
authored
Jul 01, 2021
by
Pamosha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eye gaze identification configuration.
parent
336656e3
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
35884 additions
and
10 deletions
+35884
-10
app/build.gradle
app/build.gradle
+8
-4
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+8
-6
app/src/main/java/com/app/smartphotoeditor/activities/CameraView.java
.../java/com/app/smartphotoeditor/activities/CameraView.java
+729
-0
app/src/main/java/com/app/smartphotoeditor/activities/EnvironmentChecker.java
...m/app/smartphotoeditor/activities/EnvironmentChecker.java
+751
-0
app/src/main/java/com/app/smartphotoeditor/models/EyeDetectionResultSet.java
...om/app/smartphotoeditor/models/EyeDetectionResultSet.java
+35
-0
app/src/main/res/drawable/eye.jpeg
app/src/main/res/drawable/eye.jpeg
+0
-0
app/src/main/res/drawable/eye.jpg
app/src/main/res/drawable/eye.jpg
+0
-0
app/src/main/res/layout/activity_camera_view.xml
app/src/main/res/layout/activity_camera_view.xml
+65
-0
app/src/main/res/layout/activity_environment_checker.xml
app/src/main/res/layout/activity_environment_checker.xml
+105
-0
app/src/main/res/raw/haarcascade_frontalface_alt.xml
app/src/main/res/raw/haarcascade_frontalface_alt.xml
+24350
-0
app/src/main/res/raw/haarcascade_righteye_2splits.xml
app/src/main/res/raw/haarcascade_righteye_2splits.xml
+9833
-0
No files found.
app/build.gradle
View file @
db09141e
...
@@ -4,7 +4,7 @@ plugins {
...
@@ -4,7 +4,7 @@ plugins {
android
{
android
{
compileSdkVersion
30
compileSdkVersion
30
buildToolsVersion
"30.0.
2
"
buildToolsVersion
"30.0.
3
"
defaultConfig
{
defaultConfig
{
applicationId
"com.app.smartphotoeditor"
applicationId
"com.app.smartphotoeditor"
...
@@ -15,6 +15,9 @@ android {
...
@@ -15,6 +15,9 @@ android {
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
}
}
lintOptions
{
checkReleaseBuilds
false
}
buildTypes
{
buildTypes
{
release
{
release
{
...
@@ -40,17 +43,18 @@ dependencies {
...
@@ -40,17 +43,18 @@ dependencies {
implementation
'com.github.bumptech.glide:glide:4.11.0'
implementation
'com.github.bumptech.glide:glide:4.11.0'
implementation
'org.tensorflow:tensorflow-lite-metadata:0.1.0-rc1'
implementation
'org.tensorflow:tensorflow-lite-metadata:0.1.0-rc1'
implementation
'org.tensorflow:tensorflow-lite-gpu:2.2.0'
implementation
'org.tensorflow:tensorflow-lite-gpu:2.2.0'
implementation
project
(
path:
':openCVLibrary343'
)
annotationProcessor
'com.github.bumptech.glide:compiler:4.11.0'
annotationProcessor
'com.github.bumptech.glide:compiler:4.11.0'
implementation
'de.hdodenhof:circleimageview:3.1.0'
implementation
'de.hdodenhof:circleimageview:3.1.0'
implementation
'com.github.zjywill:roundedcornerimageview:1.1.0'
implementation
'com.github.zjywill:roundedcornerimageview:1.1.0'
implementation
'com.google.android.material:material:1.
3.0-alpha03
'
implementation
'com.google.android.material:material:1.
4.0-beta01
'
implementation
'com.wang.avi:library:2.1.3'
implementation
'com.wang.avi:library:2.1.3'
//Tensorflow dependencies
//Tensorflow dependencies
implementation
'org.tensorflow:tensorflow-lite-task-vision:0.1.0'
implementation
'org.tensorflow:tensorflow-lite-task-vision:0.1.0'
implementation
'org.tensorflow:tensorflow-lite-task-text:0.1.0'
implementation
'org.tensorflow:tensorflow-lite-task-text:0.1.0'
implementation
'org.tensorflow:tensorflow-lite-support:0.1.0'
implementation
'org.tensorflow:tensorflow-lite-support:0.1.0'
implementation
'org.tensorflow:tensorflow-lite:
0.0.0-nightly-SNAPSHOT
'
implementation
'org.tensorflow:tensorflow-lite:
2.4.0
'
//cameraX
//cameraX
def
cameraxVersion
=
"1.0.0-alpha02"
def
cameraxVersion
=
"1.0.0-alpha02"
...
@@ -61,4 +65,4 @@ dependencies {
...
@@ -61,4 +65,4 @@ dependencies {
testImplementation
'junit:junit:4.+'
testImplementation
'junit:junit:4.+'
androidTestImplementation
'androidx.test.ext:junit:1.1.2'
androidTestImplementation
'androidx.test.ext:junit:1.1.2'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.3.0'
}
}
\ No newline at end of file
app/src/main/AndroidManifest.xml
View file @
db09141e
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/Theme.SmartPhotoEditor"
>
android:theme=
"@style/Theme.SmartPhotoEditor"
>
<service
<activity
android:name=
".activities.CameraView"
>
android:name=
".services.GestureDetection"
android:enabled=
"true"
android:exported=
"true"
></service>
<activity
android:name=
".activities.EyeBlink"
>
</activity>
<activity
android:name=
".activities.EyeBlink"
/>
<activity
android:name=
".activities.EnvironmentChecker"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
@@ -28,7 +28,9 @@
...
@@ -28,7 +28,9 @@
</activity>
</activity>
<activity
<activity
android:name=
".activities.SplashScreen"
android:name=
".activities.SplashScreen"
android:screenOrientation=
"portrait"
></activity>
android:screenOrientation=
"portrait"
>
</activity>
<activity
android:name=
".activities.EditorActivity"
/>
<activity
android:name=
".activities.EditorActivity"
/>
</application>
</application>
...
...
app/src/main/java/com/app/smartphotoeditor/activities/CameraView.java
0 → 100644
View file @
db09141e
This diff is collapsed.
Click to expand it.
app/src/main/java/com/app/smartphotoeditor/activities/EnvironmentChecker.java
0 → 100644
View file @
db09141e
This diff is collapsed.
Click to expand it.
app/src/main/java/com/app/smartphotoeditor/models/EyeDetectionResultSet.java
0 → 100644
View file @
db09141e
package
com.app.smartphotoeditor.models
;
public
class
EyeDetectionResultSet
{
private
int
blackPixels
;
private
float
brightnessLevel
;
private
int
contourSize
;
public
EyeDetectionResultSet
(){}
public
int
getBlackPixels
()
{
return
blackPixels
;
}
public
int
getContourSize
()
{
return
contourSize
;
}
public
void
setContourSize
(
int
contourSize
)
{
this
.
contourSize
=
contourSize
;
}
public
void
setBlackPixels
(
int
blackPixels
)
{
this
.
blackPixels
=
blackPixels
;
}
public
float
getBrightnessLevel
()
{
return
brightnessLevel
;
}
public
void
setBrightnessLevel
(
float
brightnessLevel
)
{
this
.
brightnessLevel
=
brightnessLevel
;
}
}
app/src/main/res/drawable/eye.jpeg
0 → 100644
View file @
db09141e
287 KB
app/src/main/res/drawable/eye.jpg
deleted
100644 → 0
View file @
336656e3
55.2 KB
app/src/main/res/layout/activity_camera_view.xml
0 → 100644
View file @
db09141e
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
tools:context=
".activities.CameraView"
>
<org.opencv.android.JavaCameraView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:id=
"@+id/frame_Surface"
/>
<ImageView
android:id=
"@+id/frame"
android:layout_width=
"100dp"
android:layout_height=
"130dp"
android:layout_marginStart=
"32dp"
android:layout_marginTop=
"32dp"
android:scaleType=
"centerCrop"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/left"
android:layout_width=
"100dp"
android:layout_height=
"0dp"
android:scaleType=
"centerCrop"
app:layout_constraintBottom_toBottomOf=
"@+id/frame"
app:layout_constraintHorizontal_chainStyle=
"packed"
app:layout_constraintStart_toEndOf=
"@+id/frame"
app:layout_constraintTop_toTopOf=
"@+id/frame"
/>
<ImageView
android:id=
"@+id/center"
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_marginEnd=
"32dp"
android:scaleType=
"centerCrop"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@+id/right"
/>
<ImageView
android:id=
"@+id/right"
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:layout_marginEnd=
"32dp"
android:scaleType=
"centerCrop"
app:layout_constraintBottom_toBottomOf=
"@+id/center"
app:layout_constraintEnd_toEndOf=
"parent"
/>
<TextView
android:id=
"@+id/view_point"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"View Point"
android:textColor=
"@android:color/black"
android:textSize=
"20sp"
app:layout_constraintBottom_toTopOf=
"@+id/center"
app:layout_constraintTop_toBottomOf=
"@+id/frame"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_environment_checker.xml
0 → 100644
View file @
db09141e
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
tools:context=
".activities.CameraView"
>
<org.opencv.android.JavaCameraView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:id=
"@+id/frame_Surface"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:alpha=
"0.4"
android:background=
"@color/black"
tools:layout_editor_absoluteX=
"0dp"
tools:layout_editor_absoluteY=
"0dp"
/>
<TextView
android:id=
"@+id/textView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"32dp"
android:layout_marginTop=
"32dp"
android:layout_marginEnd=
"32dp"
android:fontFamily=
"@font/app_english_font"
android:gravity=
"start"
android:letterSpacing=
"0.1"
android:lineSpacingMultiplier=
"1.2"
android:text=
"Please wait\nwhile we asses\nyour environment"
android:textAllCaps=
"true"
android:textColor=
"@color/white"
android:textSize=
"14sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<de.hdodenhof.circleimageview.CircleImageView
android:id=
"@+id/frame"
android:layout_width=
"130dp"
android:layout_height=
"130dp"
android:layout_marginTop=
"32dp"
android:scaleType=
"centerCrop"
app:civ_border_color=
"@color/white"
app:civ_border_width=
"2dp"
android:src=
"@drawable/eye"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/textView"
/>
<TextView
android:id=
"@+id/textView1"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"32dp"
android:layout_marginTop=
"12dp"
android:layout_marginEnd=
"32dp"
android:fontFamily=
"@font/history"
android:gravity=
"center"
android:letterSpacing=
"0.1"
android:lineSpacingMultiplier=
"1.2"
android:text=
"Place your eye"
android:textAllCaps=
"true"
android:textColor=
"@color/white"
android:textSize=
"16sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/frame"
/>
<ProgressBar
android:id=
"@+id/progress_bar"
style=
"?android:attr/progressBarStyleHorizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"60dp"
android:layout_marginTop=
"50dp"
android:layout_marginEnd=
"60dp"
android:progress=
"0"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/textView1"
/>
<TextView
android:id=
"@+id/view_point"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:text=
"View Point"
android:textColor=
"@android:color/white"
android:textSize=
"20sp"
app:layout_constraintBottom_toBottomOf=
"@+id/frame_Surface"
app:layout_constraintTop_toBottomOf=
"@+id/frame"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/raw/haarcascade_frontalface_alt.xml
0 → 100644
View file @
db09141e
This diff is collapsed.
Click to expand it.
app/src/main/res/raw/haarcascade_righteye_2splits.xml
0 → 100644
View file @
db09141e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment