Giter VIP home page Giter VIP logo

otb-sirius's Introduction

OTB Frequency Resample Module

This standalone OTB module is a wrapper of the Sirius library. It provides an image to image filter which resamples an image in the frequency domain. This filter is packaged in the application FrequencyResample.

Overview

How to build

This module is using CMake to build its libraries and executables.

Requirements

Dependencies

OTB Frequency Resample Module depends on the Sirius library. In order to find the library using CMake find_package helper, SIRIUS_ROOT must be set to a Sirius install directory.

Build as standalone module

This OTB module can be built outside the OTB project as a standalone module. It only requires an OTB build tree (e.g. SuperBuild generation).

Options

  • CMAKE_BUILD_TYPE: Debug, Release, RelWithDebInfo and MinSizeRel
  • SIRIUS_ROOT: path to Sirius install directory
  • OTB_BUILD_MODULE_AS_STANDALONE: set to ON to build FrequencyResample as a standalone module
  • OTB_DIR: path to the OTB build tree CMake directory
  • BUILD_TESTING: set to ON to enable tests

Example

git clone https://github.com/CS-SI/OTB-SIRIUS.git
mkdir .build
cd .build
cmake .. -DCMAKE_BUILD_TYPE=Release \
         -DSIRIUS_ROOT=/path/to/Sirius/install/directory \
         -DOTB_BUILD_MODULE_AS_STANDALONE=ON \
         -DOTB_DIR=/path/to/OTB/SDK/lib/cmake/OTB-x.y \
         -DBUILD_TESTING=ON
cmake --build . --target FrequencyResample-all

Local build of the remote module

This module can also be built inside the OTB project (cf. OTB documentation).

Options

  • Module_FrequencyResample: set to ON to activate FrequencyResample remote module
  • SIRIUS_ROOT: path to Sirius install directory

Example

git clone https://github.com/CS-SI/OTB-SIRIUS.git FrequencyResample
cp -r FrequencyResample /path/to/OTB/Modules/Remote
cd /path/to/OTB/build/directory
cmake /path/to/OTB -DModule_FrequencyResample=ON -DSIRIUS_ROOT=/path/to/Sirius/install/directory
cmake --build . --target FrequencyResample-all

How to use

Host requirements

FrequencyResample application

The following example will zoom in /path/to/input/image.tif by 2, apply the filter /path/to/filter/image.tif to the resampled image and write the output into /path/to/output/image.tif.

# CWD is the OTB build directory
./bin/otbcli_FrequencyResample \
    -in /path/to/input/image.tif \
    -out /path/to/output/image.tif \
    -resampling.ratio 2:1 \
    -filter.path /path/to/filter/image.tif

API

The following code is a boilerplate to create and initialize the FrequencyResampleFilter component.

#include "otbFrequencyResampleFilter.h"

using FilterType = otb::FrequencyResampleFilter<DoubleImageType>;

// initialization parameters
sirius::ZoomRatio zoom_ratio(2, 1);

sirius::Image filter_image = {...};
sirius::Filter freq_filter = sirius::Filter::Create(filter_image, zoom_ratio);

sirius::ImageDecompositionPolicies image_decomposition =
      sirius::ImageDecompositionPolicies::kRegular;
sirius::FrequencyZoomStrategies zoom_strategy =
      sirius::FrequencyZoomStrategies::kPeriodization;

FilterType::Pointer i2i_filter = FilterType::New();

// init filter
i2i_filter->Init(zoom_ratio, std::move(freq_filter),
                 image_decomposition, zoom_strategy);

i2i_filter->SetInput(...);

otb-sirius's People

Contributors

hlysunnaram avatar mbelloc avatar savmickael avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

otb-sirius's Issues

Integrate official OTB remote module list

OTB-Sirius has been design as a remote module of OTB.
The next step is to integrate the list of official module of OTB in order to be integrated in a future release.
The process is described [here] https://wiki.orfeo-toolbox.org/index.php/Remote_Modules ๐Ÿ‘

  • Remote module source code should be hosted on a publicly available Git repository
  • Author of the remote module should be identified and registered to otb-developers mailing list
  • Author of the remote module accepts to be contacted by developers or users regarding issues with his module (on a best effort basis),
  • Remote module source code should comply with OTB style as much as possible,
  • Remote module source code should be documented using doxygen tags,
  • Remote module should provide a minimal set of tests to ensure build of template code and basic non-regression testing,
  • Remote module should come with a form of documentation (website, publication, readme file ...)
  • Remote module should not embed code from any third party software (unless strong arguments are given by the author, in which case an exception can be made),
  • Remote module should avoid depending on new third parties if possible,
  • Remote module author should be the copyright owner and comply with licences of any third party, which in turn should comply with terms of OTB licence (to be reviewed by PSC)
  • Author of remote module should provide a small description of the remote module to be added on OTB website.

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.