Questions tagged [image-processing]
These challenges involve processing pre-existing image files, by altering them in some way, gathering statistics, or other image processing tasks.
133
questions
15
votes
15
answers
2k
views
Rotate an Image
This challenge is simple: Take a path to an png image file as input and overwrite that file with a copy of itself rotated 90 degrees clockwise. You may assume that ...
3
votes
2
answers
540
views
How Mondrian is your fine art collection? [closed]
For the purpose of this challenge a rectangular piece of ASCII art is Mondrian if it looks the same upside down.
What does "looks the same" mean?
A feature is any orthogonally connected ...
8
votes
5
answers
390
views
Random Pixels Image Compression
Challenge:
Given an integer \$n\$, guaranteed to be \$\geq2\$ and a power of 2, we are going to draw multiply boards either side-by-side or below one another, where the first has dimensions of \$n\$ ...
3
votes
2
answers
219
views
Resize the image
Given an \$n\times m\$ matrix \$A\$ and two integers \$w,h\$, output a matrix of \$w\times h\$ called \$B\$, such that $$B_{i,j} = \int_{i-1}^i\mathbb dx\int_{j-1}^j A_{\left\lceil \frac xw\cdot n\...
7
votes
2
answers
325
views
Temporally Dither an Image (Image to PWM Image)
Background
I want to display rich, vibrant images on my theoretical fancy custom display, but due to budget constraints, it displays everything in 3-bit colour! Whilst Regular Dithering would work, I ...
14
votes
3
answers
1k
views
Recognize a Roboto Mono character
Your input will consist of an 18×18 image in any reasonable format, containing a horizontally and vertically centered 14px Roboto Mono character. This can be any of 94 printable ASCII characters (not ...
12
votes
2
answers
942
views
Smallest image containing one of every RGB color
I'm not sure if this kind of golf is allowed, but here it is.
Your objective is to create an image containing one pixel of every possible RGB color. The image with the smallest file size wins.
Rules:
...
12
votes
7
answers
745
views
Toroidally magnify-blur a matrix
Task
Given a matrix of numbers \$M\$ with \$r\$ rows and \$c\$ columns, and the magnification factor \$n\$, build the matrix with \$rn\$ rows and \$cn\$ columns where the original elements are spaced ...
19
votes
5
answers
1k
views
Generate Green Spray Paint Patterns
This challenge is about creating these neat "green spray paint" patterns: (more pictures below)
Loosely explained, they are generated by starting with a black image and a point in the center. ...
27
votes
5
answers
17k
views
Flag mashup generator
Part 2 of the challenge is here
Flags Mashup Bot is a small Twitter bot that generates a new flag based on two random flags and tweets the result every couple of minutes.
Task
Your task is to ...
4
votes
1
answer
300
views
Draw these shapes
Given: a width, a height, and a set of sets of points. Output: An image where each set of points is connected and colored in (like a shape). Each shape must be a different color from all of the other ...
1
vote
1
answer
260
views
(bit)Wise Images [closed]
Given a truth table and two images, use the truth table as a bitwise operation to the two images.
For example with the truth table:
1 0
1 0 0
0 1 0
(Note that ...
7
votes
1
answer
646
views
Hilbertize an image
For a computer vision app I want to do a mapping of an image, in such a way that every pixel fit hilbert curve, instead of conventional layout. So task could be as follows:
Task description
Given ...
10
votes
0
answers
329
views
Captcha Capture [closed]
Captchas aren't meant to be machine-readable, and that's terrible. It is time to end this obvious bout of unfounded hatred for machines just trying to let you know about great deals on ṗḧ@ṛḿ4ćëüẗ1ċäḷṡ ...
29
votes
4
answers
1k
views
Where's Blackhat?
Challenge
Write code which, given an image of a panel from a random xkcd comic, returns a truthy value if Blackhat is in the comic or falsey if not.
Who is Blackhat?
Blackhat is the unofficial name ...
11
votes
5
answers
689
views
Tell me the Lunar Phase!
Challenge
Given an image of the Moon as input, output the phase of the Moon.
Phases of the Moon
Your program will be supplied one of these images in png format and you must output the phase exactly ...
1
vote
0
answers
197
views
Render a monospaced bitmap font from image [closed]
Input is in this format:
image fontwidth fontheight rowwidth xoffset yoffset xgap ygap non-existent charstart thetextitself
thetextitself: The text that should ...
2
votes
0
answers
232
views
Calculate the Peirce quincuncial projection of the Earth [closed]
The Peirce quincuncial projection is pretty neat. It actually tessellates the whole plane:
Your job is to generate this map projection.
To simplify things, you will only need to generate the ...
6
votes
1
answer
510
views
Stereographic projection of polyhedra
You will create a program that generates the stereographic projection of polyhedra.
In particular, to keep things simple, we'll only focus on n-chamfered dodecahedron.
Given a natural number ...
3
votes
1
answer
680
views
Happiness is Mandatory
If you're sad, that's wrong. We need to scrub out ALL sadness.
This is a sad face, for reference:
...
10
votes
11
answers
1k
views
Generate a special period image
Construct a program or function that takes input in form of
<width>, <height>, <color1>, <color2>
and generates an output such that first ...
21
votes
8
answers
1k
views
Can you count the number of rectangles?
One of my favorite mathematical pastimes is to draw a rectangular grid, then to find all of the rectangles that are visible in that grid. Here, take this question, and venture for yourself!
Can you ...
23
votes
12
answers
2k
views
How Cloudy Is It?
Challenge
Given an image of the sky, you must output the cloud cover in oktas. The image supplied will be an image file (the type is up to you) and the output should be to STDOUT.
Oktas
In meteorology,...
23
votes
15
answers
4k
views
The Chroma Key to Success
The RGB color value #00FF00 is a rather important one: it is used to make movies, TV shows, weather announcements, and more. It is the famous "TV green" ...
18
votes
4
answers
621
views
Knight-fill a grid
A knight fill is a flood fill using the connectivity of the knight chess piece. Specifically:
1 1
1 1
0
1 1
1 1
(0 is the initial point, 1s show the ...
9
votes
5
answers
307
views
I text the correct combo of ones and zeros
I recently listed to the song I'm a Textpert about texting while driving and one particular line in the song inspired this challenge.
I never stoop so low as to text photos / Instead I text the ...
6
votes
3
answers
498
views
Lazy Click and Drag
Your task is to write a program or function which, given two nonzero integers x and y, returns a truthy value if the image at ...
11
votes
15
answers
2k
views
What color is this?
You are to golf a program that will take a filename as input and you must output what color the file is.
The file will have any one of these extensions but your program only needs to support one. ...
2
votes
0
answers
330
views
Is it a bird, is it a plane? [closed]
Challenge
Supplied an image, you must determine if the subject of the image is a bird or a plane.
If the image is a bird, your program must output
bird
and if ...
28
votes
5
answers
1k
views
The Image of the Dragon
I saw a cool gif of the twin dragon curve made from a square, and wondered what would happen if we started from another base image. So I wrote a program to do this.
...
10
votes
4
answers
526
views
"Monitorize" an Image
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 ...
7
votes
1
answer
352
views
Count # of Cookie Chocolate Chips
Note: this is my first post here.
The Challenge
The challenge is to count the number of chocolate chips in a cookie. A cookie in this case is a circle with dots (the chips) in it. Given any square ...
22
votes
16
answers
5k
views
Extract an RGB channel of an image
Given an image, either as input (possibly in RGB triplets) or with the filename as input (you may assume the image has a specific filename, possibly without an extension), output an image representing ...
14
votes
1
answer
811
views
Make a picture into a sliding puzzle
Summary
The goal of this challenge is to create an undone image-version of a 15-puzzle / sliding puzzle also called taquin in french.
Details:
Given an input composed of:
an image,
an integer ...
29
votes
18
answers
8k
views
XOR two monochrome images
Challenge:
Take input of two black and white (monochrome) images and xor each pixel of the first, with each pixel of the second, add them to a new image and output the new image.
Some clarifications:...
4
votes
0
answers
409
views
Unpixellate an image [closed]
When you resize an image down to a very small size, it looks very blocky when you scale the pixels back up individually.
In extreme cases, as above, you can no longer reconstruct the original image, ...
21
votes
8
answers
4k
views
Arnold's Cat Map
Challenge
Given a colour raster image* with the same width and height, output the image transformed under Arnold's cat map. (*details see below)
Definition
Given the size of the image ...
8
votes
2
answers
295
views
Count the number of a number in the picture area
Your goal is to write a full program or function that takes 5 positive integers and a string with an image filename as input [X1,Y1], [X2,Y2], N, image.jpg in any ...
29
votes
2
answers
960
views
Hilbertify an image
I like the Hilbert Curve.
Your task for this challenge is to take an image (strictly a square image where all the sides are a power of two pixels wide) and unravel it line by line in a zig-zagging ...
28
votes
2
answers
894
views
Downgoat-ify Animals!
My Downgoat avatar has several distinct features
These features can however also apply to any other animal.
Specification
Given an image of an animal (technically can be anything), you must apply ...
5
votes
5
answers
540
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 ...
10
votes
1
answer
622
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 (...
34
votes
9
answers
4k
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 ...
20
votes
5
answers
1k
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 ...
14
votes
2
answers
623
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
0
answers
520
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 ...
10
votes
6
answers
10k
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 ...
18
votes
2
answers
928
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 ...
23
votes
8
answers
2k
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 ...
45
votes
4
answers
2k
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:
These ...