Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Ear recognition
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Boston University
Ear recognition
Commits
180e5455
Commit
180e5455
authored
Oct 08, 2015
by
Josejulio Martínez Magaña
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the serialization from the EarIdentifier.
parent
e077deba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
EarIdentifier.java
...c/main/java/com/aluxoft/earrecognition/EarIdentifier.java
+5
-14
No files found.
app/src/main/java/com/aluxoft/earrecognition/EarIdentifier.java
View file @
180e5455
...
...
@@ -2,7 +2,7 @@ package com.aluxoft.earrecognition;
import
com.aluxoft.earrecognition.common.EarDatabase
;
import
com.aluxoft.earrecognition.common.EarFeature
;
import
com.aluxoft.earrecognition.common.EarId
entifierResul
t
;
import
com.aluxoft.earrecognition.common.EarId
Lis
t
;
import
com.aluxoft.earrecognition.utils.OpenCvUtils
;
import
com.google.gson.Gson
;
...
...
@@ -34,12 +34,12 @@ public class EarIdentifier {
* @param feature The result of the identification.
* @return
*/
public
EarId
entifierResul
t
identify
(
EarFeature
feature
)
{
public
EarId
Lis
t
identify
(
EarFeature
feature
)
{
return
null
;
}
public
String
computeFeatures
(
String
imagePath
)
{
public
EarFeature
computeFeatures
(
String
imagePath
)
{
Mat
image
,
descriptors
;
MatOfKeyPoint
keypoints
;
...
...
@@ -55,19 +55,10 @@ public class EarIdentifier {
detector
.
detect
(
image
,
keypoints
);
DescriptorExtractor
extractor
=
DescriptorExtractor
.
create
(
DescriptorExtractor
.
SIFT
);
extractor
.
compute
(
image
,
keypoints
,
descriptors
);
ArrayList
<
ArrayList
<
Integer
>>
features
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
descriptors
.
rows
();++
i
)
{
ArrayList
<
Integer
>
feature
=
new
ArrayList
<>();
for
(
int
j
=
0
;
j
<
descriptors
.
cols
();++
j
)
{
feature
.
add
((
int
)
descriptors
.
get
(
i
,
j
)[
0
]);
}
features
.
add
(
feature
);
}
Gson
gson
=
new
Gson
();
return
gson
.
toJson
(
features
);
return
new
EarFeature
(
descriptors
);
}
static
{
System
.
loadLibrary
(
"opencv_java"
);
System
.
loadLibrary
(
"nonfree"
);
...
...
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