Borrar filtros
Borrar filtros

how to do iris encoding correctly

1 visualización (últimos 30 días)
Karthik Krishnan
Karthik Krishnan el 24 de Jul. de 2021
Respondida: Garmit Pant el 5 de Mzo. de 2024
I have successfully extracted the phase data of normalised iris using 2d gabor filter. now i need to encode to make the template. what should i do? i tried imbinarize but before that should i resize the array? Please help
  3 comentarios
Karthik Krishnan
Karthik Krishnan el 24 de Jul. de 2021
also say if there is any change is to be made in the above code

Iniciar sesión para comentar.

Respuestas (1)

Garmit Pant
Garmit Pant el 5 de Mzo. de 2024
As per my understanding of your query, you are trying to implement iris encoding after generating phase data by applying 2D Gabor Filter after segmenting the iris from the image. You can follow the steps listed below to implement iris encoding and generate an iris template from the phase data.
To generate the iris template from the phase data, you need to apply 2-bit phase quantization. This process involves assigning a 2-bit value to each resultant phasor by identifying which quadrant of the complex plane the phasor lies in. You can add the following code snippet to your code to perform 2-bit quantization on the phase data.
% Phase Quantization
quantized_phase = zeros(size(phase));
quantized_phase(phase >= 0 & phase < pi/2) = 3; % 11
quantized_phase(phase >= pi/2 & phase < pi) = 1; % 01
quantized_phase(phase >= -pi & phase < -pi/2) = 0; % 00
quantized_phase(phase >= -pi/2 & phase < 0) = 2; % 10
% Convert the quantized values into a binary code
% Each value will be represented by two bits
binary_code = int2bit(quantized_phase,2,false);
% Flatten the binary template into a 1D iris code
iris_code = binary_code(:)';
% Display the size of the iris code
disp(size(iris_code));
For further understanding, refer to the links to the MATLAB documentation given below:
  1. imgaborfiltfunction- https://www.mathworks.com/help/images/ref/imgaborfilt.html
  2. int2bit” function – https://www.mathworks.com/help/comm/ref/int2bit.html
I hope you find the above explanation and suggestions useful!

Categorías

Más información sobre Oceanography and Hydrology en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by