Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Question Using Tablet Camera Using Ez Builder

I having a problem using the camera on my Windows 8.1 tablet. I get this error:
Object recognition initialized
Error initializing Camera: System.Runtime.InteropServices.ComException (0x80004004):Error HRESULT E_FAIL has been returned from call to a COM component.

I get the same error using either the front or rear facing camera...I have the latest ARC version 2016.01.06.00

here are display resolutions: https://en.wikipedia.org/wiki/Graphics_display_resolution

QVGA and VGA are the most popular of any video capture or display device. If they do not support those, it's a non standar - this is because resolutions are inherit. They are fractions of each other, which is relative to memory size for scaling. If you can tell me what resolution to expect, i can look into adding support for it.
So, I can obviously only answer for the Acer, but using the old AMCAP app that used to ship with every web cam, and looking at the Video Pin properties, it supports the following resolutions:

448x252 (that is probably the weird one)
640x480 (normal, and supported by ARC but still causes the crash)

The frame rate may be the issue. it is showing as 29.970 and the up/down arrows to adjust frame rate are not available. If I type in a different frame rate it jumps back to 29.970, so I can't try changing it.

The frame rate of ARC is slave to the frame rate of the capture device. The option in ARC merely skips frames, it doesn't actually control the framerate.

This was because the original ARC many years ago tried to control the frame rate with great difficulty. Most brand name camera manufacturers were great at meeting direct show requirements - however, that's not helpful for cheap china cameras and such which is pretty much 90% of anyone from this forum that has external usb webcams on their robot.

So the solution was grab the frame at any rate that it can be processed, and skip any frames outside of processing capability. This gives the device permission to do what the heck it wants - all ARC cares is that an image is loaded into the register.

If the 640x480 is causing a crash, yet it is still supported - i'm quite confused because ARC uses the native microsoft direct show driver, without any modifications. Does the crash produce an error log? That might be useful to help me diagnose.

I can add 1280x720 as a resolution - but i doubt any of your or our computers are powerful enough to process that resolution at a usable framerate.

Quick math...

320x240: 76,800 pixels at 3 bytes per pixel = 230,400 byte filesize per frame

1280x720: 921,600 pixels at 3 bytes per pixel = 2,764,800 byte filesize per frame

That's 12 times the file size per frame. So if your computer, like mine, is processing ARC video at 5% cpu, multiply that by 12...

And video processing in ARC is multi threaded. There is a thread for the video capture, a thread for accepting the frame, and a thread for processing the frame. So it's cross core distributed as much as possible - at least without splitting each "Tracking type" into a separate thread, which i guess would introduce a whole new pile of thread blocking performance issues which will be counter-productive.

A little off topic... but it's an option if you really want 1280x720 resolution added to ARC. My concern is that people will actually select it and think "it's an option, so it must work" - and then be quite upset that they're cpu is 100% and getting 1 frame per second:D
I think getting the 640x480 to work would be sufficient. The EZ-B error is in the first post. I'll see if it is writing Windows application logs later or in the morning.
Nothing in the windows event logs. Let me know if there is anything else I could do to help. Happy to run a debug version if you want to capture more detail about the failure.

I dont know if this helps but here is the specs on the hm2056 camera...
56 UXGA ClearView

15fps ? 1/5 2MP ? Color CIS SOC ? High Sensitivity, Optical Restoration, MIPI-CSI2

The HM2056 is a compact 2.0MP UXGA System-on-Chip CMOS Image Sensor that features the BrightSense2TM high sensitivity, 1.75µ pixel integrated with an advanced Image Processing Pipeline (IPP) to deliver excellent still and video quality under broad lighting conditions.

The HM2056 IPP features ClearViewTM Optical Restoration Engine that restores the clarity of the image utilizing the characteristics of the lens. The ClearViewTM is supported by an advanced calibration tool on Himax Imaging’s software system that can be quickly adapted to a wide variety of lenses.

The sensor supports MIPI-CSI2 interface to maximize system design flexibility. The MIPI interface is compliant to industry standards and compatible with leading processor chips. All sensor parameters are controlled through a 2-wire serial interface.
Image Sensor SOC Features

High sensitivity 1/5 optical format 2.0MP UXGA sensor SOC operating up to 15 frames per second
720p HD video readout up to 30 frames per second
Compliant 1-lane MIPI CSI2 supporting up to 576Mbps
ClearViewTM Optical Restoration Engine (ORE) improves optical performance and clarity
Image Processing Pipeline with dynamic low light and color temperature based adjustment
Automatic Functions for exposure/gain, white balance, and frame rate control
Arbitrary down-scaler from SVGA
Available in CSP and Bare Die (RW) package option
Fits in compact 6.5 x 6.5 mm2 camera modules

