# Path: util/commons_util/logger_utils/Timer.py
# class Timer(object):
#     def __init__(self):
#         self.s = None
#         self.e = None
# 
#     def start(self):
#         self.s = datetime.datetime.now()
#         return self.s
# 
#     def end(self):
#         self.e = datetime.datetime.now()
#         return self.e - self.s


import os
import cv2
import pickle
from LBP import *
from util.commons_util.logger_utils.Timer import Timer
from multiprocessing import Pool
Created on Mon May 26 11:00:57 2014
Detect_feature
detect the multi-scale LBP feature of the face images
@author: mountain
"""


# the radius in LBP
radius = 1
# the number of the neighbors in LBP
nei = 8
# the scale in Multi-scale LBP
scale = 4
# the ratio in scaling
scale_step = 1.25
# the patch size for getting hist
winsize = int((25 - 1) / 2)
# the stride between the patch in getting hist
stride = 2
# under this condition, the feature dimension is 816*236

# dir_path: the path of the folder containing the image
orl_path = 'E:/GPforFR/data/orl_faces'
lfw_path = 'E:/GPforFR/data/lfw_p'

# dst_path: the path of the file saving the feature
orl_dst_path = 'E:/GPforFR/data/orl_faces_feature'
lfw_dst_path = 'E:/GPforFR/data/lfw_feature'

def extract_feature(args):

# Path: util/commons_util/logger_utils/Timer.py
# class Timer(object):
#     def __init__(self):
#         self.s = None
#         self.e = None
# 
#     def start(self):
#         self.s = datetime.datetime.now()
#         return self.s
# 
#     def end(self):
#         self.e = datetime.datetime.now()
#         return self.e - self.s


# Path: gaussian_face/Detect_feature.py
import os
import cv2
import pickle
from LBP import *
from util.commons_util.logger_utils.Timer import Timer
from multiprocessing import Pool

Created on Mon May 26 11:00:57 2014
Detect_feature
detect the multi-scale LBP feature of the face images
@author: mountain
"""


# the radius in LBP
radius = 1
# the number of the neighbors in LBP
nei = 8
# the scale in Multi-scale LBP
scale = 4
# the ratio in scaling
scale_step = 1.25
# the patch size for getting hist
winsize = int((25 - 1) / 2)
# the stride between the patch in getting hist
stride = 2
# under this condition, the feature dimension is 816*236

# dir_path: the path of the folder containing the image
orl_path = 'E:/GPforFR/data/orl_faces'
lfw_path = 'E:/GPforFR/data/lfw_p'

# dst_path: the path of the file saving the feature
orl_dst_path = 'E:/GPforFR/data/orl_faces_feature'
lfw_dst_path = 'E:/GPforFR/data/lfw_feature'

def extract_feature(args):

    timer = Timer()