Taking pictures with a scanner

Picture taken with camera obscura on scanner bed

Picture taken with camera obscura on scanner bed

Scanners have found their way into many households. I rarely get any use from my scanner at home, but as these devices are piggy backing on printers now days it would be silly not to get a machine with the both combined. I’ve come across a way of using the scanner to take pictures. I don’t mean scanning photographs (silly!), but more akin to a camera, capturing an image of the world in front of it.

This type of scanner photography, sometimes referred to as as scanography encompasses a whole range of techniques of acquiring images of things that are not just your standard sheet of paper. Most of scanography is taken up by imaging various objects on the glass plate of the scanner, but the part I’m really interested in is taking a photograph of the scene in front of the scanner. This can be achieved by focusing the image from a camera obscura onto the plate which the scanner scans its image. Looking around I found a little video on Make magazines website of a camera obscura you could attach to a flatbed scanner but as we now have these clunkier printer scanner all in one machines, turning the whole thing on its front seems like a daft thing to do if you wanted your machine to continue working. I knew there was a solution and that it would involve a mirror.

I could use a mirror at 45 degrees to reflect the rays travelling horizontally toward the camera obscura, down toward the scanning face of the scanner.  I decided to put the mirror inside the box rather than on the top, as it would allow me to keep the opening for the light on the front face. After a quick test with a pinhole I realised that I would need to gather more light, which could be done by enlarging the hole and using a magnifying glass. Its important to choose a lens with a suitable focal distance. To measure the distance, grab your lens and a ruler and try to project the light from your tv (or other similar bright object) onto a piece of paper. When you are doing this make sure the distance from the TV to the lens is about the same distance your subject is likely to be in front of the scanner. Measuring the distance from your lens to the paper (showing a clear image of the tv) and jot it down somewhere. It’s hard to tell what a suitable lens is but my one had a diameter of about 8cm, and a focal distance about 25cm. Having a lens that is just bigger than the diameter of a roll of tape is useful as I found I could use this to hold the lens and slide it back and forth to adjust the focus. You need to match your lens with your box and find an arrangement that would allow the distance from the base to the mirror and the distance from the mirror to the lens sum up to the focal length you found earlier.

Camera Obscura on scanner

Camera Obscura on scanner

I used black paper inside the box to stop stray light from inside the scanner overwhelming the light coming from the source. A used roll of tape made a good holder for my hand lens, which I secured with tape to the box after cutting a hole slightly smaller than the lens into the box. Other things that could work is using black paint inside the box and I can imagine a tin can or half a Pringle tube to help hold the lens.

I used a small glass mirror and attached it to a piece of cardboard I had cut off the flaps. In hindsight a lighter plastic mirror would have been lighter and less likely to drop. Conveniently as the box used to hold reams of paper, the flap on the long side could fit inside at a 45 degree angle as its length is root 2 times the width. To reinforce the card I took the two edges of the cut card and folded them at 90 degrees so it was less likely to buckle, cutting the corners at 45 degrees allowed it to fit inside the box.

I little doodle of making the mirror holding card

I little doodle of making the mirror holding card

There’s a few tweaks which I found useful when trying to get a more practical box. Some scanners don’t have covers which are detachable and open to a wide enough angle to fit the entire box. For this I had to reshape the back half of the box so that it would. The tape lens holder was replaced with a thicker one (like used for parcel or duct tape) so more control of the focus could be achieved. The further the lens from the bed, the close the focal distance. Having a box that is a bit larger than the bed is a good idea as the light from the scanner will not reflect off the edge of the box. I haven’t had much success when using this on photocopier machines, maybe because of its auto-leveling function which drowns out the light coming through the lens with the excess being reflected by the box edges. It may be possible to get it to work on them by making sure the rest of the glass is covered with a material that reflects very little light (black cloth?).

Funny thing about taking scans is that although you take colour one the resulting image is appears greyscale. I hypothesised that this is a by-product of the way some modern scanners acquire colour information. Instead of having three sensors that can sense red, green and blue light, and combining this to form coloured images, this scanner shone in a sequence red light, blue light and green light and measure the input with a sensor that is sensitive to all light across the visible spectrum (hmm… I wonder if it reacts to infra-red also?). Follow me on my experiments with trying to trick it into giving me colours in my next post.

