zelzal
Posts: 6
Joined: Wed Apr 06, 2016 6:57 pm

[request] high fps camera

Wed Apr 06, 2016 7:13 pm

Dear all,

Is there a camera compatible with raspberry pi 3 for for detect color of materials that move at high speed.

Thanks in advance

User avatar
kyoukoku
Posts: 6
Joined: Sun Jan 03, 2016 1:10 pm
Location: London, UK

Re: [request] high fps camera

Thu Apr 07, 2016 4:08 am

removed
Last edited by kyoukoku on Sat Apr 09, 2016 10:22 am, edited 1 time in total.

User avatar
CaptSunset
Posts: 140
Joined: Fri Mar 20, 2015 2:55 pm

Re: [request] high fps camera

Thu Apr 07, 2016 4:51 pm

Do you actually need a camera image?
I don't clearly get what you are wanting to do, but you could get very high speed reactions using a simple optical sensor* which'd be binary (ie blue = on, anything else = off) and even use that to trigger the camera if needed. If you can control the reflected light source (blue LED), you can exert fine control.

* Here is a typical & inexpensive device
http://www.newark.com/optek-technology/ ... BN-01C3528

hope this helps!

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8148
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: [request] high fps camera

Thu Apr 07, 2016 5:06 pm

The standard PI camera will do 90fps at VGA resolutions. How high a frame rate do you need?
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

zelzal
Posts: 6
Joined: Wed Apr 06, 2016 6:57 pm

Re: [request] high fps camera

Thu Apr 07, 2016 5:16 pm

6by9 wrote:The standard PI camera will do 90fps at VGA resolutions. How high a frame rate do you need?
i need a round 200 fps for my application

n1ks
Posts: 12
Joined: Sat Jan 24, 2015 8:51 pm

Re: [request] high fps camera

Thu Apr 07, 2016 5:25 pm

Newer version of Pi camera should be landing soon, maybe this will be usefull for your requirements?
Archived link of RS page that leaked yesterday: https://web.archive.org/web/20160406213 ... s/9132664/

zelzal
Posts: 6
Joined: Wed Apr 06, 2016 6:57 pm

Re: [request] high fps camera

Thu Apr 07, 2016 5:35 pm

CaptSunset wrote:Do you actually need a camera image?
I don't clearly get what you are wanting to do, but you could get very high speed reactions using a simple optical sensor* which'd be binary (ie blue = on, anything else = off) and even use that to trigger the camera if needed. If you can control the reflected light source (blue LED), you can exert fine control.

* Here is a typical & inexpensive device
http://www.newark.com/optek-technology/ ... BN-01C3528

hope this helps!
i need to build simple machine that is sorting any small particles by detect it's color [RGP] and position by high speed camera [ >200 fps] and two raspberry 3 with simpleCV and paython code that control other pneumatic devises
http://www.mediafire.com/view/9dbg9ktf318hjxz/app.PNG
my problem in selecting the camera that have more than 200 fps

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8148
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: [request] high fps camera

Thu Apr 07, 2016 5:36 pm

zelzal wrote:
6by9 wrote:The standard PI camera will do 90fps at VGA resolutions. How high a frame rate do you need?
i need a round 200 fps for my application
No off the shelf solution that I know of then.
- USB webcams rarely go that high at any resolution.
- The Pi Camera in theory has a 640x240 readout mode, but I never got it to work reliably.
- There is the ongoing work to open up the CSI2 interface, but you'll then have to source a suitable sensor, write a driver for it, and it'll need to either have an internal ISP or be monochrome as that won't be passing through the ISP.

You might be able to take advantage of the rolling shutter in the Pi Camera if you can control the illumination and direction of these materials. It would need a load of careful design though.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
CaptSunset
Posts: 140
Joined: Fri Mar 20, 2015 2:55 pm

Re: [request] high fps camera

Thu Apr 07, 2016 9:39 pm

