These challenges involve processing pre-existing image files, by altering them in some way, gathering statistics, or other image processing tasks.

learn more… | top users | synonyms

6
votes
2answers
220 views

Remove the mininum sum seam from an array

The seam carving algorithm, or a more complex version of it, is used for content-aware image resizing in various graphics programs and libraries. Let's golf it! Your input will be a rectangular two ...
0
votes
0answers
104 views

Combine two images into one in an intuitive way [on hold]

Objective: The task is to use any two source images of size 800*600 each. Create an algorithm that combines both images - in an intuitive way - into an image of size 1280*750 Rules: You are ...
-2
votes
1answer
62 views

Generate a Pallette for an Image [duplicate]

This is a successor to my previous Code Golf challenge, which may be found here. This time, you are trying to determine what the contents of colors.txt should be. Your task is to take from the input ...
5
votes
4answers
292 views

Approximate a given image using only colors from a given list

The Specs Your program must read the image from one file and write the results to another file, the name of at least the first of which should be taken from the input You may accept and return any ...
120
votes
9answers
15k views

Draw an Image as a Voronoi Map

Credits to Calvin's Hobbies for nudging my challenge idea in the right direction. Consider a set of points in the plane, which we will call sites, and associate a colour with each site. Now you can ...
8
votes
2answers
311 views

You call it Centering, I call it Code Golf

"Let's face it, aligned images are like little gifts from Heaven. Welcome, but unexpected." - Geobits +10000 reputation to whoever wins this challenge. Rules: 1) You are to generate a program. 2) ...
13
votes
2answers
482 views

ASCII Art Generation

Task Write a program or function that takes an image of width w and height h, and two integers a <= w/2 and b <= h/2, and outputs an ascii art representation of the image, with the dimensions a ...
8
votes
0answers
285 views

Resize rasterized text and make it look non-pixellated

This is a screenshot of some text typed in a text editor: This is the same text at a larger size. Notice how visible the aliasing is on letters with prominent diagonal strokes like x and z. ...
5
votes
3answers
2k views

Getting a Highscore in Kuku Kube [closed]

First of all, this is more a challenge, than a serious programming question, I would like to share. Some of you might know the game Kuku kube, where you have to identify a square in a grid, which has ...
18
votes
3answers
470 views

Remove an unobstructed rectangle

This image was made by overlaying 7 differently colored rectangles on top of each other: The black and maroon rectangles are unobstructed, that is, no other rectangles are above them. Write a ...
8
votes
2answers
592 views

Write a GIF encoder

Yes, the good old GIF. Loved for its versatility, hated for its patents and partly obsoleted due to its limitations (and patents), GIF consists, at the core, of a color palette and a palette-indexed ...
12
votes
6answers
601 views

Tracing the Hues of an Image

Load an image into this stack snippet and move your mouse over it. A black curve that follows the hue angle, starting at your cursor point, will be drawn: <script ...
6
votes
6answers
568 views

Sort all the pixels of an image by the number of occurrences

Input The name of a file in the raster graphics format of your choice. The chosen format must support at least 8 bits per channel and 3 channels. Output A file in the same format, with the same ...
9
votes
2answers
267 views

Summing colored graphs

In some cases, often in physics, you have to sum graphs. Your challenge is to write, in a language of your choice, a program or function that takes multiple graphs as images, calculates all possible ...
18
votes
4answers
886 views

Calculate the size of the moon

The size of the moon mystery I am sure you have heard that the moon changes its size. When you're in love and you're lucky, the moon is almost twice in size compared to normal situations. Some people ...
37
votes
3answers
955 views

Sometimes I need a Lossless Screenshot Resizer

Sometimes I need to write more documentation than just comments in code. And sometimes, those explanations need screenshots. Sometimes the conditions to get such a screenshot are so weird that I ask a ...
0
votes
2answers
183 views

Create a Scalable Valentine's Day Heart [closed]

Happy Valentine's Day! To celebrate this day of love and happiness (or sadness and loneliness for those of us who are single...), let's write some code to create some hearts! Specifically, if you ...
9
votes
2answers
537 views

Build a Mining Robot

Your program will control a mining robot searching underground for valuable minerals. Your robot will tell the controller where you want to move and dig, and the controller will provide feedback on ...
3
votes
1answer
252 views

Warhol these pictures [closed]

We've all seen the famous painting of Marilyn Monroe created by Andy Warhol. Let's try to replicate that effect with the usual suspects. Your task is to write a program/programs that do one or ...
13
votes
2answers
744 views

Go and make it starry

In this contest you have to write a program, that accepts a black and white pixel image, and tries to alter it, such that the white shape forms star domain, with as few changes as possible. Allowed ...
36
votes
3answers
3k views

Computer Generated Textured Wall Paint

The paint on the walls in my room has a random, almost fractal-like, 3-dimensional texture: In this challenge you will write a program that generates random images that look like they could be part ...
12
votes
1answer
295 views

Robot roadie needed to pack the truck

As the band's roadie, you have to pack the truck. Your program will place the packages so that they fit in the smallest height. A badly packed truck Rules Packages may be rotated through ...
31
votes
4answers
1k views

Image Battle of Colours

CONGRATULATIONS to @kuroineko for the best entry and winning the 200 bounty from @TheBestOne (excellent sportsmanship!). Write a program to colour as much of an image as possible before opposition ...
14
votes
4answers
1k views

10, 10, 10… I hope?

Preface As I was shooting an archery 900 round earlier today (10 ends at 6 arrows an end, and 10 ends at 3 arrows an end, for a total of 90 arrows and a maximum score of 900), I thought of this ...
61
votes
5answers
5k views

Recognise Stack Exchange Sites by Their Icon

