Code Monkey home page Code Monkey logo

lsobia's Introduction

LSOBIA

OTB Module providing Large Scale Object Based Image Analysis functionalities.

Dependencies

  • OTB
  • MPI (developped and validated with mpich-3.2)

How to build it

LSOBIA can be built like any other otb remote module You can build it either from within OTB's sources or outside it.

How to use it

LSSegmentation

Parameters

LSOBIA provides an OTBApplication, LSSegmentation (Large Scale Segmentation).

Parameters: 
        -progress                          <boolean>        Report progress 
        -io.im                             <string>         Input image path  (mandatory)
        -io.out.dir                        <string>         Output directory  (mandatory)
        -io.out.labelimage                 <string>         Label Image Name  (optional, off by default)
        -io.temp                           <string>         Directory used for temporary data  (mandatory)
        -algorithm                         <string>         Segmentation algorithm name [baatz/meanshift] (mandatory, default value is baatz)
        -algorithm.baatz.numitfirstpartial <int32>          Number of iterations for first partial segmentation  (optional, on by default, default value is 1)
        -algorithm.baatz.numitpartial      <int32>          Number of iterations for partial segmentation  (optional, on by default, default value is 1)
        -algorithm.baatz.stopping          <float>          Value for stopping criterion  (optional, on by default, default value is 40)
        -algorithm.baatz.spectralweight    <float>          Value for spectral weight  (optional, on by default, default value is 0.05)
        -algorithm.baatz.geomweight        <float>          Value for geometric (shape) weight  (optional, on by default, default value is 0.95)
        -algorithm.baatz.aggregategraphs   <string>         Aggregation of graph traces [on/off] (optional, off by default, default value is on)
        -algorithm.meanshift.maxiter       <int32>          max number of iterations  (mandatory)
        -algorithm.meanshift.spatialr      <float>          Spatial bandwidth  (optional, off by default)
        -algorithm.meanshift.spectralr     <float>          Spectral bandwidth  (optional, off by default)
        -algorithm.meanshift.threshold     <float>          Threshold  (optional, off by default)
        -algorithm.meanshift.ranger        <float>          Spectral range ramp  (optional, off by default)
        -algorithm.meanshift.modesearch    <string>         Activation of search mode [on/off] (optional, off by default, default value is on)
        -processing.memory                 <int32>          Maximum memory to be used on the main node  (mandatory)
        -processing.maxtilesizex           <int32>          Maximum size of tiles along x axis  (mandatory)
        -processing.maxtilesizey           <int32>          Maximum size of tiles along x axis  (mandatory)
        -processing.writeimages            <string>         Activation of image traces [on/off] (mandatory, default value is on)
        -processing.writegraphs            <string>         Activation of graph traces [on/off] (mandatory, default value is on)
        -inxml                             <string>         Load otb application from xml file  (optional, off by default)

Monoprocessor execution

  otbcli_LSSegmentation "-io.im" "${INPUT_IMAGE}" "-io.out.dir" "${OUTPUT_DIRECTORY}" -io.out.labelimage "LabelImage" "-io.temp" "${TEMP}" "-algorithm" "baatz" "-algorithm.baatz.numitfirstpartial" "5" "-algorithm.baatz.numitpartial" "5" "-algorithm.baatz.stopping" "40" "-algorithm.baatz.spectralweight" "0.5" "-algorithm.baatz.geomweight" "0.5" "-algorithm.baatz.aggregategraphs" "on" "-processing.writeimages" "on" "-processing.writegraphs" "on" "-processing.memory" "2000" "-processing.maxtilesizex" "1000" "-processing.maxtilesizey" "1000"

Multiprocessor execution

Simply add mpirun -np ${NUM_PROC}

  mpirun -np 4 otbcli_LSSegmentation "-io.im" "${INPUT_IMAGE}" "-io.out" "${OUTPUT_DIRECTORY}" -io.out.labelimage "LabelImage" "-io.temp" "${TEMP}" "-algorithm" "baatz" "-algorithm.baatz.numitfirstpartial" "5" "-algorithm.baatz.numitpartial" "5" "-algorithm.baatz.stopping" "40" "-algorithm.baatz.spectralweight" "0.5" "-algorithm.baatz.geomweight" "0.5" "-algorithm.baatz.aggregategraphs" "on" "-processing.writeimages" "on" "-processing.writegraphs" "on" "-processing.memory" "2000" "-processing.maxtilesizex" "250" "-processing.maxtilesizey" "250"

This produces an image output containing labels of the Baatz Segmentation algorithm.

LSSmallRegionMerging

Other binaries

You can find useful application and binaries execution examples in the unitary tests. To enable these tests, simply build the module with BUILD_TESTING=ON.

Output Samples

Baatz segmentation

The next image is obtained with the previous Monoprocessor command ran on a sample image

input file : baatz-segmentation

TODO

  • Implement an application for small region merging algorithms
  • Implement an application for polygon simplification

Licence

Please see the license for legal issues on the use of the software.

lsobia's People

Contributors

armallen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.