Iris Recognition on Zybo




Introduction: Iris Recognition on Zybo

This Iris recognition tutorial for Zybo will provide instructions on how to modify a consumer camera (webcam) for infrared acquisition and prepare Zybo board for running the Iris recognition app.

Required materials:

Zybo board;

Consumer camera(webcam);

USB hub;

VGA or HDMI monitor;


Latest Xillinux release from Xillybus;

Step 1: Preparing the Webcam

Remove the webcams front cover to access the lenses.

Step 2: Remove IR Filter

Unscrew the lens from the sensor and remove the IR filter (red tinted glass) found on the inner part of the lenses.

Step 3: Adding IR LEDs

To enhance image quality two 850 nm Infrared LEDs must be added.

Make 2 holes in the front cover of the webcam and insert the LEDs.

Use an old USB cable for power. Solder the LEDs to the +5v volts and Ground wire of the USB cable. Batteries can be used instead of the USB cable.

Step 4: Block Visible Light

Next, we must block all visible light between the eye and the camera. A plastic pipe can't be used for this step. The length of the cover is given by the focal point of the camera after removing the IR filter.

Place the cover on the camera.

Step 5: Test Camera

Connect the camera to a PC/MAC and run a video app. Test if the image is in focus and well illuminated. Adjust the length of the cover accordingly.

Step 6: Preparing Zybo Board

Head to Xillybus and download the boot partition kit and the SD image.

A well documented tutorial is presented here which will guide you through the installation of Linux on the Zybo board.

Once done, insert the SD Card in the board and set JP5 to boot from SD.

Step 7: Connect All Peripherals

Connect the camera and the keyboard/mouse to the UBS hub.

Connect the USB hub to the ZYBO OTG USB port.

Connect the VGA/HDMI monitor.

Connect the Ethernet cable.

Connect the Power Supply.

Step 8: Booting Up Linux

Next power on the Zybo board and wait for linux to boot up.

Type startx to access the graphical interface.

Step 9: Installing SDL Library

Run apt-get install libsdl2-dev

If you don't have a package manager installed go to SDL2 website and download the latest source.

Unzip the archive.

tar zxfv SDL2-2.0.3.tar.gz

Run ./configure && make all

Wait for make to finnish and run:

make install

Step 10: Getting the Iris Recognition App

The latest source code can be found on GITHUB.

git clone


Step 11: Running the App

For checking a person against the database use:

./irisRec_v1 -d /dev/videoX , where X is the id of the connected camera(usually 0)

For adding a person to the database use:

./irisRev_v1 -d /dev/videoX -a "user_name"

Step 12: Demo

Be the First to Share


    • Chocolate Challenge

      Chocolate Challenge
    • Tinkercad to Fusion 360 Challenge

      Tinkercad to Fusion 360 Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest



    7 years ago on Introduction

    Really cool stuff, although after I make irisRec I get an irisRec_v1 executable, which doesn't seem to be in your demo video. When I run "./irisRec_v1 -d /dev/videoX" i don't get a window showing the video output, only a series of values coming out on the terminal. I am hoping you may be able to help me out with this!


    Reply 7 years ago on Introduction

    The issue might be with SDL, as I am receiving "SDL could not initialize! SDL_Error: No available video device" when i run irisRec_v1. the next line shows Driver Caps: with everything else matching up to your terminal, the only difference is for Bus: "usb-xusbps-ehci.01.1" . The output I receive looks like this: "RadS: 35, max: 16, pos:(107, 0)" and the values seem to change when i move the camera... so it is capturing *something*, just not displaying the video output in a window.


    Reply 7 years ago on Introduction

    I had the same problem my self.

    The SDL library is used to display the acquired frames and might not be linked or the application cannot find it. After i reinstalled it, it worked. A good installing guide can be found here:

    Also, what I forgot to mention is that you need SDL2 library.

    The output you are receiving is the algorithm trying to detect circles.

    I will post an update on GITHUB over this weekend.


    Reply 1 year ago

    I tried to reinstall the SDL library multiple times but the window still doesn't pop up


    Reply 1 year ago

    it also crashes, it shows RadS: 37, max :43 and then crashes


    5 years ago

    Can i do this with the built in camera from my laptop?


    5 years ago

    can we do it using Raspberry pi board


    7 years ago on Introduction

    Very cool project! Thank you for sharing this.

    Welcome to instructables--I hope you'll share many more of your projects here!