I recently finished a programming project in the Processing programming environment, which I just started learning this semester. I created a program which will analyze any image file, and spit out a tile-able swatch of camouflage based upon it.

The program selects 5 predominant colors from the image, weights them, and creates a background of color, and a number of colored blobs, whose size is determined by the prevalence of their color in the original image. The complexity of the blobs is determined by complexity of the contours in the image, and the transparency is determined by the range of colors represented in the image (this way, low-contrast images render “blurry” patterns).

The results aren’t extremely consistent, but pretty interesting nonetheless. Below are displayed several original images (scraped from google), each followed by a few swatches of camouflage produced by the program (which outputs square pdfs). I used landscape-type images, because they are a logical choice for camouflage, but as you can see by the last example, the program can be used to intriguing effect with any source image.

Source Image:

desert

Procedurally Generated Swatches:

desertcam1

desertcam2

desertcam3

Source Image:

forest

Procedurally Generated Swatches:

forestcam1

forestcam2

forestcam3

Source Image:

snow

Procedurally Generated Swatches:

snowcam1

snowcam2

snowcam3

Source Image:

face

Procedurally Generated Swatches:
facecam1

facecam2

facecam3



2 Responses to “procedural camouflage”  

  1. 1 ROd

    Is there a way to determine how well a camo pattern blends into the background? I seem to like your last source the most, haha, (I wonder why)

  2. Very interesting. It reminds me of some of the Photoshop filters called cutout…


Leave a Reply