B4J Question IP-camera reading frames

peacemaker

Expert
Licensed User
Longtime User
Hi, All

I'm trying to work with jOpenCV lib for custom object set recognition\identification.
But i have found that only reading the video stream and showing the frames by jOpenCV lib (without any processing) consumes lots of CPU time:
  1. FullHD video reading without showing on the screen: 25% of CPU (AMD Ryzen5. Intel i7 was better, lower)
  2. FullHD video reading with showing on the screen: ~35%
  3. FullHD video reading with showing on the screen, and with some recognition processing: 100% of CPU with interval about 800...1200 ms between frames (iterations)
  4. VGA video (640 x 480) reading with showing on the screen: 10%
  5. VGA video (640 x 480) reading with showing on the screen and with some recognition processing: ~70 - 80% of CPU with interval about 200 ms between frames (iterations)
Only the latest 5th variant looks acceptable for usage.
The threading lib is ... hard for me to try to use here, especially when the debugging in the Debug mode is required.

So, i guess, maybe for the better speed - is there any lib to just read the frames from a video stream of IP-camera ? To read frames by the separate app (in the separate CPU thread) and save as just JPG pictures. And the main app with jOpenCV is just reading these pictures (and deletes) to process in its separate thread.

Any idea about such lib to read the IP-camera stream ?
 

Magma

Expert
Licensed User
Longtime User
I was thinking parallel with a DoEvents (or something like that...)

threading... or something... somehow you must make the "loop" (if there is - haven't see any code) pauses a little...be responsible app...
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
I totally understand the need for clear code...

But as you said... now need debug... may be need bypass (forget)... then try threading for release... and make a wish to success !

+I think that this model will need cloud cpu work-load ! (uploading to a server-process-download result)
+or these special cards Linus suggests... i -"now"- understand him
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Firstly some software for whole the system is to be done, and next step is to get better hardware...IMHO.
 
Upvote 0
Top