Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uva
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Taddeüs Kroes
uva
Commits
2bb870d9
Commit
2bb870d9
authored
13 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
ImProc ass1: Implemented part 1 of assignment.
parent
9db9fced
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
improc/ass1/lowcontrast.png
+0
-0
0 additions, 0 deletions
improc/ass1/lowcontrast.png
improc/ass1/lowcontrast.py
+20
-5
20 additions, 5 deletions
improc/ass1/lowcontrast.py
with
20 additions
and
5 deletions
improc/ass1/lowcontrast.png
+
0
−
0
View replaced file @
9db9fced
View file @
2bb870d9
202 KiB
|
W:
|
H:
245 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
improc/ass1/lowcontrast.py
+
20
−
5
View file @
2bb870d9
from
pylab
import
clf
,
histogram
,
np
,
imshow
from
pylab
import
clf
,
histogram
,
imshow
,
imread
,
bar
,
diff
,
xlim
,
show
,
\
figure
,
amin
,
amax
i
=
1
def
show_hist
(
a
):
global
i
figure
(
i
)
imshow
(
a
,
vmin
=
0
,
vmax
=
1
)
h
,
be
=
histogram
(
a
.
flatten
(),
bins
=
40
)
figure
(
i
+
1
)
bar
(
be
[:
-
1
],
h
,
width
=
diff
(
be
)[
0
])
xlim
((
0
,
1
))
i
+=
2
def
cst
(
f
):
fmin
=
amin
(
f
)
fmax
=
amax
(
f
)
return
(
f
-
fmin
)
/
(
fmax
-
fmin
)
a
=
np
.
load
(
'
lowcontrast.npy
'
)
clf
()
imshow
(
a
,
vmin
=
0
,
vmax
=
1
)
h
,
be
=
histogram
(
a
.
flatten
(),
bins
=
40
)
#a = imread('stinkbug.png')
a
=
imread
(
'
lowcontrast.png
'
)
show_hist
(
a
)
show_hist
(
cst
(
a
))
show
()
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