File Exchange

image thumbnail

Iris segmentation using Daugman's integrodifferential operator

version (8.81 KB) by Anirudh Sivaraman
This program takes as input the image of the iris f human eye and localises the iris and pupil by fi


Updated 31 Jul 2015

View Version History

View License

This collection of M-files takes as input a close-up image of the human iris and returns as output the original image overlaid with circles corresponding to the pupil and iris boundaries. In addition, it returns the centre and radius coordinates of both boundaries in the variables ci and cp.Notes on the use of the function(s) are included in the .txt files. All the functions have to be on the search path for the code to work.
Unfortunately, I wrote this a long time ago (2007) and no longer have the time to support it. You are of course free to extend and reuse this if it helps you.

Cite As

Anirudh Sivaraman (2021). Iris segmentation using Daugman's integrodifferential operator (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (65)

Akshay Gore

Contact for code and support
Whatsapp +91 9464894829

1. RGB-Image-encryption-based-on-chaotic-system-and-DNA-algorithm

2. Image-encryption-based-on-chaotic-system

3. Image encryption by generating Halton sequences

4. Chaos-based-Image-Encryption

5. Text-Encryption Matlab code for AES,DES,Hybrid AES-DES and AES w/ chaos

6. Image encryption and decryption using chaotic key sequence generated by sequence of logistic map and sequence of states of Linear Feedback Shift Register

7. A New Approach of Image Encryption Using 3D Chaotic Map to Enhance Security of Multimedia Component

8. MATLAB was used for the implementation of Chaotic Digital Image Encryption.

9. Multiple-Color-Image-Encryption

10. Cryptanalyzing an Image Scrambling Encryption Algorithm of Pixel Bits.

11. Novel Image Compression encryption hybrid algorithm based on a key-controlled measurement matrix in compressive sensing.

12. An Image Encryption Scheme Based on a Hybrid Model of DNA Computing, Chaotic Systems and Hash Functions.

13. Colour image encryption algorithm combining Arnold map, DNA sequence operation, and a Mandelbrot set.

14. Advanced Encryption Standard

15. Reversible-Data-Hiding-by-Reserving-Room-Before-Encryption-MATLAB.

16. Image Encryption and Decryption Using Logistic Map Equation and Linear Feedback Shift.

17. A simple Matlab implementation of the algorithm presented in the paper: "Reversible-data-hiding-in-Encrypted-image"

17. Image encryption and encoding methods

19. DES 64bit Encryption and Decryption

20. Matlab project on blind digital watermarking and encryption.

21. Encrypting an image using Salient Object Detection and K-Means Clustering.

22. Recurrent Scale Approximation for Object Detection in CNN.

23. Object detection via a multi-region & semantic segmentation-aware CNN model.

24. R-FCN: Object Detection via Region-based Fully Convolutional Networks

25. Adversarial Examples for Semantic Segmentation and Object Detection.

26. Object Detection in Videos toolkit for VisDrone2019

27. Computational biology and medical image processing scripts and programs.
28. A MATLAB library/toolbox providing access to image registration suitable for use with medical images.
29. Lung medical image analysis and visualisation software for Matlab.
30. Medical ultrasound image processing.Carotid ultrasoung segmentation using RF data.
31. A Phase Congruency and Local Laplacian Energy Based Multi-Modality Medical Image Fusion Method in NSCT Domain.
32. Automatic tool for landmark localisation in 3D medical images.
33. Advanced-Medical-Image-Processing.
34. Recognizing and Refining the location of Individual Vessels in Segmented Retinal Images.
35. Image segmentation method on medical image is provided and tested.
36. 3D non-rigid image registration for medical and synthetic images using truncated hierarchical B-splines (THB-Splines).
37. Laplacian Re-Decomposition for Multimodal Medical Image Fusion[J]. IEEE Transactions on Instrumentation and Measurement, 2020.
38. Medical software for Processing multi-Parametric images Pipelines.
39. Prostate cancer segmentation based on MRI and PET images.
40. Image segmentation methods for biomedical purposes such as cell segmentation, blood vessel segmentation (eye blood vessels), and segmentation of brain tumors.
41. Medical Image Analysis Breast Cancer Lesion Detection.
42. Medical image enhancement based on nonlinear technique and logarithmic transform coefficient histogram matching.
43. Machine Learning: A Bayesian and Optimization Perspective.