zelzal wrote: i need to build simple machine that is sorting any small particles by detect it's color [RGP] and position by high speed camera [ >200 fps] and two raspberry 3 s
Again I'd ask- do you actually need slow motion photography of the particles? Pictures?
Or just record their position and spectrum...data?

If you do need the high-speed imagery right now, you might consider the GoPro Hero 4 Black, which will do up to 240 fps in 720p HD with the new firmware. Of course it costs 10X the price of a Pi...
http://gizmodo.com/exclusive-first-foot ... 1682287677

zelzal
Posts: 6
Joined: Wed Apr 06, 2016 6:57 pm

Re: [request] high fps camera

Fri Apr 08, 2016 8:11 am

CaptSunset wrote:
zelzal wrote: i need to build simple machine that is sorting any small particles by detect it's color [RGP] and position by high speed camera [ >200 fps] and two raspberry 3 s
Again I'd ask- do you actually need slow motion photography of the particles? Pictures?
Or just record their position and spectrum...data?

If you do need the high-speed imagery right now, you might consider the GoPro Hero 4 Black, which will do up to 240 fps in 720p HD with the new firmware. Of course it costs 10X the price of a Pi...
http://gizmodo.com/exclusive-first-foot ... 1682287677
just record their position with simplecv program
Finding Blobs of a Specific Color and get data sush as :
measure a area, find the centroid ,count the number of blobs
and find how close it is to a circle, square, or rectangle —or compare its shape to another blob

PiGraham
Posts: 3790
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: [request] high fps camera

Fri Apr 08, 2016 9:02 am

zelzal wrote:i need to build simple machine that is sorting any small particles by detect it's color [RGP] and position by high speed camera [ >200 fps] and two raspberry 3 with simpleCV and paython code that control other pneumatic devises
http://www.mediafire.com/view/9dbg9ktf318hjxz/app.PNG
my problem in selecting the camera that have more than 200 fps
What are you trying to do?
It sounds like you want to use the image analysis result to control a pneumatic device to sort fast moving objects by colour. Pi is not well suited for such an application.

You would need not just 200fps from the camera but also processing at 200 fps and a degree of realtime control which Linux is not suitable for.

zelzal
Posts: 6
Joined: Wed Apr 06, 2016 6:57 pm

Re: [request] high fps camera

Fri Apr 08, 2016 3:03 pm

is these camera can connect with raspberry pi 3 and get color detection
in 800 x 600 resolution give 250 fps for 1 hour
http://www.fastecimaging.com/products/t ... record/il4

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

Re: [request] high fps camera

Fri Apr 08, 2016 3:06 pm

zelzal wrote:is these camera can connect with raspberry pi 3 and get color detection
in 800 x 600 resolution give 250 fps for 1 hour
http://www.fastecimaging.com/products/t ... record/il4
Looks like that would connect to a Pi over USB. It's doing everything itself, the Pi would simply be a USB host device.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8148
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: [request] high fps camera

Fri Apr 08, 2016 3:32 pm

jamesh wrote:
zelzal wrote:is these camera can connect with raspberry pi 3 and get color detection
in 800 x 600 resolution give 250 fps for 1 hour
http://www.fastecimaging.com/products/t ... record/il4
Looks like that would connect to a Pi over USB. It's doing everything itself, the Pi would simply be a USB host device.
Wrong way around?
"The IL4 features both a USB port and an SD port for quick and easy image downloads to USB flash drives...", so the IL4 is a host device.
Although "COMMUNICATION PORTS: USB 2.0 device (micro-B)," which would mean slave.
Sounds most confused unless it is doing USB OTG (and that should then be a micro-AB connector). I wonder what it enumerates as.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
CaptSunset
Posts: 140
Joined: Fri Mar 20, 2015 2:55 pm

Re: [request] high fps camera

Fri Apr 08, 2016 4:46 pm

just record their position with simplecv program
Finding Blobs of a Specific Color and get data sush as :
measure a area, find the centroid ,count the number of blobs
and find how close it is to a circle, square, or rectangle —or compare its shape to another blob


