ota.iris package

Submodules

ota.iris.eyelid_removal module

ota.iris.eyelid_removal.iris_extension(iris, theta_resolution, lower_theta=0, upper_theta=0)[source]

Extends the iris by inserting portions of the iris before zero at the beginning and appending portions of th iris after zero to the end.

Inputs:
iris - numpy array of pixel intensities of transformed iris theta_resolution - double; degree of upsampling used in the transform along the theta axis lower_theta - int; degrees below zero that define the iris insertion bounds upper_theta - int; degrees above zero that define the iris extension bounds
Outputs:
iris - numpy array of pixel intensities that represents the extended iris
ota.iris.eyelid_removal.noise_replace(iris, upper_occlusion_theta, lower_occlusion_theta)[source]

Replaces portions of the iris with noise.

Input:

iris - numpy array of pixel intensities of transformed iris. upper_occlusion_theta - tuple that defines the angular bounds of the upper iris

that is to be replaced with noise.
lower_occlustion_theta - tuple that defines the angular bounds of the lower iris
that is to be replaced with noise.
Output:
iris - numpy array of pixel intensities of transformed iris with desired
portions replaced with noise.

ota.iris.iris module

ota.iris.iris.calculate_func_of_theta(polar_image)[source]

Input: polar_image - A transformed (to polar coordinates) and masked image of the iris Output: f - A function that relates an angle theta to the sum of the intensity as the radius is varied for that fixed theta

ota.iris.iris.get_cartesian_coord(radius, theta, pupil)[source]
Calculates the cartesian coordinates of the location specified by polar
coordinate point (radius, theta). The origin of the polar coordinate frame is the center of the pupil.
Inputs:
radius - Distance of the location from the pupil center theta - The angular coordinate of the location in polar space pupil - A dictionary containing information regarding the pupil in the image
Outputs:
location - dictionatry containing the following:
row - The row index of the location in cartesian image space col - The column index of the location in cartesian image space
ota.iris.iris.get_polar_coord(r, c, pupil)[source]
Calculates the polar coordinates of the location specified by cartesian
point (c,r). The origin of the polar coordinate frame is the center of the pupil.
Inputs:
c - Column index of the feature r - Row index of the feature pupil - A dictionary containing information regarding the pupil in the image
Outputs:
radius - The distance of the (c,r) location from the pupil center theta - The angular coordinate of the (c,r) location in polar space
ota.iris.iris.iris_transform(frame, pupil, iris_thickness, theta_window=(-90, 270), theta_resolution=1, r_resolution=1, mode='polar')[source]

Transforms the iris in the given frame into polar representation where the vertical axis is ‘r’ and horizontal axis is theta.

Optionally returns iris segment in cartesian coordinates

Inputs:

frame - opencv video frame (numpy array of intensities) pupil - a dictionary containing information about the pupil within the frame iris_thickness - pixel width of the iris theta_window - Range of theta values over which to sample the cartesian image theta_resolution - sampling interval for theta in degrees. Default is 1 degree. r_resolution - sampling interval for radius. Default is 1 pixel length ret_cartesian - boolean value which allows the return of only the iris in

cartesian coordinates. By default this is set to false
Outputs:
polar_iris - opencv image (numpy array) of extracted iris in polar coordinates cartesian_iris - opencv image (numpy array) of extracted iris in cartesian coordinates

Module contents