3 webcams work on MacBookPro, not on MacMini

Hello everyone.

I was trying to create a detecting system for a project, and by far I was testing only on a MacBookPro, where I attached 2 USB web cam (same brand/model) while using the built-in InSight Camera as the 3rd Camera.

On MacMini, I have 3 web cams (same brand/model) but when I run the code, only one Camera shows its output. A second camera will turn on its led, but shows a black output. The third camera doesn't even turn its indication led on. I have tested each camera separately, or in pairs, but no good news. Still on MacMini system Information window, I can see it recognises those 3 cameras at same time.

Any one would have a similar problem before, or any suggestion please? Thanks!!

The prototype was working on a MacBookPro (with its built-in camera). This is the code:

import gab.opencv.*;
import java.awt.Rectangle;
import processing.video.*;

Capture camL, camM, camR;
OpenCV opencvL, opencvM, opencvR;
Rectangle[] facesL, facesM, facesR;
PImage srcL, srcM, srcR;

void setup() {

  size(960,180);
  frameRate(15);  

  //L for left Camera
  camL = new Capture(this,320,180,"Logitech カメラ",30);
  camL.start();

  opencvL = new OpenCV(this, camL.width,camL.height);
  opencvL.loadCascade(OpenCV.CASCADE_FRONTALFACE); 

  //M for Center Camera
  camM = new Capture(this,320,180,"FaceTime HD カメラ(内蔵)",30); //on MacMini, change name: Logitech カメラ #2
  camM.start();

  opencvM = new OpenCV(this, camM.width,camM.height);
  opencvM.loadCascade(OpenCV.CASCADE_FRONTALFACE);  

  //R for Right Camera
  camR = new Capture(this,320,180,"Logitech カメラ #2",30); //on MacMini, change name: Logitech カメラ #3
  camR.start();

  opencvR = new OpenCV(this, camR.width,camR.height);
  opencvR.loadCascade(OpenCV.CASCADE_FRONTALFACE); 
}

void draw() {

  if(camL.available()){
    camL.read();
    srcL = camL.get();
    opencvL.loadImage(srcL);
    image(opencvL.getInput(), 0, 0);
    facesL = opencvL.detect();

    noFill();
    stroke(0, 255, 0);
    strokeWeight(3);
    for (int i = 0; i < facesL.length; i++) {
      rect(facesL[i].x, facesL[i].y, facesL[i].width, facesL[i].height);
    }
  }

  if(camM.available()){
    camM.read();
    srcM = camM.get();
    opencvM.loadImage(srcM);
    image(opencvM.getInput(), 320, 0);
    facesM = opencvM.detect();

    //image(cam, 0, 0);
    //set(0,0,cam);
    noFill();
    stroke(0, 255, 0);
    strokeWeight(3);
    for (int i = 0; i < facesM.length; i++) {
      rect(320 + facesM[i].x, facesM[i].y, facesM[i].width, facesM[i].height);
    }
  }

  if(camR.available()){
    camR.read();
    srcR = camR.get();
    opencvR.loadImage(srcR);
    image(opencvR.getInput(), 640, 0);
    facesR = opencvR.detect();

    noFill();
    stroke(0, 255, 0);
    strokeWeight(3);
    for (int i = 0; i < facesR.length; i++) {
      rect(640 + facesR[i].x, facesR[i].y, facesR[i].width, facesR[i].height);
    }
  }
}
Sign In or Register to comment.