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
082940ed
Commit
082940ed
authored
Oct 08, 2015
by
Josejulio Martínez Magaña
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement the EarFeature class, adding the basics from the SIFT detector.
parent
c7f6e7fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
1 deletion
+36
-1
EarFeature.java
...in/java/com/aluxoft/earrecognition/common/EarFeature.java
+36
-1
No files found.
app/src/main/java/com/aluxoft/earrecognition/common/EarFeature.java
View file @
082940ed
package
com
.
aluxoft
.
earrecognition
.
common
;
import
com.google.gson.Gson
;
import
org.opencv.core.Mat
;
import
java.util.ArrayList
;
/**
* Created by josejuliomartinez on 06/10/15.
* Store the features of the ear.
*/
abstract
public
class
EarFeature
implements
Comparable
{
public
class
EarFeature
{
private
Mat
features
;
public
Mat
getFeatures
()
{
return
features
;
}
public
void
setFeatures
(
Mat
features
)
{
this
.
features
=
features
;
}
public
EarFeature
(
Mat
features
)
{
this
.
setFeatures
(
features
);
}
public
String
serializeFeatures
()
{
Mat
mFeatures
=
this
.
getFeatures
();
ArrayList
<
ArrayList
<
Integer
>>
features
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
mFeatures
.
rows
();++
i
)
{
ArrayList
<
Integer
>
feature
=
new
ArrayList
<>();
for
(
int
j
=
0
;
j
<
mFeatures
.
cols
();++
j
)
{
feature
.
add
((
int
)
mFeatures
.
get
(
i
,
j
)[
0
]);
}
features
.
add
(
feature
);
}
Gson
gson
=
new
Gson
();
return
gson
.
toJson
(
features
);
}
}
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