News for hackers. Stuff that matters.
Re:DIY Camera Using Raspberry Pi by dheera on Monday April 19, 2021 @12:30PM (#26864642)
I 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.

Re:DIY Camera Using Raspberry Pi by PragmaticPulp on Monday April 19, 2021 @01:34PM (#26865593)
APS-C sensors are still significantly more expensive than common sensors like the IMX477. Demand would be much lower due to the high price for the sensor and additional cost for lenses and mounting hardware.

RPi foundation isn't really targeted at the niche, high-end, low-volume markets that demand the best of the best. They're great at delivering an excellent compromise of cost and quality. The IMX477 is just right for most use cases.

The sensor alone doesn't deliver 100% of the result of a modern SLR. The image processing code does a lot of heavy lifting that is mostly proprietary. The open source options are improving, but connecting an APS-C sensor to an R-Pi wouldn't automatically give you a DIY SLR competitor.

You'd spend a lot more in the process and get worse results than just buying a commercial SLR camera and running open-source scriptable firmware like Magic Lantern: https://magiclantern.fm/

Re:DIY Camera Using Raspberry Pi by porphyra on Monday April 19, 2021 @02:50PM (#26866546)
APS-C sensors are maybe only a few hundred bucks.

I would love to have a nice APS-C or full frame board-level camera that can be easily integrated into something like a Raspberry Pi. At present it is nearly impossible to get something like that --- dev kits for large sensors from Sony Semicon, Canon, and ams are profoundly expensive, only sold to companies, and go through a lengthy quoting process.

> The sensor alone doesn't deliver 100% of the result of a modern SLR. The image processing code does a lot of heavy lifting that is mostly proprietary.

This is HN, hackers like us love to be able to tinker with the heavy lifting. That's the whole point of the Raspberry Pi cameras. Even with the current HQ camera, a used point-and-shoot camera with a similarly-sized sensor (or even bigger sensor) would tend to produce better images and videos while being more compact, robust, convenient, and cheaper than the DIY camera.

Re:DIY Camera Using Raspberry Pi by shash on Tuesday April 20, 2021 @12:29AM (#26870676)
APS-C might be a tough ask, but something like this[1] or this[2] might work - smaller sensor but at least you won’t get a ridiculous crop factor on APS-C lenses. The second one says it’s format is APS-like.

But I’d say an RPi alone would be a bit tough to handle something like this. You’d need at least an FPGA to control the sensor and maybe something like RPi for UI and further processing.

But it’ll be expensive. These components are anything between $500 and $3000, and that’s _without_ the FPGA and other things that would be required. An equivalent crop frame camera might be only $1000(?). If the aim is to have a DIY hackable camera, sure. If you want a cheap camera, no...

[1] https://media.digikey.com/pdf/Data%20Sheets/Canon%20USA%20PD... [2] https://ams.com/documents/20143/36005/CMV12000_DS000603_3-00...

Re:DIY Camera Using Raspberry Pi by dheera on Monday April 19, 2021 @03:04PM (#26866705)
> At present it is nearly impossible to get something like that

So in the astrophotography world they exist. This for example:

https://astronomy-imaging-camera.com/product/asi6200mc-pro-c...

uses an IMX455 full frame sensor, gives you a reasonably hackable full frame camera (not that well supported, but there are grassroots libraries around) but it's $4000 because it's also a cooled camera.

If they had a version of it that's not cooled and just for normal photography for $1000 that'd be awesome.

Re:DIY Camera Using Raspberry Pi by PragmaticPulp on Monday April 19, 2021 @03:21PM (#26866875)
> APS-C sensors are maybe only a few hundred bucks.

Where are you sourcing APS-C sized MIPI CSI sensors for a few hundred bucks in low quantities?

Larger sensors tend to use SLVS-EC interfaces rather than MIPI CSI used in the Raspberry Pi. The Raspberry Pi doesn't even support full 4-lane MIPI-CSI (except on the CM4). It's limited to 2-lane MIPI-CSI.

Re:DIY Camera Using Raspberry Pi by dheera on Monday April 19, 2021 @02:48PM (#26866521)
> Demand would be much lower

Lenses for full frame cameras are super cheap -- you can find tons of old Russian, Japanese, and East German lenses that will work really well. Many of those lenses are built like tanks and can be had for <$100, some <$50. Most of them produce very nice images and aesthetically have much better look than what I see out of these CCTV lenses for the Pi HQ camera. CCTV lenses were never designed for art, and among other things produce horrible out-of-focus highlights.

> The image processing code

Well yes, that's also the point, by having an open source APS-C or full frame camera you can tinker to your heart's content with changing the image processing code.

I use Magic Lantern extensively and there's only so much you can do with it, and it's a pain in the ass to recompile code for it. Having a full-fledged Linux system with gcc, opencv, python, and pytorch at my disposal on camera, and with Wi-Fi, Bluetooth, USB, and running an SSH server, and the ability to connect arbitrary I2C and SPI sensors, would be freaking amazing, to say the least.

Wildlife camera with thermal camera trigger and a neural net that recognizes mountain lions? You got it.

LIDAR-based insanely accurate servo-driven autofocus? You got it.

Microphone array that figures out who in the picture is talking and refocuses the camera to that person? You got it.

Home-made Alt-Az tracker with built-in autoguider and remote Wi-Fi progress monitoring? You got it.

And if it can be made to work with the Pi, someone will hopefully also make it work with a Jetson Nano or Xavier NX and then voila I could do some neural net processing in real-time on-board. I've been able to blow Canon's in-camera denoising out of the water with state-of-the-art neural nets by postprocessing RAW images, and if I had a Xavier or Nano on-board I could easily put those neural nets in-camera for convenience.

The possibilities are endless, which is why I really want this hardware so much.

Re:DIY Camera Using Raspberry Pi by PragmaticPulp on Monday April 19, 2021 @03:32PM (#26866987)
Everything you described can be built out with this existing sensor and hardware.

You don't need an APS-C or larger sensor to get decent images. Most APS-C sensors use a different high-speed interface that won't work with the Raspberry Pi anyway.

Really, this solution from the Raspberry Pi foundation is a great start for any of the projects you mentioned. It's also cheap and highly available.

Re:DIY Camera Using Raspberry Pi by dheera on Monday April 19, 2021 @04:17PM (#26867469)
> You don't need an APS-C or larger sensor to get decent images.

I don't have the space and time to debate the merits here but there is a reason they exist, there are lots of things you can get by having a large sensor (including a different aesthetic and better SNR for low light images) and I want those things with a hackable interface and programmatic control of whatever the sensor is capable of.

I've been doing photography with full frame sensors for a a decade after upgrading from APS-C and telling me "you don't need an APS-C camera" without understanding why I use a full frame camera or the work I produce with them isn't really helpful.

Re:DIY Camera Using Raspberry Pi by molofaha on Monday April 19, 2021 @09:08PM (#26869674)
The thing is, if you want to use existing older camera lenses a large sensor is a hard requirement unless you want an ultra-zoom. Which is why people are having success with the rpi sensor for astrophotography, but this article is about making a portable, everyday camera; I'd quite like to be able to use my old Nikon 20mm as a 20mm, not a... um, 112mm or thereabouts.
Re:DIY Camera Using Raspberry Pi by bmurphy1976 on Monday April 19, 2021 @02:49PM (#26866532)
Also fix the interface so that you can actually record 4k video. The sensor is capable but the interface is not.

https://www.raspberrypi.org/forums/viewtopic.php?t=281095

Re:DIY Camera Using Raspberry Pi by terramex on Monday April 19, 2021 @01:15PM (#26865298)
RPI HQ camera is almost usable for astrophotography, here are few shots I did with it last year: 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.

Re:DIY Camera Using Raspberry Pi by mnw21cam on Monday April 19, 2021 @01:44PM (#26865774)
I'm just comparing your Bode's Galaxy (f/3.3, 200mm, 120x21s) with my recent attempt (f/6.3, 600mm, 42x30s), and besides magnification, the result seems fairly similar - if anything, I think the dark sections of your image are less noisy. Your arrangement collected about 7.2 times as much light (ignoring magnification), so that's not surprising. I was using a Nikon D7500, so if the RPI HQ camera is comparing reasonably favourably with that, then yes that's not bad.
Re:DIY Camera Using Raspberry Pi by walrus01 on Monday April 19, 2021 @11:20PM (#26870339)
This makes me wonder what sort of semi-pro astrophotography might be possible using a disassembled small cinema camera (black magic pocket 6k, for instance, or a similar priced full frame mirrorless or DSLR) with a peltier cooler or refrigerant loop heatsink attached to its back side.

How close could one get in performance to a very costly astrophotography setup, for under $10k? Not counting the cost of the telescope/optics in front of it, just talking about the sensor part.

Re:DIY Camera Using Raspberry Pi by dheera on Monday April 19, 2021 @01:33PM (#26865578)
Yeah 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

Re:DIY Camera Using Raspberry Pi by terramex on Monday April 19, 2021 @01:54PM (#26865904)
I'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.

Re:DIY Camera Using Raspberry Pi by dheera on Monday April 19, 2021 @03:07PM (#26866730)
> Peltier cooler attached to back of camera PCB

Do you have plans or pics of how to do this? Especially how to do it without getting condensation on the electronics?

Thanks!

Re:DIY Camera Using Raspberry Pi by terramex on Monday April 19, 2021 @03:56PM (#26867236)
Honestly, it is just a frankenstein monster of whatever I had on hand: https://imgur.com/a/QhvmbUa

3mm thermal pad I used between PCB and cooler: https://botland.store/thermoconductive-tapes-pastes/6060-the...

Radiator (I used the smaller one that typically goes on cold side of Peltier): https://botland.store/peltier-elements/10024-heatsink-with-a...

Fan is standard 40mmx40mm, there is some generic copper thermal paste between Peltier and radiator. The plywood mount is DIY made with with hole drills. It is a bit too thick so I used 2x C-CS mount adapters (like the one bundled with the camera) to get more space, otherwise I would not be able to screw in lens adapter.

There was a bit of neoprene foam between radiator and fan to reduce vibrations but it looks like I lost it somewhere.

About condensation: it was always wet or even icy in operation but it never caused any electrical issues, I guess condensed water was not very conductive? Once on a cold night (about 5C) I had water condensation on the sensor itself but it did not cause any lasting damage. I've read that putting a fresh silica gel desiccant packet into lens adapter helps. I had plans to attach temperature probe to lens mount and control cooling power form Pi itself, will get back to it in the future. The camera sensor itself has embedded thermometer but it is not exposed in camera driver.

Re:DIY Camera Using Raspberry Pi by JKCalhoun on Monday April 19, 2021 @01:01PM (#26865084)
I 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?