Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
arcIntergration
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马乐
arcIntergration
Commits
07738afc
Commit
07738afc
authored
Oct 27, 2023
by
马乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修复人脸重新初始化失败
parent
00e0b732
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
MainActivity.kt
app/src/main/java/com/intergration/test/MainActivity.kt
+7
-1
fr.kt
app/src/main/java/com/intergration/test/fr/fr.kt
+3
-1
No files found.
app/src/main/java/com/intergration/test/MainActivity.kt
View file @
07738afc
...
...
@@ -309,13 +309,19 @@ class MainActivity : AppCompatActivity(),TextToSpeech.OnInitListener,VideoCallba
}
}
else
{
LogUtils
.
eTag
(
"fr"
,
"人脸算法初始化失败"
)
engine
?.
unInit
()
frCameraDevice
?.
stopPreview
()
frCameraDevice
?.
let
{
smartPlatformManager
.
closeCameraDevice
(
it
)}
}
}
catch
(
e
:
CancellationException
)
{
LogUtils
.
eTag
(
"fr"
,
"人脸识别error:${e.message}"
)
coroutineContext
[
FrCoroutineContext
]
?.
engine
?.
unInit
()
frCameraDevice
?.
stopPreview
()
frCameraDevice
?.
stopRecord
(
RecordSource
.
GENERAL_CAMERA
)
frCameraDevice
?.
let
{
smartPlatformManager
.
closeCameraDevice
(
it
)}
}
catch
(
e
:
Exception
)
{
coroutineContext
[
FrCoroutineContext
]
?.
engine
?.
unInit
()
frCameraDevice
?.
stopPreview
()
frCameraDevice
?.
let
{
smartPlatformManager
.
closeCameraDevice
(
it
)}
e
.
printStackTrace
()
}
}
...
...
app/src/main/java/com/intergration/test/fr/fr.kt
View file @
07738afc
...
...
@@ -51,6 +51,8 @@ class FrCoroutineContext(val engine: ArcVisDriveEngine): AbstractCoroutineContex
class
FrCoroutineScope
(
context
:
CoroutineContext
)
:
Closeable
,
CoroutineScope
{
override
val
coroutineContext
:
CoroutineContext
=
context
+
frJob
override
fun
close
()
{
LogUtils
.
eTag
(
"fr"
,
"FrCoroutineScope auto close"
)
LogUtils
.
file
(
"FrCoroutineScope auto close"
)
coroutineContext
[
FrCoroutineContext
]
?.
engine
?.
unInit
()
coroutineContext
.
cancel
()
}
...
...
@@ -111,7 +113,7 @@ fun ArcVisDriveEngine.compareFeatureWithScore(liveExtractResult:ArcFRExtractResu
frSimilarity
)
LogUtils
.
d
(
"frSimilarity:${frSimilarity.score},compareFeature result:${result}"
)
result
==
ArcErrorInfo
.
ARC_ERROR_OK
&&
frSimilarity
.
score
>
75
result
==
ArcErrorInfo
.
ARC_ERROR_OK
&&
frSimilarity
.
score
*
100
>=
75
}
}
...
...
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