Commit ccd5a085 authored by André Anjos's avatar André Anjos 💬

Merge branch 'fixing-warnings' into 'master'

Fixed the wornings of the sphinx documentation

The warnings coming from sphinx documentation are now fixed. Please merge this branch into master. Thank you!

See merge request !11
parents 17ecc712 3bded613
Pipeline #4673 passed with stages
in 19 minutes and 2 seconds
......@@ -20,14 +20,15 @@ class MiuraMatch (Algorithm):
194--203, 2004
Parameters:
**Parameters:**
ch (int, Optional): Maximum search displacement in y-direction. Different
ch : :py:class:`int`
Optional : Maximum search displacement in y-direction. Different
defult values based on the different features.
cw (int, Optional): Maximum search displacement in x-direction. Different
cw : :py:class:`int`
Optional : Maximum search displacement in x-direction. Different
defult values based on the different features.
"""
def __init__(self,
......@@ -80,8 +81,13 @@ class MiuraMatch (Algorithm):
def score(self, model, probe):
"""Computes the score of the probe and the model
Return score - Value between 0 and 0.5, larger value is better match
"""
Computes the score of the probe and the model.
**Parameters:**
score : :py:class:`float`
Value between 0 and 0.5, larger value is better match
"""
#print model.shape
#print probe.shape
......
......@@ -13,16 +13,17 @@ from .. import utils
class MaximumCurvature (Extractor):
"""MiuraMax feature extractor
"""
MiuraMax feature extractor.
Based on N. Miura, A. Nagasaka, and T. Miyatake, Extraction of Finger-Vein
Pattern Using Maximum Curvature Points in Image Profiles. Proceedings on IAPR
conference on machine vision applications, 9 (2005), pp. 347--350
Parameters:
sigma (int, Optional): Sigma used for determining derivatives
**Parameters:**
sigma : :py:class:`int`
Optional: Sigma used for determining derivatives.
"""
......
......@@ -17,7 +17,8 @@ from .. import utils
class FingerCrop (Preprocessor):
"""Extracts the mask and pre-processes fingervein images
"""
Extracts the mask and pre-processes fingervein images.
Based on the implementation: E.C. Lee, H.C. Lee and K.R. Park. Finger vein
recognition using minutia-based alignment and local binary pattern-based
......@@ -32,37 +33,42 @@ class FingerCrop (Preprocessor):
4. (optionally) Post processed
Parameters:
**Parameters:**
mask_h (int, Optional): Height of contour mask in pixels, must be an even
mask_h : :py:class:`int`
Optional, Height of contour mask in pixels, must be an even
number
mask_w (int, Optional): Width of the contour mask in pixels
mask_w : :py:class:`int`
Optional, Width of the contour mask in pixels
padding_width (int, Optional): How much padding (in pixels) to add around
padding_width : :py:class:`int`
Optional, How much padding (in pixels) to add around
the borders of the input image. We normally always keep this value on its
default (5 pixels).
padding_constant (int, Optional): What is the value of the pixels added
padding_constant : :py:class:`int`
Optional, What is the value of the pixels added
to the padding. This number should be a value between 0 and 255. (From
Pedro Tome: for UTFVP (high-quality samples), use 0. For the VERA
Fingervein database (low-quality samples), use 51 (that corresponds to
0.2 in a float image with values between 0 and 1).
fingercontour (str, Optional): Select between three finger contour
fingercontour : :py:class:`str`
Optional, Select between three finger contour
implementations: ``"leemaskMod"``, ``"leemaskMatlab"`` or ``"konomask"``.
(From Pedro Tome: the option ``leemaskMatlab`` was just implemented for
testing purposes so we could compare with MAT files generated from Matlab
code of other authors. He only used it with the UTFVP database, using
``leemaskMod`` with that database yields slight worse results.)
postprocessing (str, Optional): Select between ``HE`` (histogram
postprocessing : :py:class:`str`
Optional, Select between ``HE`` (histogram
equalization, as with :py:func:`bob.ip.base.histogram_equalization`),
``HFE`` (high-frequency emphasis filter, with hard-coded parameters - see
implementation) or ``CircGabor`` (circular Gabor filter with band-width
1.12 octaves and standard deviation of 5 pixels (this is hard-coded)). By
default, no postprocessing is applied on the image.
"""
......@@ -91,7 +97,8 @@ class FingerCrop (Preprocessor):
def __konomask__(self, image, sigma):
"""Finger vein mask extractor
"""
Finger vein mask extractor.
Based on the work of M. Kono, H. Ueki and S. Umemura. Near-infrared finger
vein patterns for personal identification, Applied Optics, Vol. 41, Issue
......@@ -144,7 +151,8 @@ class FingerCrop (Preprocessor):
def __leemaskMod__(self, image):
"""A method to calculate the finger mask
"""
A method to calculate the finger mask.
Based on the work of Finger vein recognition using minutia-based alignment
and local binary pattern-based feature extraction, E.C. Lee, H.C. Lee and
......@@ -160,13 +168,13 @@ class FingerCrop (Preprocessor):
a horizontal filter is also applied on the vertical axis.
Parameters:
**Parameters:**
image (numpy.ndarray): raw image to use for finding the mask, as 2D array
of unsigned 8-bit integers
Returns:
**Returns:**
numpy.ndarray: A 2D boolean array with the same shape of the input image
representing the cropping mask. ``True`` values indicate where the
......@@ -234,7 +242,8 @@ class FingerCrop (Preprocessor):
def __leemaskMatlab__(self, image):
"""A method to calculate the finger mask
"""
A method to calculate the finger mask.
Based on the work of Finger vein recognition using minutia-based alignment
and local binary pattern-based feature extraction, E.C. Lee, H.C. Lee and
......@@ -255,13 +264,13 @@ class FingerCrop (Preprocessor):
and goes up to the point where the minima is detected on the lower part.
Parameters:
**Parameters:**
image (numpy.ndarray): raw image to use for finding the mask, as 2D array
of unsigned 8-bit integers
Returns:
**Returns:**
numpy.ndarray: A 2D boolean array with the same shape of the input image
representing the cropping mask. ``True`` values indicate where the
......@@ -308,7 +317,8 @@ class FingerCrop (Preprocessor):
def __huangnormalization__(self, image, mask, edges):
"""Simple finger normalization
"""
Simple finger normalization.
Based on B. Huang, Y. Dai, R. Li, D. Tang and W. Li, Finger-vein
authentication based on wide line detector and pattern normalization,
......@@ -325,7 +335,7 @@ class FingerCrop (Preprocessor):
through those points.
Parameters:
**Parameters:**
image (numpy.ndarray): raw image to normalize as 2D array of unsigned
8-bit integers
......@@ -337,15 +347,13 @@ class FingerCrop (Preprocessor):
the end of the mask.
Returns:
**Returns:**
numpy.ndarray: A 2D boolean array with the same shape and data type of
the input image representing the newly aligned image.
numpy.ndarray: A 2D boolean array with the same shape and data type of
the input mask representing the newly aligned mask.
"""
img_h, img_w = image.shape
......@@ -402,7 +410,8 @@ class FingerCrop (Preprocessor):
def __HE__(self, image, mask):
"""Applies histogram equalization on the input image inside the mask
"""
Applies histogram equalization on the input image inside the mask.
In this implementation, only the pixels that lie inside the mask will be
used to calculate the histogram equalization parameters. Because of this
......@@ -410,7 +419,7 @@ class FingerCrop (Preprocessor):
and have one based exclusively on NumPy.
Parameters:
**Parameters:**
image (numpy.ndarray): raw image to be filtered, as 2D array of
unsigned 8-bit integers
......@@ -420,10 +429,9 @@ class FingerCrop (Preprocessor):
the histogram equalization
Returns:
**Returns:**
numpy.ndarray: normalized image as a 2D array of unsigned 8-bit
integers
numpy.ndarray: normalized image as a 2D array of unsigned 8-bit integers
"""
......@@ -444,10 +452,11 @@ class FingerCrop (Preprocessor):
def __circularGabor__(self, image, bw, sigma):
"""Applies a circular gabor filter on the input image, with parameters
"""
Applies a circular gabor filter on the input image, with parameters.
Parameters:
**Parameters:**
image (numpy.ndarray): raw image to be filtered, as 2D array of
unsigned 8-bit integers
......@@ -457,11 +466,9 @@ class FingerCrop (Preprocessor):
sigma (int): standard deviation (5 pixels)
Returns:
numpy.ndarray: normalized image as a 2D array of unsigned 8-bit
integers
**Returns:**
numpy.ndarray: normalized image as a 2D array of unsigned 8-bit integers
"""
# Converts image to doubles
......@@ -496,8 +503,8 @@ class FingerCrop (Preprocessor):
def __HFE__(self,image):
""" High Frequency Emphasis Filtering (HFE)
"""
High Frequency Emphasis Filtering (HFE).
"""
### Hard-coded parameters for the HFE filtering
......@@ -537,7 +544,8 @@ class FingerCrop (Preprocessor):
def __call__(self, image, annotations=None):
"""Reads the input image, extract the mask of the fingervein, postprocesses
"""
Reads the input image, extract the mask of the fingervein, postprocesses.
"""
# 1. Pads the input image if any padding should be added
......
......@@ -30,9 +30,29 @@ extensions = [
import sphinx
if sphinx.__version__ >= "1.4.1":
extensions.append('sphinx.ext.imgmath')
imgmath_image_format = 'svg'
else:
extensions.append('sphinx.ext.pngmath')
# Be picky about warnings
nitpicky = True
# Ignores stuff we can't easily resolve on other project's sphinx manuals
nitpick_ignore = []
# Allows the user to override warnings from a separate file
if os.path.exists('nitpick-exceptions.txt'):
for line in open('nitpick-exceptions.txt'):
if line.strip() == "" or line.startswith("#"):
continue
dtype, target = line.split(None, 1)
target = target.strip()
try: # python 2.x
target = unicode(target)
except NameError:
pass
nitpick_ignore.append((dtype, target))
# Always includes todos
todo_include_todos = True
......@@ -111,7 +131,7 @@ pygments_style = 'sphinx'
# Some variables which are useful for generated material
project_variable = project.replace('.', '_')
short_description = u'Vein Recognition Library'
short_description = u'bob.biovein API'
owner = [u'Idiap Research Institute']
......@@ -216,8 +236,13 @@ autodoc_default_flags = [
]
# For inter-documentation mapping:
from bob.extension.utils import link_documentation
intersphinx_mapping = link_documentation()
from bob.extension.utils import link_documentation, load_requirements
sphinx_requirements = "extra-intersphinx.txt"
if os.path.exists(sphinx_requirements):
intersphinx_mapping = link_documentation(additional_packages=load_requirements(sphinx_requirements))
else:
intersphinx_mapping = link_documentation()
# We want to remove all private (i.e. _. or __.__) members
# that are not in the list of accepted functions
......
py:class bob.bio.base.database.BioFile
py:class bob.bio.base.database.BioDatabase
py:class BioFile
py:class bob.bio.base.database.database.BioDatabase
py:class BioFileSet
py:class bob.bio.base.database.file.BioFile
py:class bob.bio.base.preprocessor.Preprocessor.Preprocessor
py:class bob.bio.base.extractor.Extractor.Extractor
py:class bob.bio.base.algorithm.Algorithm.Algorithm
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment