Toggle navigation
Toggle navigation
This project
Loading...
Sign in
조수연
/
Find_your_own_personal_color
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
starbucksdolcelatte
2019-04-14 16:14:58 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f0e7cf564b231b5e6c51b5d5f3531be9f4356174
f0e7cf56
1 parent
e0b42ff0
Fixed error : list deepcopy
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
tone_analysis.py
tone_analysis.py
View file @
f0e7cf5
from
scipy.spatial
import
distance
import
copy
# RGB based standard
# list[0] = spring, [1] = summer, [2] = fall, [3] = winter
label
=
[
'spring'
,
'summer'
,
'fall'
,
'winter'
]
...
...
@@ -41,16 +41,18 @@ for i in range(4):
pupil_dist
[
j
][
i
]
=
distance
.
euclidean
(
pupil
[
i
],
pupil_lsg
[
j
])
# 거리가 짧은 순으로 정렬
# skin
sorted_skdist
=
skin_dist
.
copy
(
)
sorted_ppdist
=
pupil_dist
.
copy
(
)
sorted_skdist
=
copy
.
deepcopy
(
skin_dist
)
sorted_ppdist
=
copy
.
deepcopy
(
pupil_dist
)
for
i
in
range
(
2
):
sorted_skdist
[
i
]
.
sort
(
reverse
=
True
)
sorted_skdist
[
i
]
.
sort
()
# pupil
for
i
in
range
(
4
):
sorted_ppdist
[
i
]
.
sort
(
reverse
=
True
)
print
(
sorted_skdist
)
print
(
sorted_ppdist
)
sorted_ppdist
[
i
]
.
sort
()
print
(
skin_dist
[
0
])
print
(
sorted_skdist
[
0
])
print
(
pupil_dist
[
0
])
print
(
sorted_ppdist
[
0
])
# 거리가 짧은 계절 순으로 출력
# skin
...
...
Please
register
or
login
to post a comment