The Image Generator web app is designed to facilitate the generation of images with the same pattern but different colors. Users can upload a single image representing a pattern and another image showcasing various colors for that pattern. The app then processes these images to create new versions with the same pattern but different color schemes. This documentation outlines the key aspects of the project, its functionality, and implementation details.
The following external libraries and frameworks are utilized in the project:
- Flask 3.0.1
- Werkzeug 3.0.1
- OpenCV (cv2) 4.9.0.8
- NumPy 1.26.3
- scikit-image 0.22.0
- Bootstrap 4.3.1
To run the Image Generator web app locally, follow these instructions:
cd desktop\{Folder Name that you created}
git clone https://github.com/recursivezero/startup/tree/feature/RZ-240004
cd startup-feature-RZ-240004\startup-feature-RZ-240004\server\Image_generator\scripts
pip install Flask Werkzeug opencv-python numpy scikit-image
python app.py
The app should now be running locally. Open a web browser and navigate to http://localhost:5000/ to access the Image Generator web app.
Users can upload two images - one representing a single pattern and another displaying the same pattern with various colors. The supported image formats include JPG, JPEG, and PNG.
Upon successful upload, users can click the "Generate" button to create new images with the same pattern but different colors. The color variations are extracted from the group image. Thumbnails of the generated images are displayed for the user.
The server-side implementation is handled by the Flask web framework. Image processing is done using OpenCV and NumPy. The app provides functionality to find the dominant color of a single pattern image, change the hue of the single pattern image based on colors extracted from the group image, and save the generated images.
The implementation in app.py involves the following key components:
While the current version of the Image Generator web app successfully changes the hue of the pattern, future enhancements could include:
In conclusion, the Image Generator web app successfully addresses the user's requirement of generating images with the same pattern but different colors. The documentation provides an overview of the app's features, dependencies, and implementation. Future enhancements can further improve the app's functionality and user experience.