Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Package for finding salient regions in images

Project description

# Python software for image processing
[![Build Status](]( [![Codacy Badge](]( [![Codacy Badge](](

This folder contains a Python implementation of the Salient Region Detector code as part of the [image processing part of eStep]( The software conforms with the [eStep standards](

The original MATLAB implementation can be found at [this repository](

Documentation can be found on [Read the Docs](

The repository contains the following sub-folders:

## Notebooks
Several iPython notebooks testing and illustrating major functionality.

## salientregions
The module for salient region detection functionality.

## tests
Unit tests for the code in salientregions.

# Installation
## Prerequisites
* Python 2.7 or 3.5
* pip (8.1.2)

## Installing the package (via pip)

`pip install -e git://`

Afterwards you can import it in Python:

import salientregions as sr

## Installing the package manually
Clone or download repo. Install requirements from requirements.txt file:

`pip install -r requirements.txt`

Install the package itself:

`pip install .`

To perform tests:

`nosetests test`

## Manually install OpenCV
OpenCV should be installed via pip, but if you have an older version of pip, you might need to install it manually. There is two ways to install OpenCV:
* If you're using Conda, you can install OpenCV with the following command:

`conda install -c opencv3`

* Otherwise, follow the instructions to [install OpenCV 3.1.0 manually](

# Getting started
The source code documentation can be found [here](

This code makes heavily use of the OpenCV library, so in order to understand how the code works, it helps to have a look at the [OpenCV Documentation](

## Images
In OpenCV, images are represented as numpy arrays. Grayscale images are represented by a 2-dimensional array. Color images have a third dimension for the color channel. The Salient Region Detector has a few simplifying assumptions:
* Color images have BGR channels
* Images are assumed to be 8-bit. This is also the case for binary images, so they only have values of 0 and 255.

## Detector object
The complete functionality of the salient region detectors are found in the Detector object. The SalientDetector implements DMSR detection, and MSSRDetector implements MSSR detection (see referred papers for more information about these algorithms).
An example of how to use the Detector can be found in [this iPython Notebook](

# Contributing
If you want to contribute to the code, please have a look at the [eStep standarts](

We use numpy-style code documentation.

# References
Ranguelova, E.B. - Pauwels, E.J.
Morphology-based Stable Salient Regions Detector
Proceedings of International Conference on Image and Vision Computing New Zealand 2006 , Great Barrier Island, New Zealand, p.97–102

Project details

Download files

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

Files for salientregions, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size salientregions-1.0.3.tar.gz (37.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page