Hi Franziska,
To do this, you will need to install MATLAB Support Package for Raspberry Pi Hardware. You can also download the same from Add-ons menu.
Here is the documentation link for 'webcam' object which you can use to acquire images: https://www.mathworks.com/help/supportpkg/raspberrypiio/ref/webcam.html
Hope this helps.
- Shashank