Scan taken from further away

Scan taken from further away

Advertisements

Processing on web using processingjs

SimpleCode

It may not be revolutionary but I’ve just figured out how to do something I’ve been wanting to do for some time now. I can now show people my processing sketches via a website by using processingjs script. I have mentioned it before, but processing is a graphical programming language that can make neat visuals, or more if you have the idea. I used it in my gif animation maker, a tool I came up with to produce an interesting pair of images that can reproduce a likeness of a bunch of frames animating, when one layer is slowly rotated about the other (check my previous posts).

Achieving this newfound ability to spread some awesome, means I can take some of my older sketches and try to make them live solely on the internet, breaking the barriers (tiny hurdles) people might have before trying the tools and sketches I make.

Also look at the code above, its not that difficult if you think about it, and my oh my, it produces a fantastic visual for not much work(I may be a bit biased here)

 

Download and play the simple animation here

Gif Moire animation maker

I recently released something on my GitHub, that I think is quite awesome. Its a bit of code I had made to enable an animation to be put onto a piece of paper and when the top semitransparent layer is rotated relative to the bottom animation layer, an illusion of a moving animation can be observed.

It’s kinda hard to imagine what that is like, so check out this youtube video to get a better idea: http://youtu.be/iHg7f35PrEY

I developed this code on the graphical programming language called processing. As the files on the GitHub are still code, you would need to download processing from their website to see it in action. You can find processing here: https://processing.org/download/

The link to the files in GitHub are over here: https://github.com/nanoBorg88/gif_moire_processing

Over there you will find two versions of the code, the one that is appended with rock is my second version based on the first. What gif_moire_maker_rock does which the other doesn’t is allow you to offset the point of rotation from the center of the image to the top, the animation would then instead cycle back and forth when the top layer is rocked relative to the one underneath. I made a simple colour changing test to show this, on this youtube video.

The sketch (processing code) allows you to convert a collection of pictures in the sketch folder into an animation image, containing all the frames conveniently arranged in slices at different angles, and another image for the top layer which has several slits which when placed on top of animation image, would only show one frame of that layer. Rotating the top image that has been printed on a transparent film, about the point of rotation (highlighted by a small circle on the images), the frame shown changes to others in the animation layer.

The type of transparent film I use is that which in the past had been used for producing documents for over head projector (OHP). As OHP’s are a bit of an ancient bit of technology, I am not only making something really cool but also finding a use for these films that are effectively rendered useless. I work in a school as a lab technician so I have access to this stuff, it may be an idea if you want the stuff for cheap or free, to ask if your local school whether they have any gathering dust so you can have a go at making one of these animations yourself. Good luck if you try it, and comment if you do, or have any problems.

HACKEDful weekend! Featuring Huecked

I had a super awesome weekend at HACKED at the Indigo O2 on 21st and 22nd July 2013. HACKED is an free event put together by the people of the Lab at O2, and the Geeks of London which brings together software hackers, hardware hackers, coders, and other crafts under one (massive) roof; then pamper them with an infinite well of chocolate, crisps, energy drinks and pizza, allowing them (the die-hard hackers) to work on their hacks throughout the night.

This hackathon brought many sponsors each with their own competitions and prizes. Some familiar names like Nokia, PayPal, Yahoo, Philips and BBC had prizes for those choosing to produce a hack with code in mind. Nevertheless, the people at HACKED supported those working on projects that do not fall in any competition categories, the event was more of a display of the amazing things people can make.

The competitions were outlined on the website before the event so attendees could gauge what they would like to spend their weekend hacking. I knew that I wanted to work on something that wasn’t completely living on the internet, something that was a real, and the hue lights provided by Philips seemed to be a good bet. That was my first stop when I entered the Indigo, and I got a feeling that Philips had no clue that their development kits would be in such a demand. Me and a few strangers made an impromptu team, as Philips insisted they would only hand out the kit to groups rather than individuals. We nabbed one of the last kits and proceeded to find a table that we could all sit at.

