# Allow to use denoise algorithm for floating point image

**URL:** https://forum.opencv.org/t/allow-to-use-denoise-algorithm-for-floating-point-image/5418
**Category:** C++
**Created:** [September 30, 2021, 8:24am UTC](https://forum.opencv.org/t/allow-to-use-denoise-algorithm-for-floating-point-image/5418 "2021-09-30T08:24:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Cyril\_Richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/cyril_richard/32/1024_2.png) [@Cyril\_Richard](https://forum.opencv.org/u/Cyril_Richard)
#### Post date: [September 30, 2021, 8:24am UTC](https://forum.opencv.org/t/allow-to-use-denoise-algorithm-for-floating-point-image/5418/1 "2021-09-30T08:24:25Z")

</div>

Hello.  
I’m using opencv library for my astrophotography software. What I have to say is that this library is really good.  
However, in astrophotography we work on 32bits images.  
So far, opencv algorithms for denoising purposes cannot be used on these images and that’s a pity.  
Do you think it would be possible you guys you implement this feature? I don’t think it would be difficult for the those knowing the code (I hope).  
Is it the best place to ask for it, or should I open a github ticket?

My best regards,

---

<div class="post-metadata">

### Author: ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)
#### Post date: [September 30, 2021, 12:56pm UTC](https://forum.opencv.org/t/allow-to-use-denoise-algorithm-for-floating-point-image/5418/2 "2021-09-30T12:56:27Z")

</div>

better open an issue on the github (also search for existing issues first).

issues and pull requests on github are where such things are organized. once it’s an issue, someone might come along and pick it up.

---

<div class="post-metadata">

### Author: ![Cyril\_Richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/cyril_richard/32/1024_2.png) [@Cyril\_Richard](https://forum.opencv.org/u/Cyril_Richard)
#### Post date: [September 30, 2021, 1:15pm UTC](https://forum.opencv.org/t/allow-to-use-denoise-algorithm-for-floating-point-image/5418/3 "2021-09-30T13:15:11Z")

</div>

Hello,  
Will do it. Thanks.

---

<div class="post-metadata">

### Author: ![mshabunin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/mshabunin/32/15_2.png) [@mshabunin](https://forum.opencv.org/u/mshabunin)
#### Post date: [September 30, 2021, 6:30pm UTC](https://forum.opencv.org/t/allow-to-use-denoise-algorithm-for-floating-point-image/5418/4 "2021-09-30T18:30:18Z")

</div>

There is DCT denoising algorithm in the opencv\_contrib repository. It works with FP32 images: [opencv\_contrib/dct\_image\_denoising.cpp at master · opencv/opencv\_contrib · GitHub](https://github.com/opencv/opencv_contrib/blob/master/modules/xphoto/src/dct_image_denoising.cpp#L165-L182)

Not sure whether it is acceptable for your use-case: [IPOL Journal · DCT Image Denoising: a Simple and Effective Image Denoising Algorithm](https://www.ipol.im/pub/art/2011/ys-dct/)

---

<div class="post-metadata">

### Author: ![Cyril\_Richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/cyril_richard/32/1024_2.png) [@Cyril\_Richard](https://forum.opencv.org/u/Cyril_Richard)
#### Post date: [September 30, 2021, 7:09pm UTC](https://forum.opencv.org/t/allow-to-use-denoise-algorithm-for-floating-point-image/5418/5 "2021-09-30T19:09:22Z")

</div>

Yes, I’ve found this algorithm thx.  
`void dctDenoising(const Mat &src, Mat &dst, const double sigma, const int psize)`  
I don’t know if it fits my use-case. I need to test.  
It looks like it is slow at first approach and psize must me as small as possible.

Need to test.
