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-1.0.1.tar.gz
(123.1 kB
view hashes)
Close
Hashes for intelligent-scissors-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4928bff26ca6944c7e9eda6313af40c9c90fd6852eb24cebd642ea33d41c451f |
|
MD5 | 7d73acd774ba91a634a23eda8d021c2f |
|
BLAKE2b-256 | c74dd972d1f6c4fbf3ee7c4836b6b38ac545c56336bf96ca32af99814292fa4d |