felixpq
Posts: 11
Joined: Sun Jan 29, 2017 7:26 pm

Hummingbird stills

Thu Jul 13, 2017 7:48 pm

Hi every one,

I see a few post about say high speed photography using the pi camera module but I can't seem to find the answers I'd like. Essentially, I'd like to be able to take (hopefully great) hummingbird photos in a standalone fashion. So I setup the camera and come back later to see what great images I got...

Q1: Is motion or some other piece of software capable of detecting an hummingbird at say 2-4 feet? It could be quite a challenge I would guess. Though yes, I'd like to capture images of hummingbirds, I also have access to plenty of other slower and bigger birds. Any suggestions?

Q2: Assuming I (we) have a solution for detecting small birds coming into the filed of view, I'd like to be able to take as many 8 megapixels quality (no blur, no out of focus, etc) properly exposed shots as possible for a few seconds or whatever.

Q3: What about using flash or strobe?

I suppose a pi or even a pi zero GPIOs should be plenty fast enough to detect and trigger a camera (and strobes) to do what I want. Just a question of finding the proper hardware (camera, motion detection, ...) and software (I guess I'll have to write my own, python maybe), so any suggestions you might have will be welcome. I'd also like very much to capture images of other animals as well by day mostly but maybe at night as well and if I'm limited to daylight I want to have options like say use a flash or some other lighting or just wait until there is enough light. Lastly but not the least, all this on an as low budget as possible.

Thanks in advance

cpunk
Posts: 85
Joined: Thu Jun 29, 2017 12:39 pm

Re: Hummingbird stills

Thu Jul 13, 2017 9:51 pm

Hummingbirds have very fast-beating wings. :) So yes, software might be able to discern a hummingbird from other birds...

...with a fairly good rate of false positives and false negatives... meaning, it would likely not detect swans or eagles, and neither would it detect fruit flies or bees, but it might detect a fair bit of other phenomena. :D

https://xkcd.com/1425/ may be applicable too :P

And, I would not consume still images. I would consume and continuously store video, monitor the GPU-produced H264 motion vectors for vector groups with directions that alternate at the frequencies typical of hummingbird wings, and if such a frequency is detected, then mark the time when it was occurring. Later on, that part of video could be extracted and exported as still pictures. :)

And of course, my analysis might be suffering from the problem of "if my only tool is a hammer, every problem looks like a nail". :D For example, maybe a microphone could detect humming bird wings better... after all, they do produce a hum. :) But I am marginally competent only at machine vision, not at machine hearing... so I leave that for others to evaluate. :)

User avatar
Burngate
Posts: 6333
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Hummingbird stills

Fri Jul 14, 2017 9:55 am

I'm dubious about the "as many 8 megapixels quality (no blur, no out of focus, etc) properly exposed shots as possible" part.

A quick google found https://www.nps.gov/cham/learn/nature/u ... nglish.pdf
From that, with wing-beats at ~50 per sec, I would guess at <10ms per shot to separate the up and down beats.

In a separate thread viewtopic.php?f=37&t=188276 jamesh pointed to the camera details. https://www.raspberrypi.org/documentati ... /camera.md
In there, there is the Raspistill spec. It says there's a minimum of 30ms between shots.

Bare in mind the camera has a rolling shutter, so distortion of the wings is almost guaranteed

felixpq
Posts: 11
Joined: Sun Jan 29, 2017 7:26 pm

Re: Hummingbird stills

Fri Jul 14, 2017 3:26 pm

Hummingbirds have very fast-beating wings. :) So yes, software might be able to discern a hummingbird from other birds...
That's not exactly what I'm looking for. Here is a scenario of what I would like to be able to do, for example, I setup the camera, some lights (strobes or flash) if needed and some fix background like say a piece of cardboard so to reduce background noise and prevent false trigger. Now assume I have a Fuchsias already in place between the camera and the cardboard. A hummingbird represent approximately 0.1% (~8000 pixels) of the field of view (FOV) @ 1 meter, not much to say the least.

What I would like to do is
1a: detect when the hummingbird comes in the FOV. Can I?
1b: or better yet, find out where in the FOV is the bird, (region of interest maybe). Can I?
2: Trigger one shot after another at max resolution say for 5 seconds with or without using a strobe. I don't see anything in the docs the Pi cam uses the strobe output of the sensor Can I?

All this while I'm on the other side of the house drinking a beer or whatever.

From Raspberry.org here
https://www.raspberrypi.org/documentati ... re/camera/ and here
https://www.raspberrypi.org/documentati ... /camera.md
https://www.google.ca/url?sa=t&rct=j&q= ... hA&cad=rja

One could probably say that picture taking with a Pi camera is essentially a software thing. Though this rolling shutter seems to be implemented physically and since the (F-Stop) seems to be fix, that means the shutter is controllable in software in some fashion. Unfortunately, they only mention the maximum exposure time (6s) but they mention the setting is in microseconds...

If I understand correctly this sensor is design primarily to output video. But there is this raspistillyuv and raspistill to take single image at a time and though there is more or less complete information on the various setting. I'd like much more, are these programs open source? Even the Sony datasheet is almost useless but it shows there is a strobe trigger on the sensor which doesn't seem to be used on the Pi cam, that would be nice???

