Skip to main content

Image analysis toos for extracting optical parameters of compound eyes.

Project description

Compound Eye Tools

This library automatically counts and measures the ommatidia of compound eyes from images.

On Counting Ommatidia

My graduate mentor once challenged me to count the ommatidia of vinegar flies (a.k.a. fruit flies, Drosophila melanogaster). I quickly learned that they have two compound eyes, each composed of about 1000 light collecting facets called ommatidia. I learned this as I counted the ommatidia of over 100 flies, culminating in over 90,000 ommatidia (and a publication)!

Image
Over 90,000 ommatidia from more than 100 flies that I counted by hand. My notes are in white. The geometric arrangement allowed me to count large triangles of ommaitida instead of individuals. Still, a lot of counting.

Many have braved this greuling task of counting ommatidia because, among other reasons, compound eyes are the most common image forming structures on Earth. Compound eyes are used by arthropods, which occupy nearly every ecological niche and represent roughly 80% of described animal species (the massive blue slice of the pie of life below). Compound eyes vary substantially in shape and size, having adapted to the gamut of selective pressures. So, to understand how vision works, develops, and evolves, we must study compound eyes.

Image
The Pie of Life: notice the large blue pie representing the arthropods (pronounced "insects")

Plus, as opposed to our camera-type eyes, many of the structures limiting the visual performance of compound eyes can be measured in direct external images. The number and size of ommatidia set physical limitations on what a compound eye can see. Each one collects a pixel of the image captured by the retina and sits immediately adjacent to the next ommatidium, separated by screening pigment (see below). The angle separating neighboring ommatidia, called the interommatidial angle, determines the smallest resolvable detail just like the inter-receptor angle of our own camera-type eyes. The size of the ommatidial aperture limits the amount of light available for absorption so that large ommatidia offer greater sensitivity to low light levels. Counting and measuring ommatidia tells us a great deal about the spatial resolution and light sensitivity of many arthropods.

Image
The camera-type eye can have a higher spatial resolution because one lens serves the whole retina. For a compound eye to acheive the same resolution as our eyes, for instance, it would need to be at least 1 meter in diameter and composed of millions of ommatidia!

Wouldn't it be nice if a program could count these ommatidia automatically? Humanity has developed programs that can beat grand champions in chess or generate fake videos of past presidents. If computers can drive cars and recognize faces, shouldn't they be able to detect ommatidia? Introducing the

Ommatidia Detecting Algorithm (ODA)

Image
General Pipeline of the ODA

To get a feel for how the ODA works, try out this interactive iPython notebook hosted on Binder. Binder icon]

Installation

Simple Recipes

Individual Image

Image Stack

CT Stack (ODA-3D)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compound-eye-tools-2021.1.3.4.tar.gz (31.9 MB view hashes)

Uploaded Source

Built Distribution

compound_eye_tools-2021.1.3.4-py3-none-any.whl (57.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page