This post is more than 5 years old
1 Rookie
•
6 Posts
0
2424
May 7th, 2019 10:00
camera frame rate is limited in Precision 7730 vs 7720
I wrote a custom C++ console app using VSE 2015 and OpenCV. Running it on my 2 year old Precision 7720 laptop I can capture video from the native webcam and display it in an OpenCV window at its full rate which goes up to 30fps (slows down to 15fps only in darkened room conditions as expected). But running this exact same app on my brand new Precision 7730 laptop, the webcam frame rate tops out at about 9fps in brightest room conditions. The video is same format (1280x720). If I open the camera in each laptop's built-in Windows 10 Camera program, they both appear to be able to put out 30fps video (based on observation not measurement.) Both laptops are running Windows 10 Pro. The 7720 has NVidia P3000 and 7730 has P5200, but I don't see why that would matter or make such a big difference. If someone can clue me in as to what is limiting the 7730 video rate into my app, I'd appreciate it much!
No Events found!


sfortin
2 Intern
•
199 Posts
0
May 9th, 2019 04:00
What happens if you go into the 7730's BIOS and disable switchable graphics? This should force the laptop to use the NVidia hardware.
jpc2112
1 Rookie
•
6 Posts
0
May 9th, 2019 11:00
Hi sfortin, I'm going to give you credit for a solution even though I'm not quite sure what happened--
I disabled switchable graphics in the 7730 UEFI and then started getting 30+ fps video rate. This is strange because in the 7720 this mode was enabled. As a sanity check I then re-enabled it in the 7730 but my video rate stayed at 30+ fps!
So perhaps you have good karma. Only thing I changed between posting this question and trying the UEFI experiment was updating my OpenCV from 3.3.1 to 4.1.0 (pre-built libs). Maybe this was a factor, but again my C++ code didn't change so I don't see how this one thing could triple my acquisition rate.
Anyhow, thanks for the reply!
sfortin
2 Intern
•
199 Posts
0
May 10th, 2019 02:00
Interesting. Maybe the 7730, Windows, the video drivers, and your app needed to get on the same page. I don't know, the systems and layers are getting so complicated... yeah that behavior seems hard to explain. Glad it's working for you. I suppose I would look and with the BIOS settings in the two states, is the laptop using the two different drivers, or the same driver each time.
jpc2112
1 Rookie
•
6 Posts
0
May 10th, 2019 09:00
One thing I learned from your suggestion too, is that with switchable graphics disabled now the NVidia gpu is getting used like it should, based on the % shown in performance monitor, and the intel gpu is out of the picture and cpu load is less. So I'm going to keep it that way, plus it couldn't hurt when I add cuda to my opencv code. Thanks again.
sfortin
2 Intern
•
199 Posts
0
May 11th, 2019 04:00
My understanding, and this may be incorrect, if you don't disable switchable graphics, then an application must request running with the non-intel GPU. You could do this by right-clicking on the application's icon and select "run with....". or something like that.
Yeah, I leave switchable graphics disabled so every program is forced to use the GPU. My unit operation is excellent.
jpc2112
1 Rookie
•
6 Posts
0
May 11th, 2019 11:00
Copy that.
Here's an added twist--my 7730 laptop has a second SSD that I put Ubuntu on. Using nearly identical C++ code in Eclipse (only changing minor syntax so it compiled, e.g., sprintf_s back to sprintf), my webcam app still only runs at ~12fps with the same new UEFI settings. As a sanity check I booted back to Windows 10 and ran my VSE 2015 app there again and saw 30fps once more.
The only UEFI difference between booting the OS's was that I need to change SATA setting from Raid to ACHI for Ubuntu (and make Ubuntu first in boot sequence). Aside--I don't know if there's a way to make a convenient BIOS boot manager at the powerup screen, the selection screen that pops when Ubuntu boots doesn't work when I choose boot manager item 3 (causes a Windows blue screen). I read in another blog that my only way is to reinstall Windows on the first SSD with the ACHI setting chosen.
I'm not concerned over the slow webcam frame rate in Ubuntu because I don't need it to run full speed there if I can achieve it with Windows. This webcam input is mainly a convenient coding test platform, my app is being written mainly for our own external camera with thunderbolt input using network port. That's another ball of wax, we're struggling to get receive packets at full speed, and for that Ubuntu seems best at not dropping any. Windows seems to put too many layers in the stream path--header decoding and firewalls and whatnot.