SmartDashboard Laptop Camera Black Image

The laptop camera widget in SmartDashboard only displays black after it connects to the camera (built in iSight on a MacBook Pro running Windows 7 through Bootcamp) :eek: ! The green camera light on the physical camera lights up to indicate that it is in use, but there seems to be no feed coming from it. The camera works fine in other applications on Windows, so I don’t think (though it could be) that I’m running Windows through Bootcamp on a Mac. My Bootcamp drivers are all up to date. The robot camera feed displays just fine, so I don’t think its a code problem. Am I forgetting to do some crucial systems settings step in order to use the laptop camera? Has anyone else had this problem?

I have the same issue. Using Toshiba Portege R705 Laptop. If I start the camera using Toshiba’s web camera app I see myself and the light on the camera is on. Then SmartDashboard gives me an empty black box. Otherwise SmartDashboard gives me a small orange box stating no connection along with a window to select the camera. If I close the Toshiba web camera app SmartDashboard gives me the same. If I start SmartDashboard without the Toshiba app it gives me the orange box. If I start Toshiba Web App, Then Start SmartDashboard, Then add camera, I get a black box. Then closing and restarting Toshiba Web App states that the camera is locked by another device. The camera light is still on.

Also when I add the laptop camera, if toshiba app had been running, I get a screen to select the camera. But the pull down box doesn’t stay there and the apply button never indicates I’ve made a camera selection and enter doesn’t do anything. I still get the black screen.

I have no clue what to try next. Except graciously ask for help.

Thanks.

We also tried multiple times on a newer Dell laptop. Any methods we tried led to a black box. I know that the camera works fine and as such I am led to believe that there is a problem with the widget.

Same problem on a Gateway NV5905h, believe it has to do with this: Google Code Archive - Long-term storage for Google Code Project Hosting.

I cannot capture from my Webcam using opencv_highgui or OpenCVFrameGrabber

OpenCV uses Video for Windows, which does not always work properly under Windows 7. Use VideoInputFrameGrabber instead, which uses DirectShow and should always work correctly.

EDIT: WPILaptopCamera.java


package edu.wpi.first.wpijavacv;

import static com.googlecode.javacv.cpp.opencv_highgui.*;
/**
 * A class used to gather images from cameras connected to the laptop
 * @author Greg
 */
public class WPILaptopCamera extends WPIDisposable {
    CvCapture cam;

    public WPILaptopCamera() {
        cam = cvCreateCameraCapture(0);
    }

    public WPIColorImage getCurrentFrame(){
        return new WPIColorImage(cvQueryFrame(cam));
    }

    @Override
    protected void disposed() {
    }

}

I haven’t been able to figure out how to edit WPILaptopCamera. All I have access to is a compiled library. Adding a file WPILaptopCamera to my project, and or adding it to the WPIJavaCV package doesn’t work. Its not used.

I looked at possibly downloading the source from sourceforge, but they use a system that’s not simple to install onto windows for checking out the code. Compiling the code under linux to then run under windows doesn’t seam to be a real option does it?

I realize that its really late to get image processing running on the robot, but if mentors can’t do this then I don’t know how anyone expects the students to do so.

If you can get your hands on a Classmate, you should be able to use Laptop Camera.
I would also be happy if someone resolves the issue though. :stuck_out_tongue: