0

I want to use a high speed camera(500-1000 fps) for capturing rice seeds. Before proceeding I want to know what is the max FPS that's supported by OpenCV ? I want to detect color for every pixel (2048 pixels per frame).
I have these questions :

  1. Can I use OpenCV to do this work? What are the alternatives?

  2. Is it possible to use OpenCV, if I limit the number of pixels per frame (for example, 50 pixels per frame)?

Spikatrix
  • 20,225
  • 7
  • 37
  • 83
mohammad2050
  • 7
  • 1
  • 7
  • Just to clarify: You want to compute something in realtime on highspeed camera images? What is it you want to compute? Because 1-2ms do not leave much room for extensive processing... – Mailerdaimon May 11 '15 at 14:27
  • @ Mailerdaimon , yes,i want to compute color of pixel in realtime on highspeed camera images , in your opinion i can not use openCV? what is max fps for openCV Without losing performance? – mohammad2050 May 11 '15 at 14:30
  • just test how long your color conversions/selections/detections on the target machine takes and you can compute the fps you'll reach (without the cost of capturing) – Micka May 11 '15 at 18:26
  • I do not think that this is a problem with OpenCV but a more general one. As @Micka suggested: See how well your algorithm performs and compute your max fps from that. If you need a real-time result you might consider dropping some Frames if your computing performance is not suffiecient to achieve <2ms processing time. – Mailerdaimon May 12 '15 at 09:44

1 Answers1

3

I don't think there is such value as MAX_FPS in OpenCV. However processing 500-1000 frames per second might be quite hard. What is the size (width, height, number of chennels, depth) of single frame? The only option which comes to my mind is to grab frames using the normal approach and than process them on GPU (OpenCV has Cuda module for this). You can try to process them one by one or grab x frames and than process them in the same time (parallel). Of course you can try to do it on CPU as well, but most likely you will not be able to use as much "threads" as on GPU.

cyriel
  • 3,522
  • 17
  • 34
  • I have searched through the soures and could find no limit to FPS so I think you are correct. What may be possible: OpenCV uses thrid party libs for capturing, I had no chance to have a look at their source. It could be that this librarie enforces some kind of limit, but I doubt it. – Mailerdaimon May 12 '15 at 09:41
  • Most likely it is platfrom dependent. One thing you can do is make sure OpenCV uses always the same third party lib for capturing and check source of this lib. You can select API quite easy - http://stackoverflow.com/questions/14187866/opencv-on-mac-is-not-opening-usb-web-camera/14188280#14188280 Alternatively you can just test it right now and check whether it's fast enough for you. – cyriel May 12 '15 at 13:06