Image Sensor SOC Specifications
Part Number HM2056-AWA (CSP), HM2056-AGA (RW)
Color RGGB
Array Diagonal 3549 µm
Resolution UXGA (1600 x 1200)
Output Format RAW, YUV, RGB565, RGB555, RGB444
Optical Format 1/5?
Pixel Size 1.75µm
Frame Rate 15FPS 288MHz (MIPI 1lane)
Sensitivity (FD @ 530nm) 1100 mV / Lux-sec
SNRmax 36dB
CRAmax 25.5º non-linear
AVDD / DVDD / IOVDD (typ.) 2.8V / 1.5V / 1.8, 2.8V
Power Consumption Active: 220 mW (MIPI @ 15FPS), Standby: <25 µW
Temperature Operating: -20° to 70°C, Storage: -40° to 85°C
Package CSP, RW
This camera module (hm2056) is made by Intel.
This might not work as a workaround, but does the tablet have a USB port and if so could you use a usb webcamera?
The Acer cameras are Omnivision OV2722 sensor but the drivers are provided by Intel as well. Maybe there is an issue with Intel drivers and ARC.

It has usb port,but I am trying to intergrate the tablet within the head of my robot head without anything attached to it. I need to be able to use the tablets cameras with ARC. I dont want anything sticking out around the tablet.
To be clear, there is zero code in ARC.regsrding frame capture of usb cameras. This is because it is done through Microsoft direct show. There is literally zero code in ARC. A single class is used from direct show which raises an event for every frame. There is zero code in ARC.for usb frame capture, as it is handled by direct show. Direct show is a Microsoft interface for audio and video. Ezrobot had absolutely zero access to the library, as it's a system level library by Microsoft. There is no additional debugging or changes or tweaks or anything that we can "try". The direct show function literally accepts the video capture device guid and begins raising onframe events.

If it doesn't work - I have absolutely no idea how to make it work because there is nothing more that can be done.

The only possible solution would be to create a video capture interop class that reproduced direct show - which will introduce a huge pile of trial and error bugs to ARC.

There is another small option - is to review any direct show demos or apps that work with the camera to see if there's a function or parameter specified that I'm unaware of - just as long as it doesn't break existing usb camera support. I'm hesitant to introduce new issues with video capture - but it could be worth a try.

My recommendation is to use a usb camera that complies with the Microsoft direct show, which is every other camera I've ever seen except these strange unusable ones.

Alan, yiu mentioned something about amcap - is that the direct show sample that you're referring to? And it works with the camera? If so, can you verify that it is from this sdk: https://msdn.microsoft.com/en-us/library/windows/desktop/dd373424(v=vs.85).aspx
Ok, So I was planning on getting the ACer W3 Tablet. Found an inexpensive one on Ebay. Id like to use that for Cy's Head instead of the Larger Dell Laptop Im using.
On other post, Ive read that the ACer W3 was a good choice to EZb. Is this still true? Are there other Tablets that also work great with EZB both in terms of the WIfi and
cameras? and still comes with WIndos8.
Id like to get a new tablet ,I have the Dell Vue8 tablet, and that does not wirk with EZB (wifi will not sync to the V4 at all).
@RoboHappy Sync wouldn't be the right term... However, have you tried putting your ezb in client mode and then tried connecting to your Dell Vue8 through the router?
DJ can you specify a model or brand of 8 inch tablet with Windows that has front and back cameras that work withARC?
Dj I am out today, but will download from that sdk and test. The amcap I am using is from AN sdk, but it is a very old copy. I am wondering if it the protocol that predates directshow (I forget what it was called other than it was a 3 letter acronym).

I have a tablet with the same camera. I am loading the sdk and samples now. I will post the results.
I downloaded the sdk and an app called AMCap v 9.22 build 260. AMCap advertises itself as an application for DirectShow-Compatible Devices. Both the front and rear cameras work on this tablet through this version of AMCap.

I don't have visual studio installed on this device to compile the samples from the SDK to see if they work or not. I may get to trying this out next week, but right now, I don't know.

The cameras in this tablet are OV2722 cameras.

Is there a particular DLL that I can look for to tell you a version number possibly that the AMCap app would be using? Most of the files have a date modified of 4/19/2010 in the sdk where the AMCap DLL's (things beginning with MS) have dates in 2014.

If I get around to it tomorrow, I will try to install visual studio and compile some of the example projects from the SDK to see if they work or not.
I went ahead and started a download of vs 2015 community. DJ, if there is a specific sample in the MS SDK that you would like me to try, I would be happy to compile it and try it out. It would probably take a while to compile on this computer, but I really am trying to keep my dev box as clean as possible. The wife has taken over my laptop.
DJ, just a heads up... the PlayCap sample from the SDK works without any issue on the OV2722 camera.

It is in the ...\samples\multimedia\directshow\capture\playcap folder.

The amcap sample wont compile. It seems to be missing a stream file or folder or something.

Let me know if you would like for me to test anything else.
I had the same results as David trying to compile under VS2013. The SDK is the VS2010 one, and I don't have that version (I still have 2008, but didn't try that).

DJ, If you think it would help, I could loan you my Acer W3 for a while so you can maybe figure out what is going on. Not sure how we do that without needing to pay customs when shipping it back and forth between US and Canada.

I don't particularly care that the cameras don't work for me because the robot I will be putting it in won't need a camera at the location the tablet will be, but a lot of EZ-B users use this tablet, and if it would help solve the problem rb550f is having I would be more than happy to do something to assist (although he has a different tablet/camera, I assume it is the same issue since the error message is the same).