I recently installed a fresh copy of Windows 10 on a NVMe. OpenCV on this Windows 10 install displays the frames in poor resolution and lighting. OpenCV worked just fine on my old Windows 10 on my SATA SSD.
OBS Studio can display my USB camera frame just fine on both Windows Install.
Only OpenCV 4.x PreBuild can display proper resolution and lighting on my Windows 10 NVMe install, but the frame rate is very low.
Can someone please help me with this issue? I’m running the same code on both Windows 10 install.
I already tried building and using prebuilds for OpenCV 3.x and 4.5.1.
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>cv::VideoCapture cap(0);
int main() {
cap.set(cv::CAP_PROP_FRAME_WIDTH, 1280);
cap.set(cv::CAP_PROP_FRAME_HEIGHT, 720);cv::Mat frame;
while (true) {cap >> frame; cv::imshow("frame", frame); char c = (char)cv::waitKey(1); if (c == 27) break;
}
cap.release();
cv::destroyAllWindows();return 0;
}