In photography, there is what is called the Sunny 16 rule which mean taking a still image on a sunny day using a camera with a fix F-Stop of 2 we need a shutter speed of about 1/16000 that means if anyone as taken a still on a sunny day with the Pi cam the shutter speed is plenty fast enough and it's likely my hummingbirds should be pretty close to being frozen.

So anyone taken any quality stills (full res.) on a sunny day using Pi camera module V2?

Thanks

felixpq
Posts: 11
Joined: Sun Jan 29, 2017 7:26 pm

Re: Hummingbird stills

Fri Jul 14, 2017 4:00 pm

Burngate wrote:I'm dubious about the "as many 8 megapixels quality (no blur, no out of focus, etc) properly exposed shots as possible" part.

A quick google found https://www.nps.gov/cham/learn/nature/u ... nglish.pdf
From that, with wing-beats at ~50 per sec, I would guess at <10ms per shot to separate the up and down beats.

In a separate thread viewtopic.php?f=37&t=188276 jamesh pointed to the camera details. https://www.raspberrypi.org/documentati ... /camera.md
In there, there is the Raspistill spec. It says there's a minimum of 30ms between shots.

Bare in mind the camera has a rolling shutter, so distortion of the wings is almost guaranteed
About the "I'm dubious..." actually in video mode the answer is 15 fps but in still mode it's not clear how it's done. I just need one good one but I already know it may take days if not a summer to get a great one. So I wonder if there is a difference between video and still mode especially regarding this rolling shutter thing.

I'll admit I don't understand this shutter thing, be it for taking video or still, a proper system should be able to synchronize all of this. From what I know about photography there is no way a mechanical shutter can operate at the speed required by using a F-Stop of 2 on a sunny day (~1/16000s) and that's no mistake, one sixteen thousand of a second. I wonder if there is an actual physical shutter on these camera. I'm curious of how they do that?

https://en.wikipedia.org/wiki/Exposure_value

YG

User avatar
Burngate
Posts: 6333
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Hummingbird stills

Sat Jul 15, 2017 10:36 am

felixpq wrote:I'll admit I don't understand this shutter thing,
You and me, both
be it for taking video or still, a proper system should be able to synchronize all of this. From what I know about photography there is no way a mechanical shutter can operate at the speed required by using a F-Stop of 2 on a sunny day (~1/16000s) and that's no mistake, one sixteen thousand of a second. I wonder if there is an actual physical shutter on these camera. I'm curious of how they do that?
No, there isn't a physical shutter.

On my old 35mm camera, there was a pair of blinds that moved across the film, each with a rectangular hole, such that the gap between the leading edge of one and the trailing edge of the other allowed light through for the required 1/16000s to each bit of film. So a rolling shutter. Movie cameras did the same, with a pair of rotating vanes,adjusting the phases changing exposure times. Nothing has to move very fast.
A Telecine machine was another kettle of fish. Using a standard video camera pointing at a film, it only had a few ms to move the film down ready for the next frame. The rather high acceleration / deceleration was enough to tear the film into shreds. http://ieeexplore.ieee.org/document/7263068/

Regarding a standard silicon sensor, each pixel can be emptied of charge a set time before it's read, or it can be left to gather charge from the last time it was read (reading a pixel empties it of charge)
Do that successively, and you've got a rolling shutter.

There's another thread that might be of interest. Take particular note of 6by9's comments - he does understand this shutter thing viewtopic.php?f=43&t=164007&view=unread#p1115195

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: Hummingbird stills

Sun Jul 16, 2017 3:36 am

Separately, the optics and sensor construction of the Raspberry Pi camera is not "great."
It's not bad -- it's cellphone-quality cameras, which are found in many places.
But if you want to take "great" pictures, you will need a larger sensor, and a more advanced lens.

felixpq
Posts: 11
Joined: Sun Jan 29, 2017 7:26 pm

Re: Hummingbird stills

Sun Jul 16, 2017 1:26 pm

I solve the problem I just bought a Nikon DSLR that I can control with a Pi for either trigger shots or time laps shots and of course use it as my new main camera.

But one thing these tiny camera have that no DSLR will ever have, that's the very short focal length I figured the Pi cam with its f2 aperture as probably a 5mm of focal length or just about, this why it as such a huge depth of field, which mean every thing is in ~focus from 2 feet to infinity. I comparison, my DSLR with a 60mm lens @ f32 can give a depth of field of about 10 feet to infinity and at f22 which is more usual max, the min distance goes up to 12 feet. You can forget low light shots of moving things at these f-stops.

Though the Pi cam V2 is relatively inexpensive I could simply buy one of these little camera and see for myself the quality of these image. I have a Samsung Galaxy Tab S2 and the quality of the image is pretty good for such a tiny device, speaking only of the camera here. I'm still interested in getting lets say cell phone size camera of good if not excellent quality that I could control with a pi 3 or a Pi zero using something like gphoto2 and a bit of python, any suggestions?

Yes I tried to see if I could control my Tab S2 cam, no luck here but I'm sure you get the idea, people throw old cells to the garbage every day, any pretty good camera that I could control with a Pi would likely work for me and video is not an absolute necessity for me.

One last thing, the Pi cam works on half the cylinders sort of speak, all the frame rate mentioned for the Pi are half of what the Sony sensor itself could do.

Thanks again, YG

Return to “Camera board”