内容如题???

解决方案 »

  1.   

    那也得有API支持才行啊,就是C++也得要API啊。
      

  2.   

    得看摄像头支持什么API
    一般摄像头的Windows驱动需要支持DirectShow或者WIA。
      

  3.   

     我找全部设置
    Vector device = CaptureDeviceManager.getDeviceList(new VideoFormat(VideoFormat.YUV));// new
    // VideoFormat(VideoFormat.RGB) if (device != null && device.size() > 0) {
    int deviceCount = device.size();
    videoDevice = new ArrayList<CaptureDeviceInfo>();
    audioDevice = new ArrayList<CaptureDeviceInfo>();
    Format[] format;
    for (int i = 0; i < deviceCount; i++) {
    cpInof = (CaptureDeviceInfo) device.elementAt(i);
    format = cpInof.getFormats();
    for (int j = 0; j < format.length; j++) {
    if (format[j] instanceof VideoFormat) {
    videoDevice.add(cpInof);
    break;
    } else if (format[j] instanceof AudioFormat) {
    audioDevice.add(cpInof);
    break;
    }
    }
    }
    }
    但这样我得到的videoDevice 里面只有一个vfw:Microsoft WDM Image Capture (Win32):0
    这一个 我明明有两个摄像头啊 一个机器上的另一个Usb端口的 为什么啊
      

  4.   

    VFW有这个限制,不过97年就被淘汰的技术,有缺陷也很正常。