Superpixel Benchmark
Superpixel benchmark, tools and algorithms.
Functions | Variables
main.cpp File Reference
#include <opencv2/opencv.hpp>
#include <boost/filesystem.hpp>
#include <boost/timer.hpp>
#include <boost/program_options.hpp>
#include <glog/logging.h>
#include "io_util.h"
#include "parameter_optimization_tool.h"

Functions

void connector_CCS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of CCS. More...
 
void connector_CIS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of CIS. More...
 
void connector_CRS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of CRS. More...
 
void connector_CW (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of CW. More...
 
void connector_DASP (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, boost::filesystem::path depth_directory, boost::filesystem::path intrinsics_directory, std::vector< int > superpixels)
 Connector for parameter optimization of DASP. More...
 
void connector_EAMS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels, std::vector< int > superpixel_tolerances)
 Connector for parameter optimization of EAMS. More...
 
void connector_ERGC (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of ERGC. More...
 
void connector_ERS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of ERS. More...
 
void connector_ETPS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of ETPS. More...
 
void connector_FH (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels, std::vector< int > superpixel_tolerances)
 Connector for parameter optimization of FH. More...
 
void connector_MSS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of MSS. More...
 
void connector_PB (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of PB. More...
 
void connector_POISE (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of POISE. More...
 
void connector_preSLIC (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of preSLIC. More...
 
void connector_reSEEDS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of reSEEDS. More...
 
void connector_SEAW (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of SEAW. More...
 
void connector_SEEDS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of SEEDS. More...
 
void connector_SLIC (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of SLIC. More...
 
void connector_TP (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of TP. More...
 
void connector_TPS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of TPS. More...
 
void connector_vlSLIC (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of vlSLIC. More...
 
void connector_W (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of W. More...
 
void connector_WP (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of WP. More...
 
void connector_PF (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of PF. More...
 
void connector_LSC (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of LSC. More...
 
void connector_RW (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of RW. More...
 
void connector_QS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels, std::vector< int > superpixel_tolerances)
 Connector for parameter optimization of QS. More...
 
void connector_NC (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of NC. More...
 
void connector_VCCS (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, boost::filesystem::path depth_directory, boost::filesystem::path intrinsics_directory, std::vector< int > superpixels)
 Connector for parameter optimization of VCCS. More...
 
void connector_VC (boost::filesystem::path img_directory, boost::filesystem::path gt_directory, boost::filesystem::path base_directory, std::vector< int > superpixels)
 Connector for parameter optimization of VC. More...
 
int main (int argc, const char **argv)
 Optimize parameters for the different algorithms. Usage: More...
 

Variables

std::string FAIR = "-f "
 
std::string RELATIVE_PATH = "."
 
std::string MATLAB_EXECUTABLE = "/home/david/MATLAB/R2014b/bin/matlab"
 
std::string JAVA_EXECUTABLE = "/home/david/jdk-1.8.0_45/release/java"
 

Function Documentation

void connector_CCS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of CCS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_CIS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of CIS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_CRS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of CRS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_CW ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of CW.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_DASP ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
boost::filesystem::path  depth_directory,
boost::filesystem::path  intrinsics_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of DASP.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]depth_directory
[in]intrinsics_directory
[in]superpixels
void connector_EAMS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels,
std::vector< int >  superpixel_tolerances 
)

Connector for parameter optimization of EAMS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
[in]superpixel_tolerances
void connector_ERGC ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of ERGC.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_ERS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of ERS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_ETPS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of ETPS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_FH ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels,
std::vector< int >  superpixel_tolerances 
)

Connector for parameter optimization of FH.

Parameters
img_directory
gt_directory
base_directory
void connector_LSC ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of LSC.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_MSS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of MSS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_NC ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of NC.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_PB ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of PB.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_PF ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of PF.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_POISE ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of POISE.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_preSLIC ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of preSLIC.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_QS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels,
std::vector< int >  superpixel_tolerances 
)

Connector for parameter optimization of QS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
[in]superpixel_tolerances
void connector_reSEEDS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of reSEEDS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_RW ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of RW.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_SEAW ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of SEAW.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_SEEDS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of SEEDS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_SLIC ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of SLIC.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_TP ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of TP.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_TPS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of TPS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_VC ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of VC.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_VCCS ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
boost::filesystem::path  depth_directory,
boost::filesystem::path  intrinsics_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of VCCS.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]depth_directory
[in]intrinsics_directory
[in]superpixels
void connector_vlSLIC ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of vlSLIC.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_W ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of W.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
void connector_WP ( boost::filesystem::path  img_directory,
boost::filesystem::path  gt_directory,
boost::filesystem::path  base_directory,
std::vector< int >  superpixels 
)

Connector for parameter optimization of WP.

Parameters
[in]img_directory
[in]gt_directory
[in]base_directory
[in]superpixels
int main ( int  argc,
const char **  argv 
)

Optimize parameters for the different algorithms. Usage:

1 $ ../bin/eval_parameter_optimization_cli --help
2 Allowed options:
3  --img-directory arg image directory
4  --gt-directory arg ground truth directory
5  --base-directory arg base directory
6  --algorithm arg algorithm to optimize: reseeds,
7  --depth-directory arg depth directory
8  --intrinsics-directory arg intrinsics directory
9  --matlab-executable arg (=../../MATLAB/R2014b/release/matlab)
10  matlab executable path
11  --java-executable arg (=../../jdk-1.8.0_45/release/java)
12  java executable
13  --not-fair do not use fair parameters
14  --help produce help message
Author
David Stutz

Variable Documentation

std::string FAIR = "-f "

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. 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.
  3. 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.

std::string JAVA_EXECUTABLE = "/home/david/jdk-1.8.0_45/release/java"
std::string MATLAB_EXECUTABLE = "/home/david/MATLAB/R2014b/bin/matlab"
std::string RELATIVE_PATH = "."