Skip to content

CristianAsprilla/Image-Deblurring-Project

Repository files navigation

Image-Deblurring-Project

Notes of how uses the repository:

  1. Clone the repository
  2. Install dependencies using pip install -r requirements.txt or conda install --file requirements.txt
  3. If you have Scipy, Numpy, Matplotlib, and OpenCV (for converting images to grayscale and generate matrix requires) installed, you can run the code without installing the dependencies, but it is recommended to install the dependencies to avoid any errors
  4. Run the code using python main.py or python3 main.py
  5. You can use any IDE to run the code, instead of using the terminal.
  6. The code will generate the deblurred image and display it in a window, and be saved in the same directory as the code, but if you change the images, it will replace the old image with the new one.
  7. You can change the image by changing the image path in the code.
  8. Project_with_new_images.py will be used to apply the process to the images generated by convertImages.py
  9. To get the images for the only example given by the book, run Project.py
  10. If you prefer only save images intead of be shown in a window, you can comment the lines plt.show().
  11. Adjust the p, alpha,factor, or n values to get different results. Some comments in the code will help you to understand the code.

Mona Lisa Images:

Original Image and Blurred Image:

Original Image Blurred Image

Tikhnov Regularization:

Tikhonov alpa=0.5 Tikhonov alpa=0.25 Tikhonov alpa=0.03125 Tikhonov alpa=0.00390625 Tikhonov alpa=0.0009765625

TSVD:

TSVD p=100 TSVD p=1150 TSVD p=2900 TSVD p=3600

Language and libraries used:

  • Python - Python is a popular and versatile programming language known for its readability and beginner-friendliness. It's a general-purpose language used for tasks like web development, data analysis, and automation. Think of it as a powerful tool with a clear and easy-to-learn instruction set.
  • Numpy - NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.
  • Scipy - SciPy is a free and open-source Python library used for scientific and technical computing. It is a collection of mathematical algorithms and convenience functions built on the NumPy extension of Python.
  • Matplotlib - Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK.
  • OpenCV - OpenCV (Open Source Computer Vision Library) is an open-source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in commercial products.

About

Image Deblurring Project: Restore clarity to blurry images. Using Tikhonov Regularization and TSVD

Resources

Stars

Watchers

Forks

Languages