esam manea

kuangkuang yue

How can I run without the main function? Can you help me,thank you

It worked on the first try. Amazing code mate. Cheers

Hadi Rezaeilouyeh

dan zhou

The eye images are uncorrected segmented using the downloaded files. Could you update the files?

Muhammad Hafiz

Hi, may i know what is the procedure to use this code. Is there any step by step sequence needed to run the function or i could just run it randomly. Still learning, best regard :)

Ashutosh Rathod

Plzzz help me with the procedure of the code

Mahmut zeki

İ have a project for iris recognition .İ need some help for compairing the iris for matching ? Which technic shall use ? Which one is better?
thank you all!!

momar iraqi

why this occur ?
Error in thresh (line 58)
ci=search(I,rmin,rmax,x,y,'iris');%fine search

snehal sule

enough input arguments.

Error in thresh (line 3)

snehal sule

I did not get how to create the main file for getting proper output

amina abdo

I use these function on CASIA interval 4, but some of the results were correct and others were incorrect, can anyone help me plz

Shubham Pagui



how to calculate rmin and rmax of iris image for passing into "thresh" function??

Laisa Fernochio

i'm heaving trouble whit theta=(2*pi)/n; in the file lineint.m line 20, says enough input arguments can you help me, please?

Chin Yong Sheng

lakshmi priya

how the functions are performed in this iris image ,please explain me step by step

steven lee

Thanks. Works perfectly!!! Use this
[ci,cp,out] = thresh(eye,50,400);

Hoang An Nguyen

Rajat Babel

please tell how we have to give input in the function drawcircle
thanks a lot

ahmed am

dear sir
i do not understand how can run this code for detect iris , please help me in understand this or to how i run this code to detect iris and extract iris from pupil.
best wishes

Saurabh Kanhere

How to launch this ? How to input an eye image ? Anyone please explain step by step. Urgent here.

rohit khandare

Alfio Rezika

well i've got it. thanks.

Alfio Rezika


Laba Ningombam

Can anyone help me on the basics and how to use the code?

nurul hazuwani

niloofar86 mahtabi

tnx for code.but i have problem. I'm working on feret DB. what rmin and rmax I should use??
please help me,

anya viswa

Could anyone please suggest how to calculate rmin,rmax automatically?.It is like trial and error method to detect accurate rmin and rmax values.


@Yannick Mermet can you please help me out on how to apply the code? Thanks

Yannick Mermet

Really helpful for my project thanks.
Just wondering but is there a way to make the rmin and rmax adapt automatically before each run of the algorithm?



Hello, please help I don't understand the function each time I tried to run the program it gives me errors that function is invalid in the code and (I,C,r,n) that I should terminate with a code. Here is the code:
K = imread('brown eye.jpg);
I = rgb2gray(K);
r = 150;
C = int32([200 300 150]);
function [0] = drawcircle(I,C,r,n);
margin =3
Please tell me what I'm missing in this code. Thanks alot

Yousra Ibrahim


Salemou 3laikom
I still confused to determine Rmin, Rmax, coordinate of center point, and number of side.
the size is exceed, how can i fix this??
I work with CASIA Iris-Syntetic V4, image dimensions is 640*480 (widht*hight)
how to calculate rminiris and rmaxiris ( the minimum and maximum values) of the iris radius.
Can you help me and thank you very much

Dihan Fernando

will a digital camera work to capture the image or should i get CCD camera ? if its a CCD camera that i should get can anyone specify a brand ?/ model ?


can anyone tell me from where to start pupil localization...actually i want some basic

joy barbosa

oh sorry~! it should be Alexandre Willame! :))) thnx Alex!

