Ooops, you also must touch mousePressed() :
void testApp::mousePressed(int x, int y, int button) {
targetColor = cam.getPixelsRef().getColor(x / scale, y / scale);
Ooops, you also must touch mousePressed() :
void testApp::mousePressed(int x, int y, int button) {
targetColor = cam.getPixelsRef().getColor(x / scale, y / scale);