Skip to content

Commit

Permalink
0.20180203
Browse files Browse the repository at this point in the history
libiio denoise tools
  • Loading branch information
mykaralw committed Feb 3, 2018
1 parent 4419b75 commit 327b1a5
Show file tree
Hide file tree
Showing 86 changed files with 11,026 additions and 2 deletions.
79 changes: 77 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,77 @@
# ipol-tools
IPOL image tools
% IPOL image tools.

# ABOUT

* Author : Nicola Pierazzo <nicolapierazzo@gmail.com>
* Author : Gabriele Facciolo <gfacciol@gmail.com>
* Copyright : (C) 2017 IPOL Image Processing On Line http://www.ipol.im/
* Licence : GPL v3+, see GPLv3.txt
* Based on the 2010 implementation of DCT denoising by:
Guoshen Yu <yu@cmap.polytechnique.fr> and Guillermo Sapiro <guille@umn.edu>
* Latest version available at: https://github.com/zvezdochiot/ipol-tools

# OVERVIEW

This source code provides an algorithm described in the IPOL article: http://www.ipol.im/

# UNIX/LINUX/MAC USER GUIDE

The code is compilable on Unix/Linux and Mac OS.

- Compilation.
Automated compilation requires the Cmake and make.

- Dependencies.
This code requires the libiio (https://github.com/zvezdochiot/libiio).

- Image formats.
Only the PNG, JPEG, and TIFF (float) formats are supported.

-------------------------------------------------------------------------
Usage:
1. Download the library code and extract it. Go to that directory.

```
git clone https://github.com/zvezdochiot/libiio
cd libiio
```

2. Compile the library (on Unix/Linux/Mac OS).

```
ccmake .
cmake .
make
```

3. Install library

```
sudo make install
```

4. Download the code package and extract it. Go to that directory.

```
git clone https://github.com/zvezdochiot/ipol-tools
cd ipol-tools
```

5. Go to utils directory.

5. Compile the source code (on Unix/Linux/Mac OS).
```
ccmake .
cmake .
make
```

To visualize tiff (float) images use PVFLIP (https://github.com/gfacciol/pvflip)
or ImageJ (https://imagej.nih.gov/ij/index.html)


# ABOUT THIS FILE
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
60 changes: 60 additions & 0 deletions denoise/bm3d/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
cmake_minimum_required(VERSION 2.8)
project(da3d)

# The build type "Release" adds some optimizations
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE "Release")
endif ()

# Are we using gcc?
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# GCC on MacOs needs this option to use the clang assembler
if (APPLE)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wa,-q")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-q")
endif ()
# Optimize to the current CPU and enable warnings
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -Wall -Wextra")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra")
endif ()

# Enable C99
if (CMAKE_VERSION VERSION_LESS "3.1")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
else ()
set (CMAKE_C_STANDARD 99)
endif ()

# Enable OpenMP
find_package (OpenMP)
if(OPENMP_FOUND)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
endif()
find_path (IIO_INCLUDE_DIR iio.h)
find_library (IIO_LIBRARIES NAMES iio)
include_directories (SYSTEM ${iio_INCLUDE_DIR})
link_libraries (${IIO_LIBRARIES})
if (NOT IIO_INCLUDE_DIR)
message (FATAL_ERROR "IIO not found.")
endif ()
find_path (FFTW_INCLUDES fftw3.h)
find_library (FFTWF_LIBRARIES NAMES fftw3f)


include_directories (PUBLIC ${EIGEN3_INCLUDE_DIR} PUBLIC ${TIFF_INCLUDE_DIR} PUBLIC ${JPEG_INCLUDE_DIR} PUBLIC ${PNG_INCLUDE_DIRS} PUBLIC ${ALGLIB_INCLUDE_DIR} PUBLIC ${FFTW_INCLUDES})
link_libraries (${TIFF_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${FFTWF_LIBRARIES})

set(SOURCE_FILES
bm3d.h
bm3d.cpp
lib_transforms.h
lib_transforms.cpp
utilities.h
utilities.cpp
main.cpp
)

set_property(SOURCE iio.c PROPERTY COMPILE_FLAGS "-Wno-unused-variable -Wno-unused-parameter -Wno-pointer-sign -Wno-parentheses -Wno-deprecated-declarations -Wno-unused-function")

add_executable(bm3d ${SOURCE_FILES})
Loading

0 comments on commit 327b1a5

Please sign in to comment.