After spending a while on Stack Exchange, I can recognise most sites in the Hot Network Questions by their little icon (which is also their favicon), but certainly not all of them. Let's write a ...
37
votes
4answers
3k views

Paint by Numbers

You're given a true colour image. Your task is to generate a version of this image, which looks like it was painted using paint-by-numbers (the children's activity, not nonograms). Along with the ...
25
votes
5answers
910 views

Create icy avatar images for the winter season

It's winter, and the time of year has come for it to start getting cold (and for strange colorful headcloths to start appearing... soon). Let's write some code to make avatar pictures and other ...
63
votes
9answers
6k views

Counting Grains of Rice

Consider these 10 images of various amounts of uncooked grains of white rice. THESE ARE ONLY THUMBNAILS. Click an image to view it at full size. A: B: C: D: E: F: G: H: I: J: Grain ...
58
votes
8answers
3k views

Square, Circle, Triangle, …Gear?

Using Algodoo and Paint I made these six 300×300 monochromatic images of four convenient shapes: This class of images has the following properties: They are always 300×300 pixels, ...
15
votes
5answers
710 views

Mondrian painting description language

This challenge consists in coding an interpreter for a Mondrian painting description language (MPDL). Language definition The language operates on a stack of rectangles. A rectangle is defined by ...
19
votes
4answers
1k views

Hungry Image Snake - Hole #3

Hole #1 Joe the snake is hungry. He eats pictures, one pixel at a time. He really likes bright pixels. The Challenge Program Joe to eat the most bright pixels he can find, given that he can only ...
22
votes
1answer
843 views

Paint a still life (or a moving one) - draw an image in the Game of Life

You are given as input a greyscale image. Your task is to find a static or looping pattern in Conway's Game of Life that resembles the input image as closely as possible. Your output can be either a ...
22
votes
1answer
864 views

Stitch a picture

NOTE: This question is currently in the SANDBOX. Please bear this in mind before adding new answers. I have a large collection of fine art. My toddler is learning to use scissors and glue; lately ...
6
votes
4answers
540 views

Find a thumbnail in a mosaic

After the last Ludum Dare (LD) game programming contest a friend of mine made a nice mosaic of all the LD game thumbnails: After searching for my own game I quickly gave up and decided to solve it ...
18
votes
3answers
914 views

Life can be colorful!

Each cell in a life-like cellular automaton only needs one bit to represent it since it can only be alive or dead. That means there are only two colors; pretty boring. Normal images have 24 bits per ...
46
votes
6answers
3k views

Redraw an image with just one closed curve

Inspired by vi.sualize.us Goal The input is a grayscale image and the output is a black and white image. The output image consists of just one closed curve (loop) that is not allowed to intersect ...
30
votes
3answers
1k views

Reproduce an image using lines

Write a program that takes in a true-color RGB image I, the maximum number of lines to draw L, and the minimum m and maximum M length of each line. Output an image O that looks as much as possible ...
52
votes
8answers
4k views

Draw random black-and-white forest

Your task is to write program which will draw 800x600 black-and-white image with something resembling a forest. Like this (it is dithered photo): Rules You are disallowed to use any existing ...
1
vote
10answers
1k views

Crop an image to a square

In this challenge, you will take an input image and crop it to make a square, leaving only the central part of the input image. The answers must work with landscape, portrait, or square input images. ...
70
votes
25answers
11k views

Rearrange pixels in image so it can't be recognized and then get it back

Create a program which can rearrange pixels in image so it can't be recognized. However your program should able to convert it back to original image. You can write two functions - for encoding and ...
23
votes
5answers
2k views

Draw an Image with a Snake

Imagine a continuous 2-dimensional path that can only turn left, right, or go straight, cannot intersect itself, and must fill a rectangular grid such as the grid of pixels in an image. We'll call ...
29
votes
6answers
3k views

Photomosaics or: How Many Programmers Does it Take to Replace a Light Bulb?

I've compiled a mosaic of 2025 headshots from the avatars of the top Stack Overflow users. (Click the image to view it full-size.) Your task is to write an algorithm that will create an accurate ...
298
votes
35answers
52k views

American Gothic in the palette of Mona Lisa: Rearrange the pixels

You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of ...
12
votes
9answers
2k views

Dither a Grayscale Image

Dither a grayscale image into pure black and white with your own algorithm. Guidelines: You must come up with your own new algorithm. You cannot use pre-existing algorithms (ex. Floyd-Steinburg) but ...
19
votes
3answers
1k views

Miniature Faking

As any amateur photographer can tell you, extreme post-processing is always good. One such technique is called "miniature-faking". The object is to make an image look like a photograph of a ...
21
votes
3answers
1k views

Hiding information in Cats

You are a secret agent trying to communicate with your fatherland. Of course the information needs to be hidden so no one eaves drops your message. What would be better suited than a cat? Everyone ...
25
votes
17answers
3k views

Output an image of your source code (not-quite-a-Quine)

Code golf: Print an image of the source code. Requirements Must output the image of the source code itself, not a version stored elsewhere and retrieved at run time. Code must be legible enough ...
12
votes
4answers
549 views

Recognize ASCII art numbers

Challenge Recognize ASCII art numbers. To make things interesting, three random points in the image might be flipped. For example: ***** * ** ** ** ** ** Input A 7x7 ...
13
votes
3answers
790 views

Freehand red circles

Over on http://meta.stackoverflow.com, we have a few memes of our own. One of them is Freehand Red Circles. See this post: So, the challenge is, can you draw freehand red circles... with code? ...
8
votes
4answers
819 views

Produce the number 2014 from an image

In the 2014 challenge, Michael Stern suggests using OCR to parse to 2014. I'd like to take this challenge in a different direction. Using built-in OCR from the language/standard library of your ...