EMX with USB webcam

I’m trying to get a still image from my web cam all day and now I’m completely helpless.

My camera specification is here:

http://www.a4tech.com/product.asp?cid=224&scid=224&id=593

which should be UVC compatible.

I’m trying to use code from this post:

https://www.ghielectronics.com/community/forum/topic?id=12736

DeviceConnectedEvent is raised twice. The first type of device is a webcam, then unknown. In the first case, I try to get supported formats which returns the array of length 1. Supported format is in 160x120 resolution.

Then thread is started, StartStreaming is called, camera LED turns on, but IsNewImageReady() always returns false.

Should I try another web cam (I have to buy it) or there is anything else I can do?

Thank you
Martin

Supporting USB cameras is very hard on these little systems so I wouldn’t be surprised if some cameras do not work. We have tested it on the couple cameras we have and it worked fine. We use very cheap USB cameras, like the ones you see on eBay. Buying another camera may or may not solve the problem.

If this is for a serious commercial need then we can work with you on finding an appropriate camera. If this is a small project, or a hobby, then I recommend our camera https://www.ghielectronics.com/catalog/product/283

To plug that camera into USB, you can use this https://www.ghielectronics.com/catalog/product/280

OK, I was able to make it work with Logitech C270 WebCam, but I’m still not able to accomplish following goal:

When user encloses his RFID card, I need to take a still image of him. I was able to complete this by using StartStreaming() method on system startup. When user uses his card, I draw actual image from camera into buffer and save on SD card, then send over LAN. It works, but after StartStreaming(), whole system slows down significantly :frowning: I understand StartStreaming() is doing a lot of work on the background, but for my case, it is unusable :frowning:

So my question is: what is the best solution (if any) for getting a still image as fast as possible?

Thank you very much
Martin

OK, one last question. I believe that for my project should be better some serial camera. I found this one:

It looks nice until you read, that image transfer can take up to 30 seconds.

Please, has anyone any experience with this kind of camera? I would be grateful if anyone can share some real experience, especially how long it takes to make one picture.

@ andre.m - Yes, but images are jpeg pre-compressed. The question is: wouldn’t I wait 10 seconds for compression to be done :slight_smile:

There are many serial port cameras out there:

But who knows how fast they really are?

I’m starting to play with an idea to solve my problem by using USBH_RawDevice class and implement an UVC by myself to get still image. I’m trying to study UVC 1.1 specification doc, wondering if it is even possible and if it brings me better performance. I presume that GHI premium libs source code isn’t available to help me begin with sources of USBH_Webcam class.

I think only bulk is supported, not ISO. Plus this can’t be done in C# anyway due to the large load of processing

Oh, I thought EMX supports bulk, so UVC still image capture scenario does…