Webcam Package Not Working

21 vues (au cours des 30 derniers jours)
Hakan Caldag
Hakan Caldag le 7 Nov 2023
Commenté : Hakan Caldag le 28 Mar 2024 à 10:52
Hi everyone,
I am trying to use Matlab Support Package for USB Webcams on a PC with a fresh Windows 10 installation (nothing else installed besides Matlab R2023b). However I get the following error when I try to use a command from the package, such as webcamlist:
Invalid MEX-file 'C:\ProgramData\MATLAB\SupportPackages\R2023b\toolbox\matlab\webcam\supportpackages\webcammex.mexw64': The specified module could not be found.
Do you have any idea why this may be occurring? I am not having such an issue on any other PC. Should I have some other packages installed?

Réponse acceptée

Hakan Caldag
Hakan Caldag le 27 Mar 2024 à 11:25
In case anyone experiences this problem in the future, a fresh Windows installation and using the specific Matlab version I developed the app solved the problem (probably it was the Windows installation that solved the issue.)
  4 commentaires
Image Analyst
Image Analyst le 27 Mar 2024 à 21:51
Yes, this confirms my suspicions stated in my earlier post. If you have a standalone executable, then you can run that executable on the computer where you compiled it, as long as the release you compiled it with is still on that computer. So when you had 2023a, you could run it both in the development environment and as a standalone compiled executable. The reason it could run as a compiled executable is that you still had r2023a on that computer. If you didn't then you'd have to have the runtime library installed on the computer.
When you reinstalled Windows and then installed MATLAB R2023b (only) then the code necessary to run the standalone executable compiled in r2023a did not exist on that computer, so it could not run. The source code should have still been able to run in the MATLAB development environment though.
To get the r2023a executable to run on your computer which now has only r2023b on it, you'd have to install the run-time library for r2023a, which you can get here:
A command like webcamlist should work in the command window in any version of MATLAB so I'm not sure why it didn't run for you in R2023b. Perhaps it needed the webcam Add-on, like I mentioned in my answer below, but you said that you had installed it. I asked you to call tech support. Did you? If not, why not. If so, what did they say? Have you tried returning to the R2023b again and trying again? But now r2024a is out so you might as well try that version instead.
Hakan Caldag
Hakan Caldag le 28 Mar 2024 à 10:52
Well, you raised several points, so let me summarise the whole process below:
  • I developed the app in a separate PC with Matlab R2023a where it ran both as a standalone and within the development environment without any issues.
  • The issue arised when I tried running this app in another PC (the one with the fresh Windows install).
  • I had initially tried installing the runtime library for R2023a and running the app with that. It didn't work. I thought this to be because of the runtime environment not including the webcam package so I decided to go on with a complete installation of Matlab.
  • I installed R2023b and the webcam package. Tried the app within the app development environment. Didn't work.
  • Thought there might be an issue with the app or some kind of compatibility issue between R2023a and R2023b. Tried writing webcamlist on the command window to see if the webcam package works at all. Didn't work.
  • Asked here, you suggested asking to support. I asked and they only suggested a clean install of the support package. Didn't work.
  • Decided to reinstall Windows and install specifically Matlab R2023a. Installed webcam package again as well. Tried the app in the development environment. It worked.
So I have no idea what the issue was but you raise a good point about the runtime compiler version compatibility. Regardless, I solved my issue anyway so I don't need to iterate any further.

Connectez-vous pour commenter.

Plus de réponses (1)

Image Analyst
Image Analyst le 7 Nov 2023
Did you install the webcam package from the Add-ons button on the tool ribbon?
  6 commentaires
Walter Roberson
Walter Roberson le 7 Nov 2023
Sounds like an anti-virus is interfering.
Hakan Caldag
Hakan Caldag le 8 Nov 2023
No extra antivirus software is installed at all. Let's see what tech support will say.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Tags

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by