Skip to main content

An assortment of algorithms related to computer vision and image feature detection

Project description

Python Image Feature Detection

This package implements a small assortment of (currently, three) algorithms related to computer vision and image feature detection:

The code has been developed and tested using the EPD free Python 2.7.3 distribution (now offered as Enthought Canopy Express).

Package Contents

The package is organized into four modules, briefly described below:

features

Contains the top-level end user functions which actually return the image features

.wangbrady(): Implements Wang-Brady corner detection

.susanEdge(): Implements SUSAN edge detection

.susanCorner(): Implements SUSAN corner detection

masks

Generates footprints and eventually passes them down into fast compiled DLL code in scipy.ndimage._ndimage.pyd, via functions in scipy.ndimage.filters module

.getDeriv() Calculates first and second partial derivatives with respect to image grayscale brightness

.circFootprint() Calculates pixel membership (within a square array) of pixels inside a circular footprint

.usan() Calculates USAN response of each pixel in the image (see [SB1995] [SB1997] for details)

cleanedges

Contains several functions to refine and remove noise from the raw response returned by edge detection algorithms

.roundAngle() Rounds edge normal direction angle to one of four major directions: horizontal, vertical, diagonal (positive slope) or diagonal (negative slope)

.nonMaxSuppEdge() Suppresses edge responses from pixels which are not local maxima on a line segment along their local edge normal direction

.hystThresh() Implements Canny style dual level hysteresis thresholding

.listEdge() Assigns pixels with non-zero edge response into discrete groups based upon contiguity and also provides a list of member pixels of each group

.minMembership() Rejects edges that consist of fewer than a minimum number of contiguous pixels

example

Demonstrates proper usage of the functions in the features module

.demo() Runs the algorithms in the features module on a couple of standard test images (or user-supplied image files, if desired) using default parameter settings

External Requirements

In addition to the Python interpreter and its constituent libraries, four external packages, which are not necessarily included in the Python standard libraries, are also required in order to use this package:

At least some of these packages, such as numpy and scipy, include portions which are not native Python and therefore have to be compiled, meaning that your system must have compilers installed in order to run them. A popular and somewhat easier alternative is to download Enthought Canopy Express (formerly EPD Free), the free version of a Python-based GUI scientific analysis environment which also includes a Python distribution containing precompiled versions of all of the packages above. As of this writing, a version of the PIL package does not yet exist for Python 3.x, which effectively means that both the Enthought Python Distribution is currently limited to Python 2.7.3, and also that this package has not yet been tested on versions of Python that are later than this, either.

Install

The ftdetect package is distributed using standard Python distutils. After downloading and unzipping the package, open a command line shell, change directory to the package folder that contains setup.py, and simply type:

python setup.py install

Example

A demo script has been provided, with a couple of standard test images, to help illustrate usage. To run it from the command line, type:

python -c "import ftdetect.example; ftdetect.example.demo()"

To run it from an interactive Python session (IDLE, IPython, Enthought Canopy GUI, etc.), type:

import ftdetect.example
ftdetect.example.demo()

The demo script is also capable of running on user-selected figures, like so:

ftdetect.example.demo(['filea.jpg', 'fileb.gif', 'filec.png'])

however, execution speed may vary widely. The SUSAN algorithms in particular are prone to running very slowly on some images, particularly those with large dimensions, textured surfaces, or complicated fine structure. If that happens, choose another image which is both smaller and doesn’t contain as much fine detail. Another more advanced option is to vary the algorithm input parameters so as to decrease the sensitivity, however, the code provided in the example module, being conceived primarily as instructional in nature, doesn’t bother to expose this level of control to the end-user–you’ll have to access the algorithms directly from the features module itself in that case.

References

[WB1995]

Han Wang and Michael Brady, “Real-time corner detection algorithm for motion estimation”, Image and Vision Computing 13(9): 695-703 (Nov 1995). doi: 10.1016/0262-8856(95)98864-P

[SB1995] (1,2,3)
    1. Smith and J. M. Brady, “SUSAN–A New Approach to Low Level Image Processing”, Technical Report TR95SMSIc (1995).

[SB1997] (1,2,3)
    1. Smith and J. M. Brady, “SUSAN–A New Approach to Low Level Image Processing”, International Journal of Computer Vision 23(1): 45-78 (May 1997). doi: 10.1023/A:1007963824710

Package Maintenance Information

Version: 1.0.0

Date: 2013-05-17

Author: Andrew L. Stachyra

Contact: andrewlstachyra@gmail.com

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

ftdetect-1.0.0.zip (108.3 kB view details)

Uploaded Source

File details

Details for the file ftdetect-1.0.0.zip.

File metadata

  • Download URL: ftdetect-1.0.0.zip
  • Upload date:
  • Size: 108.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ftdetect-1.0.0.zip
Algorithm Hash digest
SHA256 d729bdbf733b8bd347fc432bf49ff8dd53f3f24f4ea71435f14d3c1da8e27db4
MD5 632d9bd695cfc9fc7994389f8b37356d
BLAKE2b-256 8c89c8d11823851747f926197864811936b0db212f2222286d1dd10e3684c65c

See more details on using hashes here.

Supported by

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