Interfacing a USB camera with PIC

Discussion in 'Embedded Systems and Microcontrollers' started by yunese, Nov 12, 2011.

  1. yunese

    Thread Starter New Member

    Oct 4, 2011
    1
    0
    Hi,
    I'm doing a line following mobile car using vision system. I plan to use a CMOS sensor type camera to interface with PIC.
    Is it possible a USB webcam can communicate with PIC?
    The camera module and image sensor is different things?

    Thank you:)
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Possible? Yes. Easy? No way.

    Some PICs can perform as a USB master device. I've used a PIC32 to read a USB keyboard so I could type characters directly into it. However, I was well supported with demo code to make the USB connection, all I had to do was write the code to take those characters and dump them to my screen.

    I don't know of any Microchip examples that connect to a web cam, so you would probably have to start by writing that interface.

    Then once you get that info into the PIC you have to figure out how to make the PIC understand the image data it has to tease out the line form the background.

    It is major work. The reason people do line followers is you can do some very simple hardware to "see" the line verses the background.
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    An optical mouse has a miniature camera built in. There is code available to extract that image. I do not have links. You will have to do the search.
     
Loading...