Skip to content

Hybrid images combine the low-frequency blurred components of one image with the high-frequency sharp details of another. The perception of the image changes based on the viewing distance, exploiting how the human visual system processes spatial frequencies.

Notifications You must be signed in to change notification settings

saba-khan441/saba-khan441-Hybrid-images-CV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid-Images_CV

1 Hybrid Image Generator

This repository provides a Python-based implementation for generating hybrid images, where the low-frequency details of one image are merged with the high-frequency elements of another, creating a fascinating visual effect. The project utilizes OpenCV for image processing and is optimized for execution in Google Colab.

2 Features

1 Creating Low-Frequency Images: Applies a Gaussian blur to smooth the image and generate its low-frequency representation.

2 Building Hybrid Images: Combines the low-frequency components of one image with the high-frequency features of another to create a hybrid image.

3 Extracting High-Frequency Details: Isolates the fine details of an image by subtracting the blurred version from the original.

4 Display Functionality: Uses cv2_imshow in Google Colab to display the processed images directly.

5 File Saving: Saves the resulting low-frequency, high-frequency, and hybrid images as .jpg files for later use.

3 Usage

1 Clone the repository or copy the script.

2 Replace the paths to your images in the script:

              image1_path = '/path/to/image1.png' # Replace with the first image path  
              
              image2_path = '/path/to/image2.png' # Replace with the second image path  

_3 Execute the script in Google Colab or any Python environment with OpenCV installed.

4 The following output files will be created:

        low_freq_image.jpg
        
        high_freq_image.jpg
        
        hybrid_image.jpg

Requirements

1 Python 3.x

2 OpenCV

3 NumPy

4 Google Colab (optional but recommended for better visualization)

About

Hybrid images combine the low-frequency blurred components of one image with the high-frequency sharp details of another. The perception of the image changes based on the viewing distance, exploiting how the human visual system processes spatial frequencies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published