OK I’m tearing my hair out trying to get this to work, my knowledge is very basic so I’m sure the answers out there but I’m just not joining the dots.
I’ve installed opencv 4.9 on win 11 and I’m trying to use it on VS22 in C++
I’ve gone through some of the sample code and I can load image & video files so I presume opencv is working and installed OK.
But when I come to try and capture a video stream from either a webcam or an imaging device I get one of two errors depending on which device I’m trying to use.
Error 1 - With the webcam - When calling videoCapture cap(0) the debug output indicates an issue “Error: …......\private\impl\mft\mft-framework\AsyncMFTBase.cpp(852):AsyncMFTBase(416)::GetOutputCurrentType(StreamID=0): MF_E_TRANSFORM_TYPE_NOT_SET”
Error 2 - with the imaging device (machine vision camera using an MT9M001 mono sensor) - It gives a memory error at cap.read(…) I presume indicating it can’t find anything to read.
Both devices work and can be tested in OBS / Camera app / etamcap so the devices work