spikedrba
Posts: 75
Joined: Fri Feb 28, 2014 2:19 am

Interfacing Pi to Sony 1/3" CMOS PCB and night surveliance

Wed May 06, 2015 4:43 am

Hi there,

I've been working with the pinoir camera module and come to the, I guess obvious, conclusion that something designed for mobile phone usage is never going to operate well in low light. Even in full moonlight (which should be close to 0.8lux) and a lot of IR light I still get pretty noisy footage so my plans to use the picamera as the base of a security camera project is unfortunately fading.

99% of the security cameras out there seem to mount some kind of sony PCB with 1/3" sensor that seems to be able to operate around 0.01lux and should produce much better video at night. However they all are designed to connect via BNC/video , which some people seem to have had some success at using the easycap usb video capture thingie. The idea of using USB however isn't very attractive given it's sharing bus with the ethernet port, so acquisition and streaming would probably get in each other's way.

Is there any kind of circuit I could put together to get the video feed out onto the CSI-2 cable or something else? am I talking non-sense?

thanks,

Spike

riklaunim
Posts: 265
Joined: Tue Apr 22, 2014 7:34 pm

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Wed May 06, 2015 6:18 am

lux isn't an exact measurement of sensitivity. If you change the lens the lux value changes as well. CCTV cameras often have integration or other solution to boot image quality. Machine vision cameras (USB/GigE/Firewire) can do longer exposures or control gain and other settings better, but will cost more too ;)

spikedrba
Posts: 75
Joined: Fri Feb 28, 2014 2:19 am

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Wed May 06, 2015 7:38 pm

riklaunim wrote:lux isn't an exact measurement of sensitivity. If you change the lens the lux value changes as well. CCTV cameras often have integration or other solution to boot image quality. Machine vision cameras (USB/GigE/Firewire) can do longer exposures or control gain and other settings better, but will cost more too ;)
understood that lenses matter too, and agreed on machine vision stuff, the problem is the same tho, no matter what I buy the issue is processing that video stream. Just like in the case of the sony PCB I mentioned you always end up with a video stream on the CPU, which has two problems:
1) it's worthless for further processing/motion detection - that needs to happen on the GPU
2) the pi has no GigE/firewire so USB is the only option, but that's 2.0 only and shared with the ethernet port

so we're back to my original question: would it be possible to interface one of these cameras to the Pi without having to go through the USB port and feed the video straight to GPU for processing?

thanks,

riklaunim
Posts: 265
Joined: Tue Apr 22, 2014 7:34 pm

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Wed May 06, 2015 7:43 pm

Only Pi Camera can do it. Or change the single board computer for something else so that it won't be a problem to use one of those simple connectors. To use a CCTV with any computer you will need a frame grabber which in most cases will be a USB dongle (or PCIe/PCI controller). Some machine vision camera makers support ARM and mention Raspberry so their SDK should also allow more efficient than plain CPU video processing (but it needs verification).

ghans
Posts: 7873
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Thu May 07, 2015 7:42 am

You will not get access to the powerful Image Sensor Pipeline of the Raspberry Pi. That is top-secret IP. I think the Pi is the wrong
platform for you and the solutions which can do what you want won't be cheap on principle.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
RaTTuS
Posts: 10458
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Thu May 07, 2015 8:41 am

there are loads of IP cameras that can be had for quite cheep
720p > £30
those use ethernet and not BNC and output h264

those will not interface to a RPi easily though

however - the Pi Noir is fine if given enough illumination from IR LED packs
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

spikedrba
Posts: 75
Joined: Fri Feb 28, 2014 2:19 am

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Thu May 07, 2015 2:58 pm

RaTTuS wrote:there are loads of IP cameras that can be had for quite cheep
720p > £30
those use ethernet and not BNC and output h264
Any link? because loads,yes, loads of decent ones, don't think so. The ones I've tested will degrade substantially at night and not remotely come close to the specs on the box, not to mention a lot of lag. For example one of the newest foscams will advertise 30fps 720p, but try to stream that with mplayer and you'll get even more than 2s lag (plugged on the same switch). I get nothing like that with the pi streaming h264 with netcat (classic howto example - ethernet plugged into same switch).
those will not interface to a RPi easily though
right, this remains the biggest issue. I don't know if with zerocopy you could shift those packets from ethernet to GPU in a gulp and do something with it, but I doubt you can get anywhere close to what'spossible today with the Picamera.
however - the Pi Noir is fine if given enough illumination from IR LED packs
yes that's what I'm doing right now.Speaking of which, do you have experience with different LEDs, wavelenghts and so forth? I haven't managed to test 880 Vs 940 for example, or how different glasses in front of the array will help with focusing and overall illumination.

thanks,

Spike

User avatar
RaTTuS
Posts: 10458
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Thu May 07, 2015 3:08 pm

spikedrba wrote: Any link? because loads,yes, loads of decent ones, don't think so. The ones I've tested will degrade substantially at night and not remotely come close to the specs on the box, not to mention a lot of lag. For example one of the newest foscams will advertise 30fps 720p, but try to stream that with mplayer and you'll get even more than 2s lag (plugged on the same switch). I get nothing like that with the pi streaming h264 with netcat (classic howto example - ethernet plugged into same switch).
Umm I don't have a link handy but will see if I can find it one- give me 24hours
I'll also see if I can get a bit of video uploaded to youtube
...
yes that's what I'm doing right now.Speaking of which, do you have experience with different LEDs, wavelenghts and so forth? I haven't managed to test 880 Vs 940 for example, or how different glasses in front of the array will help with focusing and overall illumination.
I've had moderate success with stuff similar to :-
http://www.ebay.co.uk/itm/48-LED-illumi ... 1459719920

but no videos to show

what sort of viewing area are you looking at
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

spikedrba
Posts: 75
Joined: Fri Feb 28, 2014 2:19 am

Re: Interfacing Pi to Sony 1/3" CMOS PCB and night survelian

Thu May 07, 2015 4:19 pm

RaTTuS wrote: Umm I don't have a link handy but will see if I can find it one- give me 24hours
I'll also see if I can get a bit of video uploaded to youtube
ok, cool, looking forward to it!
I've had moderate success with stuff similar to :-
http://www.ebay.co.uk/itm/48-LED-illumi ... 1459719920
I have the same one. I've also tested this one:
http://www.ebay.co.uk/itm/48-LED-Illumi ... 486f4aa79a

same performance, just shoddier plastic casing, so I stuck with the other one.

That said in neither case I could find specs as to what those LEDs are, ie what wavelenght and kind (I doubt they are high powered one, tho). Also in the description they talk about 20m and just like any other IR spec I don't know what these ppl do, but you're lucky if you get half of it... maybe they test in a lab or just use nominal characterestics.

I've been wondering what would happen if I built my own array using high quality high intensity LEDs like these ones:
http://www.adafruit.com/datasheets/IR33 ... asheet.pdf
what sort of viewing area are you looking at
162x142ft fence perimeter, at leat 30ft depth

Return to “Other projects”