Now you can use Pycamo with a GUI!. Just run GUI.py
and enjoy.
This camouflage pattern generator is based on fractal noise. Below is an overview of its working process:
The first step involves extracting the main colors from an input image.
You can customize the number of colors to extract by modifying the num_colors
parameter. For example:
color_palette = cp.extract_palette("demo_input/k20r.jpg", num_colors=4) # Extract 4 main colors
In this step, fractals are randomly generated within a given frame size and filled with the extracted colors. You can control the parameters to customize the final camouflage pattern.
generate_pattern(color_palette, "gencamo.png", size=(500, 500), c=3)
Follow these steps to use the Camouflage Pattern Generator:
git clone https://github.com/Minhtrna/Pycamo.git
Install library
pip install -r requirements.txt
Then you can run Camogen
python camogen.py
You can edit parameter here
Parameter | Description |
---|---|
color_palette |
A list of colors extracted from an image or defined manually. |
num_colors |
The number of colors to extract from the image using the extract_palette function. |
ratios |
A list of percentages defining how much each color should contribute to the pattern. |
size |
The dimensions of the generated camouflage pattern in pixels (width, height). |
c |
A parameter that controls the complexity of the fractal noise. |
ratios=ratios |
Passes the predefined ratios for each color to the generate_pattern function. |
"demo_input/teste3.png" |
The input image file used to extract colors. |
"gencamo.png" |
The output file name where the generated pattern will be saved. |
To use GUI instead of command.
cd to GUI folder
then
python GUI.py
ENJOY!