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.7.tar.gz
(123.1 kB
view hashes)
Close
Hashes for intelligent-scissors-0.2.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5e1dd0de6db92babbc57e831cd7e1dd8341109bc8cec16caaa642ee2636a474 |
|
MD5 | 7b96fc9717926e87582556001b296644 |
|
BLAKE2b-256 | 80027e11652be99974d72aec95a397e2c1befc342f599bd4b539a16f856510b4 |