Search code examples
linuxjpegwebcamsubpixel

subpixel library for webcam in linux


Is there any library for working with webcams on linux in subpixel mode ? I need fast frame rate , and I don't have time for compressing to jpeg ( and jpeg is lossy - I need all the information I can get from the sensors ) . I guess that the compressing is happening inside the webcam firmware , so is it posiible to work at subpixel level at all ?

I'm talking about a specific webcam - a4tech PK-635K. Here it is http://a4tech.com/product.asp?cid=77&scid=89&id=233

Edit: As you can see , I don't need the webcam for ordinary video capturing . I just need the information from the cmos sensors as fast as it can be captured. For example I want to get the information from the red pixels only.


Solution

  • That always depends on the webcam and the driverrs you have. If you are Using v4l2, you can just use mplayer to try out all the modes and see what works best for you. e.g.

    mplayer -cache 128 -tv driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv://
    

    you can insert different format for the parameter -vc

    But essencially, I think you havn't understood the problem completely, as the camera compresses the picture to get it faster over the wire, so you see it earlier: The camera probably does the compression in hardware, or at least in a dedicated chip and will do it very fast. The latency rather comes from the amount of data you want to transfer.

    So it's a dilemma: either uncompressed and subpixel quality, but slow or worse quality due to compression, but faster.

    sidenote: many webcams support a better framerate at slower resolutions.