peacemaker Expert Licensed User Longtime User Dec 29, 2021 #1 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: FullHD video reading without showing on the screen: 25% of CPU (AMD Ryzen5. Intel i7 was better, lower) FullHD video reading with showing on the screen: ~35% 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) VGA video (640 x 480) reading with showing on the screen: 10% 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 ?
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: FullHD video reading without showing on the screen: 25% of CPU (AMD Ryzen5. Intel i7 was better, lower) FullHD video reading with showing on the screen: ~35% 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) VGA video (640 x 480) reading with showing on the screen: 10% 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 ?
peacemaker Expert Licensed User Longtime User Dec 30, 2021 #21 Magma said: "Sleep(0)" command Click to expand... peacemaker said: 1) responsible PC under all these neuro-apps Click to expand... How to do it better ? Upvote 0
Magma said: "Sleep(0)" command Click to expand... peacemaker said: 1) responsible PC under all these neuro-apps Click to expand... How to do it better ?
Magma Expert Licensed User Longtime User Dec 30, 2021 #22 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
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...
peacemaker Expert Licensed User Longtime User Dec 30, 2021 #23 Magma said: DoEvents Click to expand... No ... https://www.b4x.com/android/forum/threads/b4x-code-smells-common-mistakes-and-other-tips.116651/ Magma said: threading Click to expand... I need lots of debug, the threading lib works only in the release mode: https://www.b4x.com/android/forum/threads/threading-library-for-opencv.135887/ Upvote 0
Magma said: DoEvents Click to expand... No ... https://www.b4x.com/android/forum/threads/b4x-code-smells-common-mistakes-and-other-tips.116651/ Magma said: threading Click to expand... I need lots of debug, the threading lib works only in the release mode: https://www.b4x.com/android/forum/threads/threading-library-for-opencv.135887/
Magma Expert Licensed User Longtime User Dec 30, 2021 #24 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
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
peacemaker Expert Licensed User Longtime User Dec 30, 2021 #25 Firstly some software for whole the system is to be done, and next step is to get better hardware...IMHO. Upvote 0
Firstly some software for whole the system is to be done, and next step is to get better hardware...IMHO.