1

I want to send the raw USB data to my laptop to process it and then send it back (image processing). Is there any way I can just send the data through tcp/udp without raspi doing all the hard work?

0

You can't just issue a simple read() on /dev/video*. You have two options:

  1. Use OpenCV to open the camera, something like this:

    // includes, setup code, etc.
    Mat frame;
    VideoCapture cam(1);
    for (;;) {
      cam1.grab();
      cam1.retrieve(frame);
      if (frame.empty() {
        continue;
      }
      // Serialize frame and send it over a network connection.
    }
    
  2. Use the usbip package to relay the raw usb data over to your other machine; this assumes that his other machine can also run the corresponding side of the usbip driver. This package is seriously buggy, I have never had good luck with it.

How you send data back to the Pi is up to you, of course!

  • I've tried installing OpenCV but it fails on RasPi(Something to do with ARM vs x86 architecture) . All the solutions are related to compiling OpenCV on the pi. Is there any other way? – Knightowl3128 Aug 10 at 9:16
  • I've used OpenCV on the Pi in the distant past. Why is compiling it a problem? – JayEye Aug 12 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.