|
static int | computeRegionSizeFromSuperpixels (const cv::Mat &image, int superpixels) |
| Compute region size from desired number of superpixels. More...
|
|
static void | computeHeightWidthFromSuperpixels (const cv::Mat &image, int superpixels, int &height, int &width) |
| Compute width and height for the given number of superpixels. More...
|
|
static void | computeHeightWidthLevelsFromSuperpixels (const cv::Mat &image, int superpixels, int &height, int &width, int &levels) |
| Compute width, height and levels for the given number of superpixels. More...
|
|
static void | computeRegionSizeLevels (const cv::Mat &image, int superpixels, int ®ion_size, int &levels) |
| Compute region size and levels for the given number of superpixels. More...
|
|
static void | relabelSuperpixels (cv::Mat &labels) |
| Relabel superpixel segmentation. More...
|
|
static void | computeLabelsFromBoundaries (const cv::Mat &image, const cv::Mat &boundaries, cv::Mat &labels, int BOUNDARY_VALUE=-1, int INNER_VALUE=-2) |
| Compute label map from boundaries by assigning boundary pixels to the nearest superpixel and flooding the connected components. More...
|
|
static void | assignBoundariesToSuperpixels (const cv::Mat &image, const cv::Mat &boundaries, cv::Mat &labels, int BOUNDARY_VALUE=-1) |
| Assigns boundary pixels (indicated by -1) to the nearest superpixel (indicated by labels >= 0). More...
|
|
static int | countSuperpixels (const cv::Mat &labels) |
| Count number of superpixels. More...
|
|
static int | relabelConnectedSuperpixels (cv::Mat &labels) |
| Relabel superpixels based on connected components. More...
|
|
static int | enforceMinimumSuperpixelSize (const cv::Mat &image, cv::Mat &labels, int size) |
| Enforce the minimum segment size by merging small superpixels with similar neighboring superpixels. More...
|
|
static int | enforceMinimumSuperpixelSizeUpTo (const cv::Mat &image, cv::Mat &labels, int number) |
| Enforce the minimum segment size by merging small superpixels with similar neighboring superpixels such that the given number of superpixels is merged. More...
|
|
Superpixel utilities.
Copyright (c) 2016, David Stutz Contact: david.nosp@m..stu.nosp@m.tz@rw.nosp@m.th-a.nosp@m.achen.nosp@m..de, davidstutz.de All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
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.
- Author
- David Stutz
int SuperpixelTools::computeRegionSizeFromSuperpixels |
( |
const cv::Mat & |
image, |
|
|
int |
superpixels |
|
) |
| |
|
static |
Compute region size from desired number of superpixels.
- Parameters
-
[in] | image | image for number of rows and cols |
[in] | superpixels | number of desired superpixels |
- Returns
- region size required for the desired number of superpixels on the given image size
Copyright (c) 2016, David Stutz Contact: david.nosp@m..stu.nosp@m.tz@rw.nosp@m.th-a.nosp@m.achen.nosp@m..de, davidstutz.de All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
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.