This repository contains a Python implementation for creating hybrid images, where low-frequency components of one image are combined with the high-frequency components of another to produce an interesting visual effect. The project uses OpenCV for image processing and is intended to be run in Google Colab.
i) Low-Frequency Image Generation: Applies Gaussian blur to create the low-frequency version of an image.
ii) High-Frequency Image Generation: Subtracts a blurred version from the original to isolate high-frequency details.
iii) Hybrid Image Creation: Combines the low-frequency and high-frequency images to produce a single hybrid image.
iv) Visualization: Displays the generated images in Google Colab using cv2_imshow.
v) File Output: Saves the low-frequency, high-frequency, and hybrid images as .jpg files.
-
Clone the repository or copy the code.
-
Provide the paths to your images by replacing:
boy_image_path = '/path/to/image1.png' # Replace with the first image path
girl_image_path = '/path/to/image2.png' # Replace with the second image path
-
Run the code in Google Colab or any Python environment with OpenCV installed.
-
The script will output:
low_freq_image.jpg
high_freq_image.jpg
hybrid_image.jpg
o Python 3.x
o OpenCV
o NumPy
o Google Colab (optional, but preferred for displaying images)