Pycamo can generate pixel camo now! Check the box if u want, also i rewrite file save function and Camo generate algorithm too it better now. ENJOY!!
This camouflage pattern generator is based on fractal noise.
The first step is extract 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)
Pycamo can generate 2 type of digital camo: Fractal and pixel.
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=[] |
Passes the predefined ratios for each color to the generate_pattern function. |
pixelize=True/False |
Set True to pixelize camo, False for normal fractal. |
"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.
go to GUI folder
then
python GUI.py
ENJOY!