
Mac
I'd like to use the 160x120 resolution in my project running ARC (the latest version) for Windows on a Windows 10 Surface Pro 2 but I get the following error:
11/3/2018 11:37:43 AM - Error Camera.SetCaptureImage: AForge.Imaging.UnsupportedImageFormatException: Source pixel format is not supported by the filter. at AForge.Imaging.Filters.BaseTransformationFilter.CheckSourceFormat(PixelFormat pixelFormat) at AForge.Imaging.Filters.BaseTransformationFilter.Apply(BitmapData imageData) at AForge.Imaging.Filters.BaseTransformationFilter.Apply(Bitmap image) at EZ_B.Camera.eihiq5ToKN(Object )
It runs at 320x240 okay but uses a lot of CPU and the image tends to hang or stutter and falls behind when face tracking. Anyone else have issues with the surface pro? The exact same builder file works fine on my laptop (with Windows 7).
Thanks
Grrrrrrrrrr! mad I know how frustrating this stuff can be. Hang in there. With your talent and dedication I'm sure you'll work this through.
Have you tried disconnecting the camera from the EZB and run your setup overnight without it? Make sure you deactivate any commands in your project relating to your camera. If there are any commands sent to the camera and there is no camera then you will have a EZB disconnect. Without a camera attached and it stays running you will at least know the problem is in the camera set up.
Don't rule out a bad cable between the camera and EZB. Those little ribbon cables are easy to damage. A bad connection here can cause all sorts of weird things to happen.
When you have time could you post that loop connection check script of RR's you found? I can't seem to find it. He always has such good insight and skills in these matters.
EDIT: I see above that RR posted his script. Thanks! I guess I need to read before posting. Vertigo posted a nice looking script. That looks like it will work also. Thanks Guys! Too busy and lazy to write on myshel right now.
I said early in the thread I had this exact symptom when I had a bad camera. Willing to bet the replacement will fix it (although Dave has a good point about checking cables).
Alan
@vertigo... I was only addressing the camera disconnect issue not the ezb4 drop out... It was an example code that the op can tweak for his own use...
Ok, I missed the camera thing, if it was posted in this thread, I read over it. And I agree, this could very well be a camera hardware or cable issue. I am still curious though, if this happens, does the ezb reboot?
BTW, hobbyking kinda shafted me by selling me a ezbV4/1, but they do have a good deal on the camera: https://hobbyking.com/en_us/ez-b-v4-camera.html?___store=en_us
Good enough that I had already bought a spare
(And if im honest, everyone needs to eat, but the regular price is a little excessive IMO)
When my camera failed, yes the EZ-B would reboot as well, shortly after the camera error.
Alan
"If there are any commands sent to the camera and there is no camera then you will have a EZB disconnect."
@DaveThis sounds like what is happening, even with the camera connected. I think Alan may be correct about a bad camera. I've started disassembly but it will be a while before the new unit arrives. I do, however, have another camera cable. It's a bit too long but will serve as a troubleshooting tool.
I've gone back to robot-school but I have a quick question I can't seem to find the answer to; so far all my script has been written and applied inside the appropriate control box. For instance, initial servo position and speed script was added in the "Connect" settings. Re-centering the head, after loosing a face to track, script was added to the "Camera" settings. When is it appropriate to use Blockly or the script manager or a Script control box? It seems to me that there are several places to do the same thing. I'm confused on this point.
Ahh, now there's another issue I haven't brought up. When just the camera disconnects, yes, I can simply click the "start" button to restart. But when the EZB disconnects, I cannot reconnect without having to power cycle the EZB. It says something about there already being a client connected?
@vertigo that's like a closeout price! Well done my lad. But I get so much help from you folks and directly from DJ, I just can't bring myself to order from anywhere else. But you're right, I was just put on the low fodmap diet and it's getting expensive! Don't look it up, it's depressing. No wheat, no processed sugar, no dairy, select fruits, veggies, and nuts. It's crazy complicated.
Anyway, yes yes, back to work. This is hard without my mini Snickers!
Its like writing a book; when programming there are a million ways to achieve any given goal. The right one is the one that works for you (and ideally is understandable even if you havent looked at the code for a year).
I like using separate script boxes for different, isolated actions, particularly if they are not directly related to the events of a control box. But YMMV.
As for using blocky vs ezscipt, thats also entirely up to you. Personally, Im no fan, I cant easily copy paste blocky code here, I find it confusing to read and slow to produce. But I understand its easier to grasp for some. Again, no wrong or right answer, just preferences.