Ejemplo n.º 1
0
def extractFeature(im_filename, eyelashes_thres=80, use_multiprocess=True):
    """
	Description:
		Extract features from an iris image

	Input:
		im_filename			- The input iris image
		use_multiprocess	- Use multiprocess to run

	Output:
		template			- The extracted template
		mask				- The extracted mask
		im_filename			- The input iris image
	"""
    # Perform segmentation
    # path = 'C:\\Users\\luvku\\CS 2019\\SIH\\sih2020\\sih\\test\\Iris-Recognition\\CASIA1\\1\\' + im_filename
    # print('path = ',path)
    im = cv2.imread(im_filename, 0)
    ciriris, cirpupil, imwithnoise = segment(im, eyelashes_thres,
                                             use_multiprocess)

    # Perform normalization
    polar_array, noise_array = normalize(imwithnoise, ciriris[1], ciriris[0],
                                         ciriris[2], cirpupil[1], cirpupil[0],
                                         cirpupil[2], radial_res, angular_res)

    # Perform feature encoding
    template, mask = encode(polar_array, noise_array, minWaveLength, mult,
                            sigmaOnf)

    # Return
    return template, mask, im_filename
def extractFeature(im_filename, eyelashes_thres=80, use_multiprocess=True):
    """
	Description:
		Extract features from an iris image

	Input:
		im_filename			- The input iris image
		use_multiprocess	- Use multiprocess to run

	Output:
		template			- The extracted template
		mask				- The extracted mask
		im_filename			- The input iris image
	"""
    # Perform segmentation
    im = imread(im_filename, 0)
    ciriris, cirpupil, imwithnoise = segment(im, eyelashes_thres,
                                             use_multiprocess)

    # Perform normalization
    polar_array, noise_array = normalize(imwithnoise, ciriris[1], ciriris[0],
                                         ciriris[2], cirpupil[1], cirpupil[0],
                                         cirpupil[2], radial_res, angular_res)

    # Perform feature encoding
    template, mask = encode(polar_array, noise_array, minWaveLength, mult,
                            sigmaOnf)

    # Return
    return template, mask, im_filename
Ejemplo n.º 3
0
def extractFeature(file):
        im = imread(im_filename)
	ciriris, cirpupil, imwithnoise = segment(im, eyelashes_thres, use_multiprocess)

	polar_array, noise_array = normalize(imwithnoise, ciriris[1], ciriris[0], ciriris[2],
										 cirpupil[1], cirpupil[0], cirpupil[2],
										 radial_res, angular_res)

	
	template, mask = encode(polar_array, noise_array, minWaveLength, mult, sigmaOnf)
def extractFeature(im_filename):
    """
	Description:
		Extract features from an iris image

	Input:
		im_filename	- The input iris image

	Output:
		template	- The extracted template
		mask		- The extracted mask
		im_filename	- The input iris image
	"""
    # Normalisation parameters
    radial_res = 20
    angular_res = 240

    # Feature encoding parameters
    minWaveLength = 18
    mult = 1
    sigmaOnf = 0.5

    # Perform segmentation
    im = imread(im_filename, 0)
    ciriris, cirpupil, imwithnoise = segment(im)

    # Perform normalization
    polar_array, noise_array = normalize(imwithnoise, ciriris[1], ciriris[0],
                                         ciriris[2], cirpupil[1], cirpupil[0],
                                         cirpupil[2], radial_res, angular_res)

    # Perform feature encoding
    template, mask = encode(polar_array, noise_array, minWaveLength, mult,
                            sigmaOnf)

    # Return
    return template, mask, im_filename