349 votes
Accepted

Upgoat or Downgoat?

Mathematica, 100%, 141 bytes ...
A Simmons's user avatar
  • 4,605
77 votes

Upgoat or Downgoat?

JavaScript, 93.9% ...
user81655's user avatar
  • 11.2k
66 votes

Upgoat or Downgoat?

Java, 93.9% 100% This works by determining the row contrast in the upper and lower part of the image. I assume that the contrast in the bottom half of the image is bigger for 2 reasons: the 4 legs ...
Sleafar's user avatar
  • 2,912
45 votes

Patch the Image

Matlab This is a simple interpolation approach. The idea is first mirroring what is on each side of the patch. Then those mirror image pixels are interpolated by how close they are to the ...
flawr's user avatar
  • 43.7k
42 votes

Upgoat or Downgoat?

Python 3, 91.6% -edited with the new test cases set filename to the goat picture you wish to test. It uses a kernel to make an image top/bottom asymmetric.I tried the sobel operator, but this was ...
Magenta's user avatar
  • 1,362
36 votes
Accepted

Determining vertical slices

Jelly, 2 bytes PS Try it here! If I encode an image like so: ...
Lynn's user avatar
  • 68.1k
34 votes
Accepted

Black and White Rainbows

Matlab, 255 245 231 bytes This expects the image name first, then y and then x. ...
flawr's user avatar
  • 43.7k
31 votes

Computer Generated Cracked Soil

Mathematica A Voronoi diagram looks like this drawing, from Wikipedia, showing 19 cells, each containing a single seed point. A cell consists of the subregion of points which the respective ...
DavidC's user avatar
  • 25.3k
30 votes

Paint by Numbers (using programming, not numbers)

Spectral airbrushing (Python, PIL, scipy) This uses a sophisticated mathematical algorithm to produce colourful nonsense. The algorithm is related to Google's PageRank algorithm, but for pixels ...
N. Virgo's user avatar
  • 7,232
29 votes

Invert png image

ImageMagick display -fx, 3 7 18 24 bytes 1-u The ImageMagick tool display with the ...
Sparr's user avatar
  • 6,048
26 votes

Upgoat or Downgoat?

Python 3, OpenCV with Hough Transform, 100% My original idea was to detect the vertical lines of the goat's legs and determine its vertical position relative to the body and horizon. As it turns out, ...
qwr's user avatar
  • 11.5k
26 votes

Computer Generated Cracked Soil

Java I used an approach based on recursive Voronoi diagrams. The outputs doesn't look very realistic, but I guess they're okay. Here are some example images (resized to 250x250 so that it doesn't ...
xenia's user avatar
  • 8,102
25 votes

Paint by Numbers (using programming, not numbers)

Python 2 + PIL too, my first coloring book ...
dieter's user avatar
  • 2,038
25 votes

Patch the Image

Mathematica This uses Mathematica's Inpaint function. Because Mathematica itself does all the heavy lifting, this is a community wiki. ...
24 votes

Paint by Numbers (using programming, not numbers)

Python 2 and PIL: Psychedelic Worlds I have used a simple algorithm to flood fill each white-ish area with a color from a cycling palette. The result is very colorful, but not very lifelike. Note ...
Logic Knight's user avatar
  • 6,762
21 votes
Accepted

Sort the pixels

Pyth - 10 bytes Reads image, collapses bitmap, sorts, and then splits up bitmap again, then writes. .wclK'zSsK Doesn't work online for obvious reasons. Takes input ...
Maltysen's user avatar
  • 25.7k
21 votes

Invert png image

Pyth, 16 15 13 bytes .w-LLL255'z\a Outputs to a.png. ...
Doorknob's user avatar
  • 71.4k
20 votes

Patch the Image

Python 2 and PIL This program blends copies of regions North, South, East, and West to create replacement pixels that use colours, textures, and shading from the local image region. The example ...
Logic Knight's user avatar
  • 6,762
20 votes

XOR two monochrome images

The Fx Expression Language (ImageMagick), 8 4 bytes EDITS Simplified to u!=v, -4 bytes As "Fx Expression Language" is apparently Turing complete, I've ...
zeppelin's user avatar
  • 8,476
19 votes

Sort the pixels

JavaScript (ES6), 383 377 354 bytes ...
apsillers's user avatar
  • 3,702
18 votes

Fill the holes in letters

Bash, 135 bytes convert +antialias -pointsize 99 label:$1 -fill red -draw 'color 0,0 floodfill' -fill black -opaque white -fill white -opaque red i.png Uses ...
Doorknob's user avatar
  • 71.4k
18 votes

Invert png image

MATL, 10 bytes 255iYi-IYG There are five different subformats of PNG, depending on how color is encoded. None of them seems to be more "optional" than the others....
Luis Mendo's user avatar
  • 104k
18 votes
Accepted

Reconstruct a missing RGB channel

Python 3 + scikit-image Simply sets the color of the missing channel to the average of the other two. ...
orlp's user avatar
  • 39k
18 votes
Accepted

Where's Blackhat?

PHP (>=7), 100% (40/40) ...
Night2's user avatar
  • 5,947
17 votes

Invert png image

Java, 295 ...
aditsu quit because SE is EVIL's user avatar
15 votes

Upgoat or Downgoat?

Python 3, numpy, scikit, 100% This code runs a goat-trained image classifier against a single filename, printing out 'Upgoat' or 'Downgoat'. The code itself is one line of python3, preceded by a ...
don bright's user avatar
  • 1,305
15 votes

XOR two monochrome images

Mathematica, 37 34 15 bytes Thanks to Ian Miller for cutting the number of bytes by more than half! ImageDifference In the end, there's always a builtin. This ...
Greg Martin's user avatar
  • 15.4k
15 votes

Recognize a Roboto Mono character

Python 3, 211 209 bytes ...
AnttiP's user avatar
  • 7,828
14 votes

Patch the Image

Python 3, PIL This program uses the sobel operator, and draws lines onto the image based on that. The sobel operator finds the angle of each edge, so any edges extruding into the unknown area ...
Magenta's user avatar
  • 1,362

Only top scored, non community-wiki answers of a minimum length are eligible