Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AP-KINADINOVA-Dariya
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dariya Kinadinova
AP-KINADINOVA-Dariya
Commits
0df31b29
Commit
0df31b29
authored
1 year ago
by
Dariya Kinadinova
Browse files
Options
Downloads
Patches
Plain Diff
change of name
parent
6f9862a5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projet/codes/color_manipulation.py
+10
-10
10 additions, 10 deletions
projet/codes/color_manipulation.py
with
10 additions
and
10 deletions
projet/codes/color_manipulation.py
+
10
−
10
View file @
0df31b29
...
...
@@ -46,17 +46,17 @@ def avg_col(l:list) -> tuple():
(236, 210, 111)
"""
c1
=
0
c2
=
0
c3
=
0
r
=
0
g
=
0
b
=
0
for
col
in
l
:
c1
+=
col
[
0
]
c2
+=
col
[
1
]
c3
+=
col
[
2
]
avg
1
=
c1
//
len
(
l
)
avg
2
=
c2
//
len
(
l
)
avg
3
=
c3
//
len
(
l
)
return
(
avg
1
,
avg
2
,
avg
3
)
r
+=
col
[
0
]
g
+=
col
[
1
]
b
+=
col
[
2
]
avg
_r
=
r
//
len
(
l
)
avg
_g
=
g
//
len
(
l
)
avg
_b
=
b
//
len
(
l
)
return
(
avg
_r
,
avg
_g
,
avg
_b
)
def
list_col
(
im
:
Image
,
left_top
:
tuple
(),
right_bottom
:
tuple
())
->
list
[
int
]:
"""
Renvoie une liste de tuples de couleurs pour chaque pixel de la région spécifiée de l
'
image.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment