Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Grégoire PETIT
DataScience
Commits
37712bb9
Commit
37712bb9
authored
Dec 01, 2018
by
Grégoire PETIT
Browse files
populations bien définies
parent
d1463075
Changes
1
Hide whitespace changes
Inline
Side-by-side
Challenge3/code/challenge3.py
View file @
37712bb9
...
...
@@ -45,7 +45,7 @@ def getPopXY(pixel):#Permet d'avoir la population réelle pour un pixel
rgbValues
=
im_pop
.
getpixel
(
pixel
)
#c'est des niveaux de gris, donc r=g=b
if
rgbValues
[
0
]
>=
24
:
#la mer n'est pas totalement noire ((24,24,24) ou (16,16,16)), on filtre donc
res
=
(
rgbValues
[
0
]
-
24
)
*
pop_max
/
231
#231=255-24
else
:
else
:
res
=
0
return
(
res
)
...
...
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