joy barbosa

works great! thanks Anirudh Sivaraman
for sharing.. big thnx to you too Rajasekhar Reddy for the suggestions. it also helps me in making the execution faster by altering the imgsize, rmin & rmax values w/ a proper scaling factor!


Is iris image and ordinary image taken from a digi cam me frndzz..

Please help me.I'm implementing code by Libor Masek. I'm not getting correct boundaries for iris and pupil.I'm confused which values I've to use for lower&upper values for iris and pupil radius and lower &upper threshold values for hysterisis thresholding to mark edges.My input image is eye image(CASIA)is of 300*400 size.I'm using hough transform to find circles.I'm using lower&upper radius values for iris 28,75 and for pupil 8,15 respectively.Lower&upper threshold values 0.19&0.20 resp.Scaling factor 0.3.


Alexandre Willame

For those who have problems using it, here is an example of how to launch it (eye.jpg is a 480x360 image of an eye):

[ci,cp,out] = thresh(eye,50,400);

Nag Arjun

how to run this code?


how to run this code??
i cant run it((((


can anyone help me about the procedure to call the function,
this is what I am running:
[ci,cp,O] = umbral (I,rmin,rmax);

biswajeet pujapanda

can anyone help me about the input values, what must be given ?


Can u please explain how to run this code??
Ps give an example...

Rusmaya Luthfina

still confused to determine Rmin, Rmax, coordinate of center point, and number of side.. Plzz tell me! :'(
at search.m :
radius = maxrad(X,Y)
the size is exceed,, how can i fix this??
i work withh CASIA Iris-V4


doesn't work...


it works great !! for those who uses CAsia interval or CASIA Iris-V3 you must to fix the min and the max Radius [95 150] respectively, and to apply the Enhace histog Equalization "histeq.m"
but if you use the Casia1 it works by fixing on [95 105] without histeq.
I've some prblm with the Classification step if someone could help I'll apreciate (wich method or Algorithm i should use to extract the features ..!!).
Good luck.


someone mail me plz!


can you help me plz how to use this code?

Alex Chuah

i have tried this m-files by using the CASIA iris database (version 1) and it works fine. But then when i run it by using CASIA interval iris database, it not really works well. Can i know how to solve this issue??

Joanna Yahya

please people help me,I implement the code iris recognition for libor masek and I got an error coding project.
I put the image file(001_1_1.bmp) in same directory with createiristemplate.m when i call this function
there was an error Error: File: createiristemplate.m Line: 21 Column: 47
Unexpected MATLAB expression.
I also already changed all the eyeimage_filename in createiristemplate to
('001_1_1.bmp'), but theres still error.
can you help me please and tell me what is are the steps i have to do to run the codes?

Raymond Cheng

Thanks for your sharing. Perfect!


Can u give some more details abt this...

Tincu Oana

i did change the scale and the min iradius and max iradius as anand said but i received an error on line 46 "index exceeds matrix dimensions" and i don't know how to fix it ...can anybody help me pls

anand kumar

works perfect ! gr8 !
There is a little problem, the scale factor have to be 0.25 for correct estimation ( also It makes it fast by 10 times ! ) and the min iradius = 95 and max iris radius = 105.
thnx Anirudh.
It will be nice if u can give me code to unwrapp the image and remove the noise from unwrapped image .
thnx again

lani karmila

I have tried your program with CASIA database, but I fail to get correct boundary iris and pupil. Can you help me to explain your program

Tina Clair

Can u plz upload any image using this operator? I am trying to run it, but I think I'm not giving the correct rmin n rmax values, on the CASIA (version1) database. Guideline needed to run it, soon please.

Hozefa Pat

Can u give more details on how to use this code ??

akrout belhassen

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Fast Eyetracking

Community Treasure Hunt

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

Start Hunting!