Intelligent Scissors tool
Project description
Intelligent-Scissors
The Intelligent Scissors can be used to select an image region defined by strong color-changes at the edges.
You can learn more about it in papers:
Installation
pip install intelligent-scissors
Usage
To use in your program
from scissors.graph import PathFinder
from scissors.feature_extraction import StaticExtractor, DynamicExtractor, Scissors
image = ...
static_extractor = StaticExtractor()
static_cost = static_extractor(image)
dynamic_extractor = DynamicExtractor()
dynamic_features = dynamic_extractor(image)
finder = PathFinder(image.size, static_cost)
scissors = Scissors(static_cost, dynamic_features, finder)
seed_point = ...
free_point = ...
path = scissors.find_path(seed_point, free_point)
Also you can run a simple demo
from scissors.gui import run_demo
file_name = 'image.png'
run_demo(file_name)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
intelligent-scissors-0.2.3.tar.gz
(121.8 kB
view hashes)
Close
Hashes for intelligent-scissors-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e319dce8ccf4143d945a129416b32bd060e41b9109ef25cd05a9d13d42af5499 |
|
MD5 | cbdeaa78c7c0591b13dca64aab91db54 |
|
BLAKE2b-256 | 9d38a744557b78b39fa9fa6a2f12b6df93247a549a6621f73a8e0961579cafad |