Skip to content

thodkatz/non-local-means

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Non-Local Means for Image Denoising using CUDA

Prerequisites

  • Octave/Matlab
  • NVIDIA GPU and CUDA

Usage

$ make <version>

If requirements are fulfilled then in the root directory:

$ octave src/octave/pipeline.m <version name: v0 or v1 or v2> <args>
$ octave src/octave/pipeline.m v0 data/<image_file.jpg> <patch size>
$ octave src/octave/pipeline.m <v1 or v2> data/<image_file.jpg> <patch size> <grid size> <block size>

If requirements are not fulfilled, for CUDA versions v1, v2 we can break the execution in three steps:

octave src/octave/jpg2array.m <image_file.jpg> # create a noised image represented in a 2d array

In a compatible CUDA system (e.g. Google Colab):

$ make <version: v1 or v2>
$ ./bin/<version> data/noise_image.txt <patch size> <grid size> <block size>

Rendering the filtered image:

$ octave src/octave/rendering.m <version>

Validation

In early stages of development, we need to be sure that our CPU implementation in C is working in the same way with a given tested Matlab implementation. So we had the following validation pipeline:

validation

In the current state, we check only for CUDA versions, the filtered values with respect to CPU version. If requirements are fulfilled then for validation check, run the pipeline.m script, passing as a last argument: --debug.

Due to floating point arithmetic and the usage of -use_fast_math compiler flag, different values have been spotted. We assume valid a difference less than 1e-4.

About

Non-Local Means for Image Denoising using CUDA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published