A desktop application designed for composing images by combining Fourier Transform components, Mag and Phase
or Real and Imaginary
depending on the mode, from other images. It provides a user-friendly interface to load images, select rectangular regions from them, and adjust the weight of each region using sliders, ultimately mixing these components in threads and applying inverse Fourier Transform to get the output image.
The application boasts an intuitive GUI with the following components:
- Image Viewports: Display images loaded into the application.
- FT Viewports: Visualize the selected Fourier Transform components of the loaded images.
- Output Viewports: Display the mixed and processed images.
Users can load images (in formats such as PNG, JPG, JPEG, and JFIF) into the application. The "Browse" option in each Image Viewport allows users to select images for processing.
The application processes the loaded images to generate Fourier Transform components. Users can visualize these components in the FT Viewports, serving as the basis for the mixing operations.
User can choose the mode of mixing, whether it is Mag and Phase
or Real and Imaginary
. This modes will ensure that the mixing process is valid under any circumstances.
Adjustable sliders enable users to fine-tune mixing parameters, including weights assigned to each selected FT component. This provides control over the contribution of each component to the final mixed image.
Users can interactively select rectangular region from the FT component of each image for mixing, where this region of interest can be the inner or outer with respect to the rectangular region depending on the user's choice. The application provides functionality to extract and manipulate specific regions, enhancing user control over the mixing process.
Users can adjust the brightness and contrast of images using mouse interactions. This feature adds another control manner over the selected regions besides the weight sliders.
The application employs multithreading to efficiently mix the selected regions, enhancing performance and responsiveness.
-
Run the Application:
- Execute the application script to launch the GUI.
-
Load Images:
- Double click on any input Image Viewport or use the "Browse" option to load images.
-
Adjust Parameters:
- Interactively adjust brightness and contrast for better visualization via right-click on the mouse and drag horizontally (Brightness) and vertically (Contrast).
-
Choose Mixing Mode:
- Choose between
Mag and phase
orReal and Imaginary
modes.
- Choose between
-
Choose Components of Interest:
- Choose the component of interest for each image from the combo box of each FT Viewport.
-
Choose Mode of extraction:
- Choose whether you will be interested in the inner or outer part of the rectangular region.
-
Select Regions of Interest (Optional):
- Choose the rectangular region of interest within each FT Viewport, simply initiate the process by left-clicking on the FT viewport. Continue by holding down the left mouse button and dragging the cursor to define the desired rectangular region. The size of the rectangle will be generalized for the rest FT components, with capability of moving such rectangle around within each FT Viewport.
-
Mix Images:
- Click the "Mix" button to initiate the image mixing process.
-
View Output:
- The mixed image is displayed in the chosen output Viewport.
The project utilizes the following libraries:
- PyQt6: For GUI development.
- NumPy: For numerical operations.
- PIL (Pillow): For image processing.
- scipy: For FFT (Fast Fourier Transform) operations.
The application logs events and errors to a file named our_log.log
. Refer to this log file for detailed information on application activities.
For additional details on the code structure and implementation, refer to the source code in the provided Python script.
Feel free to explore and experiment with the Image Mixer project!
Demo.mp4
- Install the required dependencies using
pip install -r requirements.txt
- Run the application using
python main.py
Mohamed Elsayed Eid |
Mohamed Mosilhy |
Mahmoud Magdy |
Youssef Ahmed |