Hello, recently, I’ve been working on a project to write in images from a file into a 3D environment while keeping its alpha channel.
I was able to do it successfully with AVIs, but when I used PNGs I would get the following error:
OpenCV(3.4.7) C:\build\3_4_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_images.cpp:246: error: (-5:Bad argument) CAP_IMAGES: can’t find starting number (in the name of file): C:\Users\Project01\TestMovies\google.png in function 'cv::icvExtractPatte
I was able to fix the problem by appending a number (in this case google.png → 4google.png)
I was wondering if there is documentation regarding why a number is required in the file name so I can explain it if necessary.
Apologies, I misspoke.
You are correct, I was able to read in AVIs, but they didn’t retain their transparencies. (PNGs did, however.) I could write them onto an opaque texture for transparency, but not exactly the same thing. Is it safe to assume that VideoCapture is not really capable of projecting the alpha channel from video files? If so, is there a better method for doing so within OpenCV?
Ah, I understand. I think in our solution we eventualy want to switch between a number of PNGs. Could we jump between different images in a sequence of PNGs if we read in a bunch of them?
Apologies if this is basic stuff, I’m really just starting out.