Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.ip.qualitymeasure
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.ip.qualitymeasure
Commits
2373c1db
Commit
2373c1db
authored
Mar 08, 2017
by
Sushil BHATTACHARJEE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code update; returns numpy array instead of tuple
parent
8559a22f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
README.rst
README.rst
+3
-2
bob/ip/qualitymeasure/galbally_iqm_features.py
bob/ip/qualitymeasure/galbally_iqm_features.py
+1
-1
bob/ip/qualitymeasure/script/compute_qualitymeasures.py
bob/ip/qualitymeasure/script/compute_qualitymeasures.py
+7
-7
No files found.
README.rst
View file @
2373c1db
...
...
@@ -21,8 +21,9 @@
This package is part of the signal-processing and machine learning toolbox
Bob_. It provides functions for extracting image-quality features proposed
for PAD experiments by different research group.
for PAD experiments by different research groups. Image quality measures
proposed by Galbally et al (TIFS 2014) and by Wen et al. (TIFS 2015)
are implemented in this package.
Installation
------------
...
...
bob/ip/qualitymeasure/galbally_iqm_features.py
View file @
2373c1db
...
...
@@ -188,7 +188,7 @@ def image_quality_measures(refImage, testImage):
#26 HLFI: high-low frequency index (implemented as done by Galbally in Matlab).
hlfi25
=
high_low_freq_index
(
fftRef
,
refImage
.
shape
[
1
])
return
(
mse00
,
psnr01
,
ad02
,
sc03
,
nk04
,
md05
,
lmse06
,
nae07
,
snrv08
,
ramdv09
,
mas10
,
mams11
,
sme12
,
gme16
,
gpe17
,
ssim18
,
vif19
,
hlfi25
)
return
np
.
asarray
((
mse00
,
psnr01
,
ad02
,
sc03
,
nk04
,
md05
,
lmse06
,
nae07
,
snrv08
,
ramdv09
,
mas10
,
mams11
,
sme12
,
gme16
,
gpe17
,
ssim18
,
vif19
,
hlfi25
),
dtype
=
np
.
float32
)
"""
...
...
bob/ip/qualitymeasure/script/compute_qualitymeasures.py
View file @
2373c1db
...
...
@@ -34,24 +34,24 @@ def computeVideoIQM(video4d):
print
(
rgbFrame
.
shape
)
iqmSet
=
iqm
.
compute_quality_features
(
rgbFrame
)
#iqmSet = iqm.compute_quality_features(grayFrame)
numIQM
=
len
(
iqmSet
)
print
(
numIQM
)
iqaSet
=
iqa
.
compute_msu_iqa_features
(
rgbFrame
)
numIQA
=
len
(
iqaSet
)
print
(
numIQA
)
print
(
iqaSet
.
shape
)
print
(
iqmSet
.
shape
)
#now initialize fset to store iqm features for all frames of input video.
bobfset
=
np
.
zeros
([
numframes
,
numIQM
])
bobQFeats
=
np
.
asarray
(
iqmSet
)
# compute_quality_features() returns a tuple
bobfset
[
f
]
=
bobQFeats
bobfset
[
f
]
=
iqmSet
msufset
=
np
.
zeros
([
numframes
,
numIQA
])
msuQFeats
=
np
.
asarray
(
iqaSet
)
msufset
[
f
]
=
msuQFeats
msufset
[
f
]
=
iqaSet
for
f
in
range
(
1
,
numframes
):
print
(
'frame #: %d'
%
f
)
rgbFrame
=
video4d
[
f
]
print
(
rgbFrame
.
shape
)
# grayFrame = matlab_rgb2gray(rgbFrame) #compute gray-level image for input color-frame
# bobQFeats = np.asarray(iqm.compute_quality_features(grayFrame)) # computeQualityFeatures() returns a tuple
bobQFeats
=
np
.
asarray
(
iqm
.
compute_quality_features
(
rgbFrame
))
# computeQualityFeatures() returns a tuple
bobQFeats
=
iqm
.
compute_quality_features
(
rgbFrame
)
msuQFeats
=
iqa
.
compute_msu_iqa_features
(
rgbFrame
)
bobfset
[
f
]
=
bobQFeats
msufset
[
f
]
=
msuQFeats
...
...
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