Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.ip.qualitymeasure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
bob
bob.ip.qualitymeasure
Commits
08e94543
There was a problem fetching the pipeline summary.
Commit
08e94543
authored
7 years ago
by
David GEISSBUHLER
Browse files
Options
Downloads
Plain Diff
Merge branch 'optimizations_fast_spec' into optimizations
parents
ae87d133
30b0e319
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!6
Optimizations
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/ip/qualitymeasure/msu_iqa_features.py
+15
-3
15 additions, 3 deletions
bob/ip/qualitymeasure/msu_iqa_features.py
with
15 additions
and
3 deletions
bob/ip/qualitymeasure/msu_iqa_features.py
+
15
−
3
View file @
08e94543
...
@@ -9,7 +9,9 @@ import scipy.signal as ssg
...
@@ -9,7 +9,9 @@ import scipy.signal as ssg
import
bob.ip.base
import
bob.ip.base
import
bob.ip.color
import
bob.ip.color
from
.
import
galbally_iqm_features
as
iqm
from
.
import
galbally_iqm_features
as
iqm
from
.
import
tan_specular_highlights
as
tsh
#from . import tan_specular_highlights as tsh
from
._library
import
remove_highlights
'''
Utility functions
'''
'''
Utility functions
'''
...
@@ -155,8 +157,18 @@ def compute_iqa_specularity_features(rgbImage, startEps=0.05):
...
@@ -155,8 +157,18 @@ def compute_iqa_specularity_features(rgbImage, startEps=0.05):
"""
"""
# separate the specular and diffuse components of input color image.
# separate the specular and diffuse components of input color image.
speckleFreeImg
,
diffuseImg
,
speckleImg
=
tsh
.
remove_highlights
(
# original python version
rgbImage
.
astype
(
float
),
startEps
,
verboseFlag
=
False
)
#speckleFreeImg, diffuseImg, speckleImg = tsh.remove_highlights(
# rgbImage.astype(float), startEps, verboseFlag=False)
speckleFreeImg
,
diffuseImg
,
speckleImg
=
remove_highlights
(
rgbImage
.
astype
(
np
.
float32
),
startEps
)
#speckleImg[np.where(np.isinf(speckleImg))] = 0
#speckleImg[np.where(np.isnan(speckleImg))] = 0
#speckleImg[np.where(speckleImg < 0)] = 0
#speckleImg[np.where(speckleImg > 255)] = 255
# speckleImg contains the specular-component
# speckleImg contains the specular-component
if
len
(
speckleImg
.
shape
)
==
3
:
if
len
(
speckleImg
.
shape
)
==
3
:
...
...
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