Skip to content

Commit 327b1a5

Browse files
author
mykaralw
committed
0.20180203
libiio denoise tools
1 parent 4419b75 commit 327b1a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+11026
-2
lines changed

README.md

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,77 @@
1-
# ipol-tools
2-
IPOL image tools
1+
% IPOL image tools.
2+
3+
# ABOUT
4+
5+
* Author : Nicola Pierazzo <nicolapierazzo@gmail.com>
6+
* Author : Gabriele Facciolo <gfacciol@gmail.com>
7+
* Copyright : (C) 2017 IPOL Image Processing On Line http://www.ipol.im/
8+
* Licence : GPL v3+, see GPLv3.txt
9+
* Based on the 2010 implementation of DCT denoising by:
10+
Guoshen Yu <yu@cmap.polytechnique.fr> and Guillermo Sapiro <guille@umn.edu>
11+
* Latest version available at: https://github.com/zvezdochiot/ipol-tools
12+
13+
# OVERVIEW
14+
15+
This source code provides an algorithm described in the IPOL article: http://www.ipol.im/
16+
17+
# UNIX/LINUX/MAC USER GUIDE
18+
19+
The code is compilable on Unix/Linux and Mac OS.
20+
21+
- Compilation.
22+
Automated compilation requires the Cmake and make.
23+
24+
- Dependencies.
25+
This code requires the libiio (https://github.com/zvezdochiot/libiio).
26+
27+
- Image formats.
28+
Only the PNG, JPEG, and TIFF (float) formats are supported.
29+
30+
-------------------------------------------------------------------------
31+
Usage:
32+
1. Download the library code and extract it. Go to that directory.
33+
34+
```
35+
git clone https://github.com/zvezdochiot/libiio
36+
cd libiio
37+
```
38+
39+
2. Compile the library (on Unix/Linux/Mac OS).
40+
41+
```
42+
ccmake .
43+
cmake .
44+
make
45+
```
46+
47+
3. Install library
48+
49+
```
50+
sudo make install
51+
```
52+
53+
4. Download the code package and extract it. Go to that directory.
54+
55+
```
56+
git clone https://github.com/zvezdochiot/ipol-tools
57+
cd ipol-tools
58+
```
59+
60+
5. Go to utils directory.
61+
62+
5. Compile the source code (on Unix/Linux/Mac OS).
63+
```
64+
ccmake .
65+
cmake .
66+
make
67+
```
68+
69+
To visualize tiff (float) images use PVFLIP (https://github.com/gfacciol/pvflip)
70+
or ImageJ (https://imagej.nih.gov/ij/index.html)
71+
72+
73+
# ABOUT THIS FILE
74+
Copying and distribution of this file, with or without modification,
75+
are permitted in any medium without royalty provided the copyright
76+
notice and this notice are preserved. This file is offered as-is,
77+
without any warranty.

denoise/bm3d/CMakeLists.txt

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
project(da3d)
3+
4+
# The build type "Release" adds some optimizations
5+
if (NOT CMAKE_BUILD_TYPE)
6+
set (CMAKE_BUILD_TYPE "Release")
7+
endif ()
8+
9+
# Are we using gcc?
10+
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
11+
# GCC on MacOs needs this option to use the clang assembler
12+
if (APPLE)
13+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wa,-q")
14+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-q")
15+
endif ()
16+
# Optimize to the current CPU and enable warnings
17+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -Wall -Wextra")
18+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra")
19+
endif ()
20+
21+
# Enable C99
22+
if (CMAKE_VERSION VERSION_LESS "3.1")
23+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
24+
else ()
25+
set (CMAKE_C_STANDARD 99)
26+
endif ()
27+
28+
# Enable OpenMP
29+
find_package (OpenMP)
30+
if(OPENMP_FOUND)
31+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
32+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
33+
endif()
34+
find_path (IIO_INCLUDE_DIR iio.h)
35+
find_library (IIO_LIBRARIES NAMES iio)
36+
include_directories (SYSTEM ${iio_INCLUDE_DIR})
37+
link_libraries (${IIO_LIBRARIES})
38+
if (NOT IIO_INCLUDE_DIR)
39+
message (FATAL_ERROR "IIO not found.")
40+
endif ()
41+
find_path (FFTW_INCLUDES fftw3.h)
42+
find_library (FFTWF_LIBRARIES NAMES fftw3f)
43+
44+
45+
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})
46+
link_libraries (${TIFF_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${FFTWF_LIBRARIES})
47+
48+
set(SOURCE_FILES
49+
bm3d.h
50+
bm3d.cpp
51+
lib_transforms.h
52+
lib_transforms.cpp
53+
utilities.h
54+
utilities.cpp
55+
main.cpp
56+
)
57+
58+
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")
59+
60+
add_executable(bm3d ${SOURCE_FILES})

0 commit comments

Comments
 (0)