Image-based resistor detection