Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

26
votes
4answers
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 ...
10
votes
5answers
602 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
0answers
103 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
0answers
130 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 ...
5
votes
0answers
170 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 ...
4
votes
1answer
573 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: ...
11
votes
11answers
862 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
8answers
755 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 ...
22
votes
12answers
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 ...
22
votes
14answers
2k 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" or "green ...
15
votes
4answers
374 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
5answers
231 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 ...
7
votes
3answers
392 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 ...
6
votes
11answers
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
0answers
274 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 ...
23
votes
3answers
675 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.      &...
9
votes
4answers
421 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
1answer
273 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 ...
21
votes
16answers
3k 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 ...
15
votes
1answer
523 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 <...
28
votes
18answers
5k 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
0answers
270 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
8answers
2k 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
2answers
233 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 ...
27
votes
2answers
536 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 ...
24
votes
2answers
628 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 ...
6
votes
5answers
474 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
1answer
420 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
882 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
415 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
334 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
1k 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 ...
17
votes
2answers
653 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
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 ...
43
votes
4answers
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: ...
14
votes
11answers
499 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
564 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
662 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 ...
9
votes
2answers
591 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
2k 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 ...
10
votes
1answer
340 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 ...
14
votes
17answers
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 ...
20
votes
2answers
1k 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 ...
14
votes
1answer
3k 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
412 views

Find the different letter

You may have seen puzzles like this: Find the 0: OOOOOOOOOOOOOOOOOOOO0OOOOOOOOOOOOOOOOOO The challenge is to write a ...
23
votes
12answers
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 ...
8
votes
1answer
199 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 ...
18
votes
5answers
783 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 ...
290
votes
8answers
23k 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: <...