These challenges involve processing pre-existing image files, by altering them in some way, gathering statistics, or other image processing tasks.
5
votes
3answers
220 views
Image Smoothie!
Input into your program a black and white image. (png, jpg, etc)
Convert the image to a 2D matrix of pixels, where each index is the grayscale value of the image.
Take each index of the matrix and ...
7
votes
0answers
156 views
Braincopterify an image
Introduction
Braincopter is an esoteric Brainf*** derivative that encodes a Brainf***
program as an image. As a 2D language, it uses two additional commands; they
rotate the instruction pointer (...
35
votes
9answers
3k views
Quixels - Quantum Pixels
Introduction
A quixel is a quantum pixel. Similar to a classical pixel, it is represented with 3 integer values (Red, Green, Blue). However, quixels are in a super position of these 3 states instead ...
19
votes
5answers
698 views
Number Plate Golf: Recognition
See also: Parsing
Introduction
You're working on a government programming team, who have been programming the speed cameras. However, the group of people who have programmed the speed calculator ...
12
votes
1answer
284 views
Blunt the Images
Introduction
Sharp edges are, frankly, just plain dangerous so, given a PNG as input, blur the image using the method described below and blunt those damned sharp edges.
Method
To get the RGB value ...
2
votes
0answers
193 views
100KB image compression [closed]
Your task is to, given an image, compress it to 100000 bytes or less, while following all of the below rules:
No cheating/loopholes.
Your code must not be optimized to work best only on the test set ...
9
votes
6answers
416 views
Reverse Bayer Filter of an image
Almost all digital camera sensors are organized in a grid of photosensors. Each photo sensor is sensitive for one of the primary colors: red, green and blue. The way those photo sensors are organized ...
16
votes
2answers
364 views
Thwart Lepton compression
Dropbox recently released Lepton (GitHub), a method that losslessly compresses JPEG images round-trip, saving an average of 22%.
Because of the pigeonhole principle, any general compression algorithm ...
3
votes
0answers
215 views
Monitorize an Image [closed]
The Problem:
This challenge comes from a real problem I was having. I have a dual monitor setup at work, and I wanted to use the following image as my wallpaper:
However, my monitors have quite ...
22
votes
8answers
1k views
“Add one” to every color in an image
You would simply take this image and make every color added one to every hexadecimal digit. For example, #49de5f would become #5aef60 (with the 9 looping to an a, and the f looping to a 0.)
This ...
40
votes
3answers
1k views
Computer Generated Cracked Soil
Write a program that takes in an integer from 0 to 65535 (216-1) and generates a unique 500×500 pixel image that looks as similar as possible to these 6 real life images of cracked soil:
...
9
votes
6answers
268 views
Color count, sorted by occurences
This one is simple to describe and I could hardly believe that this was not golfed before:
For a given image (whatever format is supported by your language), find the unique colors and output a list ...
15
votes
2answers
473 views
Image Hide-and-Seek
In this challenge, you need to find a specific pixel within an photograph (taken with a real camera).
You are passed an (R, G, B) tuple and an image, and you need to return a point (x,y) within the ...
7
votes
7answers
447 views
Get the most dominant color!
In this challenge, your task is to write a program that takes in an image and returns the most dominant color in it. Dominant color here means the color with which most of the image is covered (see ...
7
votes
1answer
326 views
Reconstruct a missing RGB channel
Look at these photographs of natural scenes, with one of the RGB channels taken out of them:
Source (with red): https://en.wikipedia.org/wiki/File:Altja_j%C3%B5gi_Lahemaal.jpg
Source (with green): ...
23
votes
3answers
1k views
Rainbowlify An Image
This challenge is about gradually shifting hues in an image to make pretty pictures like this:
(original)
Challenge
Write a program or function that takes in two non-negative integers and an image ...
8
votes
1answer
253 views
How many shapes are in this picture?
Children are very good at classifying objects and counting them. Computers seem to have more trouble. This is a simplified version of this problem. Can you write a small program that can classify and ...
13
votes
16answers
3k views
Invert png image
Create program or function that takes file name as an argument or reads it from standard input, and completes the following task:
Read image from a png file (name given as argument).
Reverse colors ...
17
votes
2answers
981 views
Fun with flags!
Write a full program with a source code of 256 bytes or less that looks at an image of a flag and determines what country that flag is from. A zip file containing the 196 different flags in the ...
12
votes
1answer
820 views
Generate ASCII Art
Given a black-and-white image in any reasonable lossless format as input, output ASCII art that is as close to the input image as possible.
Rules
Only linefeeds and ASCII bytes 32-127 may be used.
...
10
votes
3answers
241 views
Find the different letter
You may have seen puzzles like this:
Find the 0:
OOOOOOOOOOOOOOOOOOOO0OOOOOOOOOOOOOOOOOO
The challenge is to write a program that finds the index of the different letter given an image.
Input
...
22
votes
11answers
1k views
Determining vertical slices
Given an image, output the [width in pixels of a full vertical section]1 (if one exists). If no vertical section exists, output 0.
Input may be provided as a local file or a nested array. If you ...
8
votes
1answer
181 views
Extend the line
Task
Given an image with a line on it, produce or display an image with the line extended the the line to the edge of image. The line is black and the background is white. The image size is 100x100 ...
12
votes
3answers
577 views
Fill the holes in letters
Sometimes when I'm bored, I take some text and fill the "holes" in the letters. But isn't filling the holes the most boring thing you can do? I think we should automate it, so we could use our time ...
215
votes
5answers
15k 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:
...
83
votes
9answers
3k 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 ...
27
votes
2answers
832 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 ...
51
votes
6answers
1k 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
213 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 (...
15
votes
0answers
502 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
228 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
996 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 ...
17
votes
4answers
661 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 the ...
12
votes
4answers
506 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):
The ...
33
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
1k 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 ...
20
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
426 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
761 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
129 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
957 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 ...
144
votes
9answers
22k 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 ...
15
votes
3answers
753 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
761 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
495 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. This ...
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 ...