You are leaving so many things unclear it is not easy to help you.
for example:
What size field of view do you need to study?
Do you need to interpret the data in 'realtime' while the camera is running?
Are your blobs changing color rapidly, or are they in rapid motion; why the need for speed?

zelzal
Posts: 6
Joined: Wed Apr 06, 2016 6:57 pm

Re: [request] high fps camera

Fri Apr 08, 2016 6:20 pm

CaptSunset wrote:just record their position with simplecv program
Finding Blobs of a Specific Color and get data sush as :
measure a area, find the centroid ,count the number of blobs
and find how close it is to a circle, square, or rectangle —or compare its shape to another blob


You are leaving so many things unclear it is not easy to help you.
for example:
What size field of view do you need to study?
Do you need to interpret the data in 'realtime' while the camera is running?
Are your blobs changing color rapidly, or are they in rapid motion; why the need for speed?
for your questions
-the vision area 20 x 10 cm
-yes i need to interpret the data in 'real time' while the camera is running
-my blobs in rapid motion

this picture explaine for you the application
http://www.mediafire.com/view/9dbg9ktf318hjxz/app.PNG
http://www.mediafire.com/view/y9c3yu266lcckmv/blobs.PNG
this video of the sortex machine that i need to built a simple one

https://www.youtube.com/watch?v=O0gWUeqzk_o

PiGraham
Posts: 3790
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: [request] high fps camera

Sat Apr 09, 2016 10:04 am

zelzal wrote:this video of the sortex machine that i need to built a simple one

https://www.youtube.com/watch?v=O0gWUeqzk_o

I have professional experience of this sort of technology and my opinion is that Pi is not suitable for this. The processing requirement is too high, the camera type (Pi Camera) is not suited to fast moving objects or high frame rates, neither the hardware nor the operating system are hard real-time that is required to achieve the precise timing to reject individual items.

User avatar
HermannSW
Posts: 2045
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: [request] high fps camera

Sat Jan 06, 2018 3:29 am

I really doubt that OpenCV is able to do any meaningful processing with >200fps even on Pi 3B, that leaves <5ms processing time per frame.
I did try simple edge detection on a 320x216 frame and was not able to achieve more than 50fps with OpenCV:
viewtopic.php?t=189661#p1250429

There is a cheap (<10$) USB camera that can do 187fps at 320x240, the PS3 Eye:
viewtopic.php?t=193033

Raspverry v1 camera can do up to 750fps with reduced vertical resolution using raspiraw.
You will not get >200fps with 800x600, but you can get 220 fps with 640x200 with full fov:
https://github.com/Hermann-SW/raspiraw

This all is possible only by capturing raw Bayer data from CSI-2 camera without GPU processing.
The fastest option is to skip raw10 to rgb conversion (costly) and skip every 5th byte giving you a gray8 image.
The rg/gb pixels have different brightness.
It depends on which colors you want to separate on whether gray frame would allow to detect.
If your colors can be separated based on gray image, then 2nd link above thread describes how you can use raspiraw for control of your application.

The only control I did sofar with raspiraw was automatic camera tilt calibration, at 60fps at that time before I knew how to get 90fps and higher:
viewtopic.php?t=189661#p1231151
Image

See this recent thread on two 360/350 fps videos taken:
viewtopic.php?f=43&t=201568


With reduced vertical row number 600fps 640x64 (rescaled to 640x128) video can be taken with v1 camera (played 24x slowed down):
Image


Using raspiraw for high framerate processing is possible with v1 camera only currently, because I was not able to capture the needed register settings for v2 camera and nobody else did sofar :-(
viewtopic.php?f=43&t=109137&start=350#p1252015

According imx219 and ov5647 datasheets maybe even 2000fps might be possible for 640x64 on v2 versus "only" 665fps on v1 camera ...


P.S:
For 640x200 at 220fps use "640x400_s" tool raspiraw options and skip post processing row doubling step:
https://github.com/Hermann-SW/raspiraw
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Camera board”