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

34
votes
3answers
594 views

Upgoat or Downgoat?

Given an image of a goat, your program should best try to identify whether the goat is upside down, or not. Examples These are examples of what the input may be. Not actual inputs Input: Output: ...
66
votes
7answers
2k views

Patch the Image

In a popular image editing software there is a feature, that patches (The term used in image processing is inpainting as @mınxomaτ pointed out.) a selected area of an image, based on the information ...
20
votes
1answer
368 views

Compress an image to a 4 KiB preview

In this challenge you will be creating an image preview compression algorithm. It's goal is to reduce an arbitrary image file to a 4 KiB preview image, that can be used to quickly identify images with ...
23
votes
6answers
2k views

Flip It, Flop It, Mean It

Overview Given an image in plain PPM (P3) format as input, for each pixel p in the image, replace each of the following 4 pixels' red, green, and blue with the floored average value of the respective ...
47
votes
7answers
924 views

Paint by Numbers (using programming, not numbers)

Your task is to create a program which takes a black-and-white outlined image (example images are below) and fills it in with colour. It is up to you how you section off each region and which colour ...
4
votes
0answers
128 views

Build an image-glitching algorithm [closed]

It's well known that corrupted JPEG files or NTSC/PAL streams will appear as distorted versions of the true images, or versions covered in random-looking blocks of pixels. Consider the below image ...
8
votes
0answers
268 views

…And Mexico will Pay for It!

Donald Trump is very impressed with the work of the people on this site. He saw how amazing of a job you did helping Ben Carson, so he even hired you to build his wall. He thinks you're terrific. Now ...
16
votes
1answer
182 views

Count the number of sides on a polygon

Count the number of sides on a polygon The polygon-side-counting robot has decided to travel the world without telling anyone before, but it is crucial that the process of polygon counting is not ...
12
votes
5answers
954 views

What is that angle?

The goal of this challenge is to determine the angle of a line in a image. Rules on the image: The image background will be white (#FFFFFF) The stroke of the line will be black (#000000) The line ...
48
votes
3answers
2k views

Black and White Rainbows

Given an image that has only black and white pixels and an (x,y) location that's a white pixel, color the white pixels based on their minimal Manhattan distance from (x,y) in a path that only involves ...
14
votes
4answers
470 views

Make America(n Maps) Great Again

New Bonus! (See below) The cartography team of U.S. Republican presidential hopeful Ben Carson is having some trouble with their maps (image via Washington Post): The problem is they don't have ...
6
votes
1answer
301 views

Sobel edge detector

Your task is to write a program that takes an input image and run it through edge-detection to become an output image. The edge-detection works as follows (if unclear, see sobel edge detection): ...
32
votes
12answers
3k views

Sort the pixels

Your task is to create a program that will, given an input image, create an output image of the same size, where all pixels are ordered by hex value. Your program may: Sort the pixels from left to ...
23
votes
5answers
1k views

Seamless conversion from square to hexagon

For many games played on a grid, hexagons are the Clearly Superior Choice™. Unfortunately, many free game art sites only have seamless tile sets for square maps. On a past project, I used some of ...
19
votes
4answers
938 views

Force an Average on an Image

Write a program that takes in a standard truecolor image and a single 24-bit RGB color (three numbers from 0 to 255). Modify the input image (or output a new image with the same dimensions) such that ...
19
votes
10answers
3k views

Average Color of an Image

Average color of an image Scientists have been able to determine the average color of the universe but in how many bytes can we find the average color on an image? Your task Your input will be a ...
39
votes
4answers
3k views

This Is A Self-Referential Problem

Tupper's Self-Referential Formula (copied from Wikipedia) Tupper's self-referential formula is a formula defined by Jeff Tupper that, when graphed in two dimensions at a very specific location in the ...
17
votes
1answer
370 views

Chute-A-Pearing

Here are five images of pears and a steel chute: A: B: C: D: E: These are only thumbnails, click them for full size! (I made these with Algodoo.) This class of images always has the ...
18
votes
5answers
740 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 ...
-2
votes
1answer
114 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 ...
6
votes
5answers
867 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 ...
135
votes
9answers
20k 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 ...
14
votes
3answers
713 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
662 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 ...
11
votes
1answer
467 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. ...
6
votes
3answers
5k 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
596 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
725 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 ...
15
votes
6answers
786 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 ...
8
votes
6answers
1k 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
335 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 ...
19
votes
4answers
1k 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 ...
38
votes
3answers
1k 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
230 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
680 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
323 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 ...
14
votes
2answers
839 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 ...
44
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 ...
13
votes
1answer
332 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 ...
32
votes
4answers
2k 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 ...
15
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 ...
67
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 ...
40
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 ...
26
votes
5answers
1k 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 ...
65
votes
9answers
7k 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 ...
61
votes
8answers
4k 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, ...
16
votes
5answers
865 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 ...
21
votes
5answers
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 ...
30
votes
2answers
1k 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 ...
26
votes
1answer
1k 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 ...