A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clojure2d.github.io/clojure2d/docs/codox/clojure2d.extra.segmentation.html below:

clojure2d.extra.segmentation documentation

clojure2d.extra.segmentation

Segment image into parts.

Currently contains only quadtree segmentation.

*sequence-generator* dynamic

Sequence generator used to select pixels for decision about subdivision. Defaults to R2 low-discrepancy sequence.

segment-pixels

(segment-pixels p ch)(segment-pixels p ch {:keys [min-size max-size threshold], :or {min-size 4, max-size 256, threshold 15.0}})

Decompose channel ch from Pixels into square segments using quadtree decomposition.

Returns lazy sequence of vectors containing x y size where x y is segment position and size is a side length.

For segmentation, sequence generator (dynamic variable *sequence-generator* is used.

Examples

Usage

(count (segment-pixels (p/load-pixels "docs/cockatoo.jpg") 0))
;;=> 705
(nth (segment-pixels (p/load-pixels "docs/cockatoo.jpg")
                     0
                     {:min-size 2, :threshold 40})
     5)
;;=> [40 0 2]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4