1

I was already searching through forums and this stack exchange but I couldn't find anything that helps.

So here is my problem. I have written a program in Java that analyzes pictures and outputs certain information, the algorithm itself certainly is fast enough, so there is no problem here. I am using hodping/jrpicam as my library, which is based on raspistill. I need to analyze multiple pictures per second, raspistill needs about .8s to take a picture which is just too long.

The pictures don't need to be of high quality and have a resoultion of 300x300. I have checked with other libraries and found nothing suitable in Java, but for Python. Picam apparently uses the videoport and raspivid, and with that is able to provide high FPS counts, as expected.

I would like to stick with Java since the program is quite complex. So is there an equivalent to picam in Java or any library that could provide the needed speed? If not do you guys have any other idea on how to get a higher framerate (10 FPS would be sufficient)?

  • Could you just run ffmpeg to take pictures? – Vilho Kivihalme Jan 23 at 8:05
  • Technically I really don't care how exactly the picture is taken. Here are the requirements I have on the image: - 300x300 px - low quality - black and white is sufficient, otherwise RGB data - doesn't need to be encoded as PNG or JPEG, a BW or RGB array is sufficient whichever library or program can provide this output fast is ok with me, as long as its java – Clex Jan 23 at 8:12
  • Hi Vilho - Thanks for posting. You have actually posted an Answer with another question in it. If you feel this is a good answer please edit your answer and add some more details and explain. Otherwise this is more suited as a comment. Thanks – Piotr Kula Jan 23 at 8:55
  • Maybe you should look into how to use a live video stream and then capture the framebuffer.. instead of using the API to take pictures. That way you can achieve 60fps at lower frame rates and the only overhead will be how fast you can copy the frame buffer and analyse it. You can even start the stream in a much lower resolution which should mitigate any memoery problems. – Piotr Kula Jan 23 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.