14 ms·
DIY Camera Using Raspberry Pi
- yoloswagins 6y agoI would love to see a guide to fitting an rpi camera module into a film camera back, to bring old film cameras into the modern age.
- fish_phrenology 6y agoI was thinking about this yesterday while looking for resources on building a board to read data from a modern sensor from something like an a7 (turns out its way over my head). The issue you’d run into with the pi hq camera module assuming you can get the focal plane right and everything to fit is that the sensor is way smaller than 35 film so you’ll have a rather large crop factor.
- throwanem 6y agoIt would have to vary pretty heavily by film camera model, and many probably can't be nondestructively modified that way. Nikon F and whatever Canon's film flagships were, sure - those are designed to take a motor drive winder, so you can remove the back cover entirely. But my heirloom Nikkormat FTn, for example, wasn't designed that way, and removing the film cover hinge pin would at best be a very fiddly task with a significant risk of damaging the hinge. That said, and assuming you use a camera module that you can disassemble far enough to expose the sensor, it shouldn't be too hard. You'd most easily I think design and 3D-print a replacement cover with a light-tight fitting to place the sensor on center at the flange focal distance (ie in the designed film plane), and route whatever cables out to where you could connect them. Maybe also a case for the Pi that has a 1/4"-20 screw to mount on the tripod socket, just so you don't have to cram your face past it to get a good look down the viewfinder. You'd probably have a hard time getting anything like a wide-angle shot. I don't know offhand what sensor sizes are common in RPi camera modules, but I feel like expecting 1"-class would be expecting too much, so you'd be dealing with a pretty fierce crop factor.
- dheera 6y agoI use film camera lenses all the time on my full-frame consumer digital camera, which is at present a slightly better way to bring 35mm film camera lenses back into the modern age. The problem with retrofitting a film camera back with a Pi camera is that the Pi camera has a dinky little IMX477 sensor which only covers a small, small fraction of the area that would normally be illuminated on 35mm film, so you would not get very good images at all. If they came out with a full-frame sensor that plugged into the Pi though, that would be awesome. That said -- that's for 35mm cameras. Now there are also other film cameras ... I am working on using a Pi camera to scan a large format 4x5 area to bring a Toyo view camera back into the modern age :). It takes a good 15-20 minutes to scan the image and I get gigapixel results. Still a work in progress. Un-doing the effect of CRA optimization on the sensor's microlens array is annoying. https://www.instagram.com/dheeranet.large/ https://www.instagram.com/dheeranet.large/
- JKCalhoun 6y agoCool. I remember when flatbed scanners were pressed into service to make (very) large format images. Stephen Johnson was playing around with this in the 1990's. http://www.betterlight.com/field_photography.html http://www.betterlight.com/field_photography.html "I initially captured 180 degrees of view in a 6,000 x 40,055 pixel image, but soon learned that Photoshop was limited to opening files with less than 30,000 pixels in either dimension, so I had to perform surgery on the original TIFF file to reduce the image to just under this limit."
- dheera 6y agoI thought about that method as well and after taking apart about 3 scanners it stopped being fun. Scanner assemblies are really hard to work with. Especially that some of them strobe colored RGB lights instead of a colored sensor, some use microlenses, and some won't start scanning if they detect that the light has failed (and you don't want the light for photography, so you disconnect the lights but then find that it refuses to scan). However if there's a hackable linear color CCD that is 4 inches long that I can wire into a RPi that might be super interesting.
- fish_phrenology 6y ago
- CloselyChunky 6y agoDuring the quarantine, I started photographing on film, developing the film at home and digitize the negatives using my DSLR. At least for B/W film, the process of developing film yourself is dead easy and I'm happy to have a hobby away from my computer. Also, having a price per picture and only a limited amount of shots helps me actually think about composing nice pictures instead of taking 5 almost identical images and moving on. In general, film photography is having a comeback. Prices for used film cameras skyrocketed in the last years for a few models. Personally, I find photographing on film really rewarding. Having a physical product in the end (be it a print of the image or only the negatives) makes the process more enjoyable. So if you have some old film cameras lying around, I can only recommend giving them a try. Maybe there are even old films with old memories in these cameras.
- brudgers 6y agoThe issue is the difference in “sensor” size. The “crop factor” of the rPi camera is 5.5 so a 50mm lens provides an angle of view equivalent to a 275mm lens for 35mm film. To get down into “normal” lens equivalent would require something like 8mm. A fisheye would probably be ok because the center tends to be relatively less distorted. But if there are 8mm rectilinear lenses for 35mm film cameras you probably can’t find one and maybe not afford one...Its price would buy a lot of film. I mean there are digital sensors that retrofit film cameras. Products for Hasselblad 500 series and Mamiya RB have been around since the early days of digital. They have always been less than $100k and still are today. Anyway if you want to use an old film camera, just buy some film and have a go. They are incredible mechanical devices and a pleasure in the hand and produce that film look naturally.
- geerlingguy 6y agoHeh, with the amount of cropping, you don't need a rectilinear fisheye!
- daveslash 6y agoThis may be a dumb question, but I haven't borked around with the Pi Camera at all yet.... Why does the lens have a megapixel rating? I'd assume that there's no imaging sensor in it, right?
- deleted 6y ago[deleted]
- throwanem 6y agoIt doesn't make sense, no. The whole article seems very barebones - I'd have expected to see discussion of how the sensor-lens system needs to work for proper focus, at least. Granted they link the STL for their case, which will be designed for correct alignment, but some discussion would still be useful to those wanting to mod for different lenses or sensors.
- commonvision 6y agoCorrect, the MTF of a lens is meaningless unless the lens and sensor are aligned (aka focused) correctly. Contrast in the image is directly related to the square-wave geometrical MTF. Once you factor in focus/alignment error, it can be difficult to tell the difference between a "3MP" and "12MP" rated lens. We're talking about <10 micron accuracy. This is why companies like Apple use 6-axis active alignment machines to manufacture every camera module. The "Megapixel" rating of a lens is based on the nominal as-designed MTF and image sensor Format. There's a lot of manufacturer fudging that goes on with these ratings. And some in China literally print whatever they want on the side of a lens. I've seen the same lens with both "3MP" and "5MP" printed on it. Here are a few tips on how to focus a camera. Regardless, it'll be hard to get within 2-5 microns with a CS Mount 1"-32TPI thread. https://commonlands.com/blogs/technical/how-to-focus-a-camera https://commonlands.com/blogs/technical/how-to-focus-a-camer...
- dheera 6y agoThe lens having an MP rating is likely just saying that the optics is good enough to resolve an image to the detail that a 10MP sensor would capture. I know it's a shitty way to specify lens resolution, but that's likely what the manufacturer called it, not the fault of the article's author.
- dheera 6y agoI really really really wish RPi would come out with a real HQ camera with at least an APS-C if not 36x24mm sensor. This dinky little IMX477 sensor is MQ, not HQ. The uses would be endless, ranging from astrophotography to real professional-quality shots with homemade, scriptable cameras; shots synced with high-speed motion; a whole new era of homemade SLRs and mirrorless cameras that are actually competent; lots of things I can think of.
- JKCalhoun 6y agoI agree, it would be nice, but is there no way for you or me to construct such a thing using some existing chipset or module and constructing an interface to the Raspberry Pi?
- terramex 6y agoRPI HQ camera is almost usable for astrophotography, here are few shots I did with it last year: https://terramex.neocities.org/astro/ https://terramex.neocities.org/astro/ Of course it make little sense from financial point of view as good star tracker and optics are magnitudes more expensive but it was fun. I agree with rest of your post. Even MFT-size sensor would be great as there are plenty great lenses with that image circle size.
- dheera 6y agoYeah it's barely usable, but not great, because ultimately larger sensors will still give you better SNR for astrophotography. A sensor with 10X the area will be able to produce an image with the same final SNR in 1/10 the time. Also I had lots of faint banding issues with RPi cameras. Nobody was able to solve my problem on forums. https://www.raspberrypi.org/forums/viewtopic.php?t=287866 https://www.raspberrypi.org/forums/viewtopic.php?t=287866
- terramex 6y agoI've seen similar banding in some tests when I had set analog gain to 1.0 on a warm night. With analog gain set to 16.0 and Peltier cooler attached to back of camera PCB it was gone. My guess is that IMX477 does some software de-noise that causes banding. I tested this guess by calculating power spectrum of a dark frame and there was noticeable drop in higher frequencies. Unfortunately, even disabling hot-pixel detection did not help. I did not investigate it further.
- mattowen_uk 6y agoI toyed with this idea, as I find taking pictures with my phone to be an unsatisfactory experience, and carrying around my Canon EOS is annoying as it's too bulky. What stopped me was: 1) Raspberry PI boot-up time. It's long enough to prevent you from quickly snapping a picture when you see it - you have to be prepared. 2) Battery power that doesn't run down within a couple of days of non-use.
- bduhan 6y agoBoot times of 3-4 seconds are achievable with a customized buildroot [1] [2] if you don’t need network, USB, HDMI, and other services. [1] https://mitxela.com/projects/thermal_paper_polaroid https://mitxela.com/projects/thermal_paper_polaroid [2] https://himeshp.blogspot.com/2018/08/fast-boot-with-raspberry-pi.html https://himeshp.blogspot.com/2018/08/fast-boot-with-raspberr...
- geocrasher 6y agoI have to wonder what phone you've got. I have a Pixel 4a 5G and it takes the best pictures out of any camera I've had (usually cheap Canon PowerShot's, which are GREAT cameras). I've been extremely impressed with its abilities. I can't imagine that any homebrewed solution could match it without thousands of hours of work.
- mattowen_uk 6y agoI think it's me tbh. Trying to hold the phone, and press the on-screen buttons just isn't a nice workflow for me. I miss using a proper camera form factor.
- brudgers 6y agoThere are boatloads of 12 megapixel or better point and shoots in the used market that will produce excellent pictures. A much better experience than a phone because it's a dedicated device. And because they usually have a substantial zoom range from wide to tight. With only a slight bit of patience, you can pick up something like a Panasonic Lumix ZS-6 for $30 on US eBay including shipping. Long battery life, fits in a pocket. I removed the hot-mirror, epoxied a 720nm filter to the front and use mine for infra-red. Only slightly larger, the Sony NEX C3 is a tiny APS-C camera, not much bigger than a point and shoot. It was the second iteration of the NEX3. Paired with the slightly more recent 16-50mm pancake zoom, it is a great everyday carry with 16mp. To me, an rPi camera is an interesting idea and for a specialized use, its programmability would be an advantage. As an everyday camera, it's a bit absurd beyond telling people about it. YMMV.
- abdullahkhalids 6y agoAs a prof seeings students waste time scanning their homework, one gadget I want to build is a easy to use scanner, with a Rpi Zero and a cheap camera. The idea is to have the camera with a wide angle lens attached to the top of stack of papers/notebook. Pressing a button takes a picture, and then does a affine transform (?) on it get the perspective right, then uploads it to the LMS. Just a clean, hassle free experience. No orienting your phone awkwardly, no getting the lighting right, no mini edits on your phone, no compiling pdfs. Also, very useful for me, as I like to do math by hand. Edit: Image https://imgur.com/Fb45H7M.png https://imgur.com/Fb45H7M.png The fact that camera is fixed relative to paper means the transform is also fixed. Multi-colored led (and knowledge of paper color) can also fix lighting.
- jimbob45 6y agoDo you not accept phone pictures of homework? That's what I used to submit and the clarity was enough for TAs to be able to readily spot mistakes.
- abdullahkhalids 6y agoOf course I do. But students are probably taking like 50 pictures a week for their various courses. I don't think they like the tediousness of it. Plus with this, I could look at student solutions much easier during class or office hours. Similarly, I don't want to whip out my phone to take 30 pictures of my research notes one by one.
- mlyle 6y agoClearscanner on the phone does this -- my kids use it for their homework. Snaps pictures, finds edges, does affine transform, corrects exposure, and assembles into PDF.
- sneak 6y agoI went into the app store to see about this app, having not heard about it yet. The app's privacy policy says it uses Firebase (Google) Analytics, which transmits information about your use of the app off the device without consent. This, to me, means I can never trust it for scanning sensitive or private documents, because who knows what it's sending. I declined to install it. YMMV.
- rubatuga 6y agoJust buy a used Lumix GF2
- ajsharp 6y agothis is amazing :)
- jrussino 6y agoIs there a solid open-source Rpi-based home security camera solution yet? I'd like to set up something of comparable quality to say a Ring doorbell camera or a Nest/Blink security cam or a baby monitor but that I can fully control.
- buran77 6y agoHave you looked at motionEyeOS? I'm not sure how it compares to Nest/Blink but I got along very well with it since 2015 (originally as motionPie). https://github.com/ccrisan/motioneyeos https://github.com/ccrisan/motioneyeos
- varispeed 6y agoI've been thinking about just getting off the shelf system like Hivision IP camera and NVR, then run it on a separate network disconnected from internet. It shouldn't be much more expensive, but still I'd probably disassemble cameras to make sure there is no wifi of other means to leak data.
- markfchapman 6y agoI'm thinking of looking at this... https://github.com/ccrisan/motioneyeos https://github.com/ccrisan/motioneyeos ...has anyone used it?
- chrsstrm 6y agoMotionEye works very well. Read all the docs first before messing with the settings as they are not intuitive - trying to tweak the motion trigger settings is a bit of a pain (frames threshold, timeout, etc.) but can be done and there is a debug frame setting which is helpful. Works with the Raspberry Pi cameras but also with any USB cam as long as you choose the correct driver. I have an IR nightview USB cam that gives superior night shots and doesn't require additional power outside the USB connection. You can save all files locally or send them to any number of services - I have all my photos and videos dropped into Google Drive. I'm also using DuckDNS for external access to the IP cam port for a real-time view into my home whenever I am out and about. The network stream feature in VLC on mobile works really well for that. The only issue I've come across (and this was ~4 months ago) is that 8GB RAM Raspberry Pi 4's are more trouble than they're worth for this application - software support was very much lacking but the 4GB Pi's work very well.
- augbot 6y agoThere are c-mount to Canon EOS lens adapters. Could take this project to the next level!
- graiz 6y agoI tried this with little success. The c-mount is such a cropped sensor that even with the EOS lens adapter you only get the middle of the shot... also I haven't found a good solution for focus and f-stop that is buried inside the EOS pin protocol. I'm sure it's solvable but haven't found it yet.
- geerlingguy 6y agoThe big problem is unless you use fisheye lenses like 6 or 11mm full frame (35mm equivalent), the full frame equivalent focal length you get with the HQ camera sensor is practically in the exotic telephoto range, it's a crop factor of like 5.2x. It's nice for things like astronomy (your nice 200mm f/2.8 is now 1000mm+) or bird/nature watching, but it's highly impractical for anything but specialist portraiture or walk around use. Most of the c mount lenses available are pretty poor, and getting focus right with anything not way stopped down (especially without a large display) can be super tricky.
- MarcScott 6y agoReally nice to see gpiozero being used in the wild. https://gpiozero.readthedocs.io/en/stable/ https://gpiozero.readthedocs.io/en/stable/