[ITK] Some Troubles with the itkPatchBasedDenoisingImageFilter

Andreas Klos aklos at outlook.de
Tue Apr 19 14:55:17 EDT 2016


Hi Dženan and Kris; 
First of all thank you both for the fast and helpfully reply!
 
Now I have tried more iterations an it seems to work fine. And when I checked my result with just 1 iteration, I really recognized some very lil changes of the image like  Dženan  has predicted to me. But I have still two more questions. If I do not define any subsamples, will the algorithm perform the comparison for each pixel through the whole image? 
 
And the second question which arises is, when I checked the doxygen documentation for the itkPatchBasedDenoisingImageFilter it is said, that the methods of the filter stem on the following sources:
 
http://www.itk.org/Doxygen/html/classitk_1_1PatchBasedDenoisingImageFilter.html
 
"Suyash P. Awate, Ross T. Whitaker. Unsupervised, Information-Theoretic, Adaptive Image Filtering for Image Restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2006; 28(3):364-376."
 
"Suyash P. Awate, Ross T. Whitaker. Higher-Order Image Statistics for Unsupervised, Information-Theoretic, Adaptive, Image Filtering. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):44-51."
 
And the documentation of the base class (itkPatchBasedDenoisingBaseImageFilter) of this filter says that the methods stems on the following sources:
 
http://www.itk.org/Doxygen/html/classitk_1_1PatchBasedDenoisingBaseImageFilter.html
"
Suyash P. Awate, Ross T. Whitaker. Higher-Order Image Statistics for Unsupervised, Information-Theoretic, Adaptive, Image Filtering. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):44-51.
 
Antoni Buades, Bartomeu Coll, Jean-Michel Morel. A Non-Local Algorithm for Image Denoising. IEEE Int. Conf. Computer Vision and Pattern Recognition (CVPR) 2005; (2):60-65.
 
While the former work considers the denoising algorithm as performing entropy reduction using nonparametric density estimation, the latter work treats it as nonparametric regression. Details underlying this class of methods appear in:
 
Suyash P. Awate, Ross T. Whitaker. Unsupervised, Information-Theoretic, Adaptive Image Filtering for Image Restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI) 2006; 28(3):364-376.
Antoni Buades, Bartomeu Coll, Jean-Michel Morel. Nonlocal Image and Movie Denoising. International Journal of Computer Vision (IJCV) 2008; 76(2):123-139."
 
Now I am asking my self which algorithm is used for the methods in the base class? The entropy minimizing algorithm or the "normal" non-local means filter proposed in the "A Non-Local Algorithm for Image Denoising" ?  
 
From: dzenanz at gmail.com
Date: Tue, 19 Apr 2016 12:47:50 -0400
Subject: Re: [ITK] Some Troubles with the itkPatchBasedDenoisingImageFilter
To: aklos at outlook.de
CC: community at itk.org

Hi Andreas,
I can confirm that this filter is slow (even in release mode). However, the output is not the same as input, there are some slight differences (e.g. input value 248 for some pixel turns into 249). Not all pixels get changed with the test image I used. The code I used is attached.
Regards
On Mon, Apr 18, 2016 at 6:18 PM, Andreas Klos <aklos at outlook.de> wrote:



Dear great ITK- Community,
Currently I am struggeling with the "itkPatchBasedDenoisingImageFilter". I try to use this filter but it does not work for me at the moment. I try to process a 16bit dicom Image with this denoising filter. 
 
Currently when i try to apply this filter my computer seems to be very busy for several minutes. But the result of the computation is the same like the original data. As if there where no processing step performed on the image.
 
So the question is, do I have to downsample my image to 8 bit image? or do I have to do a special weigthing when I work with 16 bit images? Or is there something special which I should consider when I use this filter?

Because there is no real example about this filter I also have some questions on how to configure this filter to use it in an efficient way. 
When I took a look in the doxygen of itk about this filter I read this sentence "It implements schemes for random sampling of patches non-locally (from the entire image)...". Do I understand it right that I can use subsamples of an image to create a searchwindow to reduce the computational time? 

It would be very greatful if someone can help me to get a clear mind about this filter and how to apply it correctly.

Below is my current not really satisfying code where I try to determine my search window and the patch size.
 
Best Regards,
Andreas
	
typedef itk::Image<PixelType, 2> ImageType2D;
 
typedef itk::PatchBasedDenoisingImageFilter<ImageType2D, ImageType2D> PatchBasedDenoisingFilterType;


	typedef itk::Statistics::GaussianRandomSpatialNeighborSubsampler<PatchBasedDenoisingFilterType::PatchSampleType, ImageType2D::RegionType> SamplerType;
 
	PatchBasedDenoisingFilterType::Pointer denoisingImageFilter= PatchBasedDenoisingFilterType::New();


	SamplerType::Pointer sampler = SamplerType::New();
 
//The value for the patchRadius is provided by the user through a GUI
	double dataArray[1];


	dataArray[0] = _patchSize;
 
itk::Array<double> dArray;
	
dArray.SetData(dataArray);
	denoisingImageFilter->SetInput(inputImage);


//Here I set my PatchRadius. my default value is 7 
	denoisingImageFilter->SetPatchRadius(dArray[0]);
 


//Here I try to define a searchwindow to reduce the computational time 
	sampler->SetRadius(21);


	denoisingImageFilter->SetSampler(sampler);


	try{


		denoisingImageFilter->Update();


	}


	catch (itk::ExceptionObject error){


		std::cerr << "An ExceptionObject was caught!" << std::endl;


		std::cerr << error << std::endl;


	}
 
 
 
 		 	   		  

_______________________________________________

Community mailing list

Community at itk.org

http://public.kitware.com/mailman/listinfo/community



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160419/896c6e0e/attachment-0001.html>


More information about the Community mailing list