Our newly formed team of 5 found a table near the front suspiciously marked with workshop (which was due to happen later that day), nevertheless as these spots had routers so we stayed. After the introduction and being brainwashed to ‘be more dog’, we started brainstorming ideas for the lights. The ‘hue‘ is a wireless multicolour light which can produce colours across the spectrum, from red, to greens, to blues and much in-between. Our ideas for it were directed toward a game and one that requires a degree of competition and quick reactions. We settled on producing a game which included this and a memory aspect, as well as enabling it to be multiplayer. Our game was named Huecked, a hard to pronounce (Rhymes with puked, if that helps (It probably doesn’t)) portmanteau of hue and hacked.

This is how the final game played out: A user would navigate to the website where they would see the logo. The game is cross platform as it is browser-based. After the user clicked the logo they are assigned a colour, which is their player identity. The site waits a short while for other players to join, and assign them different colours. When the game starts a random colour is selected on the hue lights, this colour will need to be remembered by all players. The light goes out and a random sequence of colours on the hue proceeds, to which eager nimble-fingered contestants must wait for the colour to change to the one remembered before, and strike the logo again. The game ends and a break down of which player hit the logo in the shortest time, and that player is declare the winner.

I am glad I was part of the team that produced this amazing game in 24 hours! Hueked is available on github if you happened to have a Philips hue light lying about. One regret however is the system not working to its full potential in the live demo on stage, but hey, we can’t plan for everything (and 90 seconds is a tiny amount of time to set up and show this).

I really enjoyed the weekend, and like to congratulate my talented team, Federico, Vlad, Bas and Chris for producing something really cool in such a short space of time.

Hard drive disk mirror

20130702-073402.jpg

I had made this a while back but it had recently been bought to my attention by my dad. It’s just a really simple idea to use the highly reflective disks in an old hard drive as a mirror. The hard bit is to do is open the hard drive but with the right screwdrivers that would be easy enough. I used blu tack to stick it to the side of my cupboard, but some tape, preferably double sided, would do the job fine too. Don’t forget to take out the neodymium magnet from the hard drive when you do open it, those are super strong. These type of magnets are impressive with ferrofluid if you try make some or purchase online.

Instructable: Parallel Lasers Using Line Level

Instructable: Parallel Lasers Using Line Level

I made a box that is able to convert a single laser beam into several that are parallel for the demonstration of refraction and convergence of light through glass/ acrylic blocks. This can be used in science, and physics lessons to show the direction light takes through blocks designed like a cross section of a lens, and clearly shows the differences in focal points between ‘lenses’ of different thicknesses.

Strange picture illusion

This morning I uploaded a picture to my instagram here.

I actually made this image as part of my gif to moire maker processing sketch I am developing, but I noticed whenever you scrolled or moved the image on your screen, it would make quite strange bands, similar to the magnetic fields around a bar magnet. Have a look at it and try scrolling up and down to see if it works for you!

Here’s a video of the gif to moire in action.

Instructable: 4 Frames Interactive Business Card

Instructable: 4 Frames Interactive Business Card

So I made some improvements to the design of the business card, and stuck a link to the file, click the link and check it out!

Here’s the same link thats on the instuctable: https://www.dropbox.com/s/qtv079h10hvtfa3/4framesInteractiveBusinessCard.xlsx

My Instructable: Make-shift camera stabiliser

My Instructcable: Make shift camera stabiliser

My brother and I have been wanting to make a camera stabiliser. There are many different types on the internet, particular one that we would base it on was found here. After discussing it a bit I remembered that there was a spare piece of metal from a shelf that I couldn’t use. I decided to attempt to make a crude prototype of the stabiliser. I had bent the piece the wrong way at first; I didn’t think the two metal rods would be much help to me, but I soon realised that if I bent it the other way, not only would I get a handle, the weight would no longer need a grip to stop it from slipping off.

I was both pleased and surprised with what I had made, enough so that I decided to make an instructable about it. Click the title of the post to have a look at it.