Katherine Scott, newly equipped with a Raspberry Pi camera board, was looking for an image processing challenge. She realised she had an unused panoramic lens for an iPhone rolling around in a drawer somewhere at home, and got to work with the silly putty and cardboard to hook it up to the camera board.
The raw output from a lens like this gives you a doughnut-shaped image and a lot of surrounding cruft – Katherine uploaded some unmanipulated footage from the camera to YouTube to demonstrate what she had to work with. Katherine’s job was to cut and unfold that doughnut, until she had a dewarped it into a recognisable rectangular image. To do this, she needed to understand where the centre of the doughnut was, what the radius of its hole was, and what the radius of the doughnut itself was. This information meant she’d be able to be able to map all the points in the image, and then translate them to a rectangle instead of a torus. Here are her notebook calculations: Katherine coded all this in Python and has made it available for you to play with on GitHub. The results: You can read much more, including a first draft of the dewarping code, Katherine’s plans for the project (which include 3d printing a more robust shim to attach the lens to the camera – we’re kind of sad about that, because we love the silly putty) here on her blog. The rest of the website is also well worth a browse; Katherine’s got some really interesting computer vision projects on the go. Thanks Katherine – we’re looking forward to seeing what you do next with the camera board! |
A Semi-automated Technology Roundup Provided by Linebaugh Public Library IT Staff | techblog.linebaugh.org
Monday, August 19, 2013
Dewarping 360° images from the Pi camera board
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment