Commit 5fbeece2 authored by André Anjos's avatar André Anjos 💬
Browse files

[many] Fixed unit tests

parent c3a0e4b1
......@@ -47,7 +47,8 @@ To achieve this goal, interfaces to some publicly available vein image
databases are contained, and default evaluation protocols are defined, e.g.:
- UTFVP - University of Twente Finger Vein Database [http://www.sas.ewi.utwente.nl/]
- VERA Finger vein Database [http://www.idiap.ch/scientific-research/resources]
- VERA - Finger vein Database [http://www.idiap.ch/scientific-research/resources]
- PUT - The PUT biometric vein (palm and wrist) recognition dataset [http://biometrics.put.poznan.pl/vein-dataset/]
Algorithms
......@@ -97,7 +98,8 @@ this package using the same installation mechanism.
Development
-----------
In order to develop the latest version of this package::
In order to develop the latest version of this package, install Bob_ as
indicated above. Once that is done, do this::
$ git clone https://gitlab.idiap.ch/biometrc/bob.bio.vein.git
$ cd bob.bio.vein
......
......@@ -47,7 +47,6 @@ class MiuraMatch (Algorithm):
"""Enrolls the model by computing an average graph for each model"""
# return the generated model
#import ipdb; ipdb.set_trace()
return numpy.array(enroll_features)
......
......@@ -80,8 +80,6 @@ class LocalBinaryPatterns (Extractor):
"""Copies the given array into the given blocks"""
# fill array in the desired shape
#For debugging
#import ipdb; ipdb.set_trace()
for b in range(self.m_n_blocks):
lbphs_array[b * self.m_n_bins : (b+1) * self.m_n_bins] = lbphs_blocks[b][:]
......@@ -90,9 +88,6 @@ class LocalBinaryPatterns (Extractor):
"""Computes and returns the LBP features for the given input fingervein
image"""
# For debugging
#import ipdb; ipdb.set_trace()
finger_image = finger_image.astype(numpy.float64)
finger_mask = numpy.zeros(mask.shape)
......@@ -113,9 +108,6 @@ class LocalBinaryPatterns (Extractor):
# create new array
lbphs_array = numpy.zeros(shape, 'float64')
#For debugging
#import ipdb; ipdb.set_trace()
# fill the array with the absolute values of the Gabor wavelet transform
self.__fill__(lbphs_array, abs_blocks, 0)
......
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import numpy
import math
import numpy
import scipy.ndimage
import bob.core
import bob.io.base
......@@ -198,14 +199,6 @@ class RepeatedLineTracking (Extractor):
img_veins_bin = img_veins > md
img_veins_bin = scipy.ndimage.binary_closing(img_veins_bin, structure=numpy.ones((2,2))).astype(int)
#import ipdb; ipdb.set_trace()
#img_veins_bin2 = scipy.ndimage.binary_closing(img_veins_bin, structure=numpy.ones((2,2))).astype(int)
#from PIL import Image
#Image.fromarray(bob.core.convert(img_veins_bin,numpy.uint8,(0,255),(0,1))).show()
#skel = self.skeletonize(img_veins_bin2)
#Image.fromarray(bob.core.convert(skel,numpy.uint8,(0,255),(0,1))).show()
return img_veins_bin.astype(numpy.float64)
......
......@@ -329,7 +329,6 @@ class FingerCrop (Preprocessor):
def __HE__(self, image):
#Umbralization based on the pixels non zero
#import ipdb; ipdb.set_trace()
imageEnhance = numpy.zeros(image.shape)
imageEnhance = imageEnhance.astype(numpy.uint8)
......@@ -372,7 +371,6 @@ class FingerCrop (Preprocessor):
imageEnhance = utils.imfilter(image, gaborfilter, self.gpu, conv=False)
imageEnhance = numpy.abs(imageEnhance)
#import ipdb; ipdb.set_trace()
imageEnhance = bob.core.convert(imageEnhance,numpy.uint8,(0,255),(imageEnhance.min(),imageEnhance.max()))
return imageEnhance
......@@ -388,8 +386,6 @@ class FingerCrop (Preprocessor):
b = 1.2
n = 2.0
#import ipdb; ipdb.set_trace()
#Convert image to doubles
image_new = bob.core.convert(image,numpy.float64,(0,1),(0,255))
img_h, img_w = image_new.shape
......@@ -459,7 +455,6 @@ class FingerCrop (Preprocessor):
def crop_finger(self, image):
spoofingValue = self.__spoofingdetector__(image)
#import ipdb; ipdb.set_trace()
#Padding array
image = self.__padding_finger__(image)
......
Supports Markdown
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