fbrunell
Posts: 10
Joined: Thu Sep 05, 2013 2:55 pm

2x2 pixel binning

Mon Sep 16, 2013 6:13 pm

I've seen quite a few posts on this forum and others about the possibility of 2x2 pixel binning as a way to improve the low light performance. Even the datasheet for the camera chip states it as a possibility. Has anyone successfully done it?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: 2x2 pixel binning

Mon Sep 16, 2013 6:56 pm

To be done in real time it would need to be a code change on the gpu, which limits the changepeople who have access to the code. Its on my list of stuff to do.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

lingon
Posts: 157
Joined: Fri Aug 26, 2011 7:31 am

Re: 2x2 pixel binning

Tue Sep 17, 2013 7:41 pm

jamesh wrote:To be done in real time it would need to be a code change on the gpu, which limits the changepeople who have access to the code. Its on my list of stuff to do.
Will this be implemented both for stills and for videos? Will there requirements that the resolution used has to be exactly the sensor resolution divided by some integers, 2, 3, 4, ...?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: 2x2 pixel binning

Wed Sep 18, 2013 8:25 am

lingon wrote:
jamesh wrote:To be done in real time it would need to be a code change on the gpu, which limits the changepeople who have access to the code. Its on my list of stuff to do.
Will this be implemented both for stills and for videos? Will there requirements that the resolution used has to be exactly the sensor resolution divided by some integers, 2, 3, 4, ...?
I'll be adding another mode for video that uses binining to give a full FOV rather than the crop we currently have.

Generally, as you pick different resolutions of output, the system will choose the closest mode, then scale to the specific requested size.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

fbrunell
Posts: 10
Joined: Thu Sep 05, 2013 2:55 pm

Re: 2x2 pixel binning

Fri Sep 20, 2013 8:57 pm

Glad to hear it is planned. I had seen some other info about software binning, but that would be counter-productive (summing the light and the noise). I have had great success using the camera during the daytime for timelapses:
http://youtu.be/RjU791vZ2Us
The quality of the video is low because of the timelapse software I used. In actual use, the Pi is running a script which grabs a pic every few seconds. The same script also uploads that image to an in-house FTP server. Then, our weather system grabs the image from a webpage that is hosted on the FTP server.
Needlessly complicated? Yes, but some of the system cannot be changed by me. The next step for me is to turn the script into a service so it auto-starts without logging in (when I get the time).

The code:

Code: Select all

#!/bin/bash
# Timelapse capture

echo "Timelapse Capture Script"

HOST='*.*.*.*'
USER='*'
PASSWD=''
FILE='image.jpg'
NUMBER=0
COUNTER=0

while [ $NUMBER = "0" ]; do

raspistill -t 2000 -ex auto -w 1920 -h 1080 -o image.jpg

sleep 2
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
cd /Photo
binary
put $FILE
quit
END_SCRIPT
echo "Uploaded"
sleep 18
done
You may notice the "COUNTER" value. That is to set up a secondary loop that would upload to another FTP site less frequently (a multiple of the primary loop counter).

Return to “Camera board”