I have two questions which I was struggling finding answers on the net for more than a week.
I'm writing a Windows service on Visual C++ 2017 which connects to Axis IP Cameras on our network and queries MJPEG streams using regular sockets. It successfully parses the streams and decodes JPEG images. Decoding done with OpenCV; frame = cv::imdecode(data, IMREAD_GRAYSCALE)).
Q1. Although OpenCV uses a performance JPEG library as it claims: build-libjpeg-turbo (ver 1.5.3-62), decoding performance is surprisingly slower than .Net's System.Drawing.Image.FromStream(ms). Do you have any recommendation for a really fast JPEG decompression?
Q2. All I need to do with the received JPEG's is to check "regions of interest" if there is motion in there. These are production lines in a factory actually. The factory runs 24 hours and six days a week so there will be changing lighting conditions. Sometimes there won't be light at all so JPEG's will be with plenty of noise on them. Which OpenCV operations and algorithms you would recommend applying on the frames to have an understanding of if there is a motion at the ROI? Of course you can use plenty of operations on your matrices one after another but I need the shortest and most effective way to keep the resource requirements low as it will be doing this operation for plenty cameras and ROI's at the same time.
My system is with NVIDIA Video Card (I can use CUDA), Intel i7-7700, 16GB Ram.
Thank you!