CUDA/C++ programming - image proccessing - inverse convolution
Budget: $30 – $250 USD
This is a short, relatively simple project (BSc – image processing). The task is to write a CUDA code for an image processing task. (I ONLY NEED THE WORKING CODE!) The goal is to take a blurry image (input) and, using CUDA (parallel programming), apply inverse convolution to obtain a sharper image (output).
You need to read two files. Both files can be regular image files (png, jpeg, etc.) or FITS (fts) files. Additionally, both files can be grayscale or colored. (The first file will contain a large image, while the second file will contain a small kernel (point spread function).) You must perform an inverse convolution process between the two files using Fourier transformation (with CUDA) and display the result (and, if necessary, save it in the original size).
With inverse convolution, we enhance/sharpen the image since one of the input files will be a blurry image, and the second input file will be a point spread function (psf)/kernel. For simple inverse convolution (using CUDA-cufft), both images must be Fourier transformed. The two Fourier-transformed images should be divided (with epsilon, Wiener deconvolution) and then apply the inverse Fourier transformation to the result. Finally, the result image should be displayed and/or saved in its original size.
*It would be good to display the intermediate results (the input images, etc.).
What I’m working with:
- Windows 10
- Visual Studio 2019 Community - CUDA runtime project
The following are implemented in my project:
- CUDA 11.3
- OpenCV 4.5.2
- zlib 1.3.1
- cfitsio 4.4.0
For implementation, I used CMake and followed this tutorial:
"https://www.youtube.com/watch?v=-GY2gT2umpk&t=686s"
Notes:
- I think this covers everything needed for the task.
- The key is to obtain a sharper image than the original input (using Fourier and inverse Fourier transformation with CUDA).
- It may be important to use these specific versions, as the key is that the final code runs on my machine (in my environment as well).
- (Since it's crucial that the code works on my machine, don’t use any unnecessary header files – keep it as simple as possible.)
- (Both input files’ dimensions should be a power of two, as the operation only works correctly under this condition (theoretically) (64, 128, 1024, etc.)).
- It's also important that the program works regardless of the file/image size.
You need to read two files. Both files can be regular image files (png, jpeg, etc.) or FITS (fts) files. Additionally, both files can be grayscale or colored. (The first file will contain a large image, while the second file will contain a small kernel (point spread function).) You must perform an inverse convolution process between the two files using Fourier transformation (with CUDA) and display the result (and, if necessary, save it in the original size).
With inverse convolution, we enhance/sharpen the image since one of the input files will be a blurry image, and the second input file will be a point spread function (psf)/kernel. For simple inverse convolution (using CUDA-cufft), both images must be Fourier transformed. The two Fourier-transformed images should be divided (with epsilon, Wiener deconvolution) and then apply the inverse Fourier transformation to the result. Finally, the result image should be displayed and/or saved in its original size.
*It would be good to display the intermediate results (the input images, etc.).
What I’m working with:
- Windows 10
- Visual Studio 2019 Community - CUDA runtime project
The following are implemented in my project:
- CUDA 11.3
- OpenCV 4.5.2
- zlib 1.3.1
- cfitsio 4.4.0
For implementation, I used CMake and followed this tutorial:
"https://www.youtube.com/watch?v=-GY2gT2umpk&t=686s"
Notes:
- I think this covers everything needed for the task.
- The key is to obtain a sharper image than the original input (using Fourier and inverse Fourier transformation with CUDA).
- It may be important to use these specific versions, as the key is that the final code runs on my machine (in my environment as well).
- (Since it's crucial that the code works on my machine, don’t use any unnecessary header files – keep it as simple as possible.)
- (Both input files’ dimensions should be a power of two, as the operation only works correctly under this condition (theoretically) (64, 128, 1024, etc.)).
- It's also important that the program works regardless of the file/image size.