you can work with the Arduino and its camera model using Matlab, by using the Arduino library predefined in Matlab (if you don't have it, you can download it in the Add-Ones section (https://www.mathworks.com/help/supportpkg/arduino/ug/install-support-for-arduino-hardware.html)
After that, there is a lot of techniques that can be used for your application, you can do a region based segmentation to segment and detect the regions that present a different texture than the rest of the PCB
I recommend you to use Raspberry pi rather than Arduino. Of coz, if you can use a specific camera compatible with Arduino like the one below, this can be done.