Raspberry Pi Camera
Joe Watson (3363) 1 post |
I am entirely new to RISC OS, but it is one possible operating system for the Raspberry Pi. Clearly, the Pi Camera is one of the most popular Raspberry Pi accessories. I want to develop a system that takes a still picture and then processes the image data to decide what to do with some GPIO signals. I have been using BASIC and BASIC-like languages since the late 1960s so I very much want to use BASIC. I am drawn to BBC BASIC which looks more suitable to me than RTB or FUZE BASIC under the Raspbian OS. I would be most excited if BBC BASIC talked directly with the camera but I doubt that support is in there. It would be nearly as good if it is possible to capture a still image into a data file and then have the BBC BASIC program process the file. Such a file could contain bytes with any bit patterns. That is, it would be a binary data file, not an ASCII data file. So now the first big question is, “Is there any support in RISC OS on the Raspberry Pi for the Pi Camera?” If not, is any such support under development or expected soon? Thanks |
Rick Murray (539) 13850 posts |
As always with questions like this – the true first big question is: Is the camera interface documented anywhere public? The camera interface is controlled via the VCHIQ driver, which is the GPU interface, as it is the GPU that talks to the camera. There are proprietory libraries available for Linux, plus an open source “wrapper”. It looks like the camera communicates with the GPU using IIC. It may be possible to talk IIC to the camera to bypass the GPU. But you’ll need a datasheet on the OV5647 sensor, plus to be au-fait with the image packing as you’ll be reading Beyer data directly from the sensor, none of the fancy stuff (denoise, gain, etc…) that the GPU/driver adds. No sensor on the planet hands back a nicely formatted JPEG. Note well that the Pi foundation says that the effort to support a new CCD sensor is measured in man months. Even with IIC interfacing, setting up the timing is critical, then the work involved in turning the Beyer data in whatever weird format the camera uses into something that resembles a picture, not to mention the chatter involved in white balance, exposure, etc. Quote: So this is not a beginners topic at all. It’s not “I’ve got this new sensor, now I can plug it in and get pictures out”, very far from it. [ref: Google for “Raw sensor access / CSI-2 receiver protocol” on raspberrypi.org] Remember, as we (RISC OS) can’t make use of Linux modules, we’d be basically reinventing the wheel and… it’s not a “plug it in, pull out data” type of thing. I’d love to see some sort of camera support under RISC OS. Maybe some day… |
Rick Murray (539) 13850 posts |
What resolution are you hoping for? There are camera modules up to ~640×480 that communicate via serial port. Larger image sizes are available with USB camera modules, perhaps you might fare better if you can find one with a decent datasheet? By doing this (using a standalone camera module), there is usually some sort of microcontroller on the module that turns whatever the sensor sees into a nice friendly JPEG. You don’t get this with a CIS camera module (which is why they are cheaper – they’re just the sensor). |
Ron (2686) 63 posts |
What about an ip camera that can save to a network drive or email the image? Just a thought Ron |
Rick Murray (539) 13850 posts |
Only if you can lock it down tighter than a nun’s you-know-what. Seriously, what I describe here is nothing short of horrific, and since it’s like a one line fix, a great example of why we should shun devices that aren’t open source: My other IPcam seems a little better, but I’ve not walked the filesystem yet. Plus, while it is a nice 720P camera, the images that it emails in automatic mode are low resolution and compressed so hard that when I had a shot of the postal employee delivering the mail, I couldn’t tell if it was male or female, example: The tl;dr version: Smart devices are good so long as they aren’t too smart. If they connect to a USB or serial port, they’re smart. If they connect to your router and expect internet access, they’re too smart. And that’s a liability. |
Raik (463) 2061 posts |
Any news about the Pi camera support? I use my IP cam via RISC OS mplayer and can record the stream with ffmpeg… |
Rob Andrews (112) 164 posts |
Any more news on using the Pi camera. |
shaun (8725) 1 post |
This camera can support RISC OS Open: https://www.e-consystems.com/raspberry-pi-4/high-quality-mipi-csi-camera.asp. Any idea? |
Timo Hartong (2813) 204 posts |
Again it is extreamly vague how to access a camera bare metal on the Pi. And I think RISCOS lacks a camera API. |