Yesterday I got around to designing a prototype for an idea I’ve had for a long time. It’s a cup that tumps over if it’s empty but stands upright stably when full of liquid. I got a bit lucky with my design by eyeballing the center of mass and density balance between our 3D printer’s material and water. But it works!
Archive for the ‘ideas’ Category
Frankie and Johnny walk into a tutu shop.
Frankie: I’d like one tutu.
Johnny: I’d also like one tutu.
Frankie: Actually, I’ll have two tutus.
Johnny: Oh, I’ll change my order to two tutus, too.
complimented by spam complemented
Searching for large, high resolution images of famous artwork I’m often frustrated. There are so many small, low resolution images. Many are different resizes of the same image, but there are still many totally different images of the same thing: photographs various tourists have taken, scans from different galleries or museums. What I always end up wishing for is a way to combine all of these low resolution images into one super-resolution image. In this specific case of famous artwork, the problem should be rather simplified from the general problem of super-resolution. The images are of the exact same object. And the object more or less doesn’t change over time. There are lighting differences, but we can assume that since the work is famous there will be enough “correct” images to uncover the true colors. The images will be different scales, and perhaps taken from slightly different camera orientations or projections. But since artwork is mostly photographed head on with little to no perspective projection, I think these will be easy to cope with.
My working example will be to uncover a super-resolution version of Matisse’s “Nude in a white dress”. If you’d also like to try, here’s a zipped folder of bunch of low-res images of the painting I’ve grabbed from the web. But it’s easy to make your own dataset. Just search for images of your favorite famous painting.
Recently I got the chance to see a friend’s new image retargeting algorithm at work. It was very impressive and the best I’ve seen so far. I particularly liked that uniform scaling was within the set of possible solutions and actually occurred frequently. I like this because often uniform scaling looks way better than fancy retargeting techniques which sprinkle artifacts all over the image.
See the results reminded me again of Ben Hur. This movie was shot at a whopping 2.76:1 aspect ratio. Retargeting it to say, 4:3, would be a mess. All the times when I remember seeing it shown on TV (before widescreens became popular) it was shown with “letter boxes” rather than “pan and scan” or any other attempt to retarget the footage. Not even considering the fact that the original aspect ratio was intentional and that by retargeting it you’d be trivializing the directors’ choices (would a museum crop or stretch a painting to fit the gallery walls better?). Not even considering this, Ben Hur poses a striking challenge for retargeting techniques. To me it represents a real stress test. Much harder than most of the images in the RetargetMe dataset.
Here are some stills I found flipping through the film that I thought would be particularly difficult to retarget:
I ran some 4 of the easiest methods for retargeting on the last image.
1/2 Uniform scale, 1/2 letter box
Personally none of the above options besides Letter boxing are acceptable. Not even close. I would really like to see a retargeting algorithm that not only includes uniform scaling and cropping in the set of possible solutions, but also letter boxing. Do you know of one?
It goes without saying that the problem is much harder when considering not just a single frame but the entire scene or film’s worth of video. Letter boxing may be harder to include as an option when considering temporal coherence, but I still think it must be a possible solution. For films like Ben Hur, which purposefully utilize their entire aspect ratio, squishing a scene or cropping out elements would be far worse than the price of two black bars.
Ken recently posted about shapes that suggest math problems. At the end of his post he leaves a riddle:
Find a shape whose area is 1/2 the area of a square and whose perimeter is the same as the perimeter of the square.
Thinking about this riddle a little bit got me thinking about other similar riddles. Like what if I ask the same question but instead of a square use a circle.
Find a shape whose area is 1/2 the area of a circle and whose perimeter is the same as the perimeter of the circle.
My idea for a solution for this new riddle was to intersect to equal-size circles. Notice as long as the circles are equal size if I take the shape that’s one of the circles minus the other circle, the perimeter will be the same as a full circle.
So then I just need to find how far apart the circles should be. I know that if the distance between the circles’ centers is zero then the left over shape will have area zero. And if the distance is twice their radii then then the left over area will be equal to a full circle. So if I want the left over area to be half the area of a circle I need the distance to be somewhere between zero and twice the radii.
I wrote out the algebra blindly hoping that the equations would collapse leaving me with a beautiful, succinct expression for the necessary distance. The problem turns out to be fairly intangible. Leaving me with a gnarly expression for the distance that is not easily solved. Here’s a picture and the expression:
I can approximate d numerically, which reveals d ≈ 0.8079455066. I’m not the first person to try this, this problem also makes an appearance on the Wolfram circle-circle intersection page.
This leaves me wondering if there is a simpler answer to my riddle. Maybe the solution doesn’t involve circle-circle intersection at all!