Superpixel Benchmark
Superpixel benchmark, tools and algorithms.
|
Implementation of graph based image segmentation as described in the paper by Felzenswalb and Huttenlocher. More...
#include <graph_segmentation.h>
Public Member Functions | |
GraphSegmentation () | |
Default constructor; uses the Manhatten distance. More... | |
virtual | ~GraphSegmentation () |
Destructor. More... | |
void | setDistance (GraphSegmentationDistance *_distance) |
Set the distance to use. More... | |
void | setMagic (GraphSegmentationMagic *_magic) |
Set the magic part of graph segmentation. More... | |
void | buildGraph (const cv::Mat &image) |
Build the graph nased on the image, i.e. compute the weights between pixels using the underlying distance. More... | |
void | oversegmentGraph () |
Oversegment the given graph. More... | |
void | enforceMinimumSegmentSize (int M) |
Enforces the given minimum segment size. [in] M minimum segment size in pixels. More... | |
cv::Mat | deriveLabels () |
Derive labels from the produced oversegmentation. More... | |
Protected Attributes | |
int | H |
Image height. More... | |
int | W |
Image widt.h. More... | |
ImageGraph | graph |
The constructed and segmented image graph. More... | |
GraphSegmentationDistance * | distance |
The underlying distance to use. More... | |
GraphSegmentationMagic * | magic |
The magic part of graph segmentation. More... | |
Implementation of graph based image segmentation as described in the paper by Felzenswalb and Huttenlocher.
|
inline |
Default constructor; uses the Manhatten distance.
|
inlinevirtual |
Destructor.
void GraphSegmentation::buildGraph | ( | const cv::Mat & | image | ) |
Build the graph nased on the image, i.e. compute the weights between pixels using the underlying distance.
[in] | image | image to oversegment |
Copyright (c) 2016, David Stutz Contact: david, davidstutz.de All rights reserved. .stu tz@rw th-a achen .de
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cv::Mat GraphSegmentation::deriveLabels | ( | ) |
Derive labels from the produced oversegmentation.
void GraphSegmentation::enforceMinimumSegmentSize | ( | int | M | ) |
Enforces the given minimum segment size. [in] M minimum segment size in pixels.
void GraphSegmentation::oversegmentGraph | ( | ) |
Oversegment the given graph.
|
inline |
Set the distance to use.
[in] | _distance | pointer to a GraphSegmentationDistance to use |
|
inline |
Set the magic part of graph segmentation.
[in] | _magix | pointer to a GraphSegmentationMagic to use |
|
protected |
The underlying distance to use.
|
protected |
The constructed and segmented image graph.
|
protected |
Image height.
|
protected |
The magic part of graph segmentation.
|
protected |
Image widt.h.