Coral USB accelerator with OpenCV - google-coral

i am curious if someone has implemented Yolo or SSD // OpenCV on RPi 4 with Coral Usb Accelerator support.
Currently, i faced some issue running even for the basic examples for coral usb accelerator. Do you have any tips in tackling this idea?
Moreover, i would like to use this setup to detect the road signs from a car's camera. Do you think it would be ok?

What type of issues are you having while running the basic demo?
Also, make sure your model meets the requirements for the tpu:
https://coral.withgoogle.com/docs/edgetpu/models-intro/#compatibility-overview

Related

Real Time Image processing from a drone

I have the following products:
drone iris+
Pixhawk
For my last year project I want to process the image from the drone in real time and to control the drone by the image.
I don't find which product will be the best for me... is it the Raspberry pi or maybe something else that I'm not familiar with.
Thanks
Any embedded linux computer should work. The Odroid series has more computing power than a raspberry pi, which will be helpful here. See this article for setup instructions: http://dev.ardupilot.com/wiki/odroid-via-mavlink/
Regarding software: I would suggest using the OpenCV (computer vision) library for your image processing needs. There's a nice built in function for camera input that interfaces nicely with both Python and C++ programming languages. Depending on your experience writing software, I would recommend python (higher level, possibly slower, portable) or C++ (fighter jet: hard to use, higher ceiling in terms of performance). C++ might be appropriate for the speed necessary to operate a drone. I would check the docs to see if the package serves your needs before diving in.
Regarding hardware: Consider using Arduino to interface with peripheral hardware, but I'm definitely not experienced with this sort of thing.
Have fun!

openCV compatible webcams

I have read that openCV does not recognise some webcams.
Can you suggest some webcams for a basic stereo-vision project using the following?:
openCV 2.2.0
Visual Studio 2010 (C++)
Windows 7 32 bits
Thanks.
I posted a similar question back then.
Good and compatible webcam to do image processing/computer vision?
What kind of camera you are looking for? Any model? State the model and I let you know if it's good enough.
Also, you can find a list of compatible webcams with openCV. It's an old list though. They stopped updating it since 2013, I think. Compatible webcam with openCV
You find that most common brands like Hp, Logitech, etc should work just fine. If you are worried, just state the model you are looking at in the comments. I see if I know if it's compatible with openCV.
EDIT:
To answer your question in the comment, nope, that shouldn't be the case. All cameras can run simultaneously at the same time. Reasons that cameras can't run simultaneously at the same time is usually due to the USB bandwidth. In fact, most cameras pose the same problem.
Some methods to overcome that problem:
1)put a Sleep(ms) in between the lines of your capture line.
2)Use lower resolution which would reduce the bandwidth used by each camera.
3)Use MJPEG format(compressed frames)

2 usb cameras not working with opencv

I'm working on a project of computer vision and I need to use two cameras using opencv library. I tried this code but with two webcams from USB port it doesn't work while it works if I use one usb camera and the camera of my pc.
CvCapture* capture[2];
capture[0] = cvCreateCameraCapture(0);
capture[1] = cvCreateCameraCapture(1);
if(!capture[0] && !capture[1])
printf("Webcam error\n");
I'm working on windows 7 on an acer aspire 5742g. Is it a problem of the bus of my computer? The cameras are 2 Philips SPZ2000.
I tried also to work on the pictures taken by the one of them and from the camera on my pc and when I use the code for calibration and rectification found on the book "Learning opencv" of Bradsky I get a bad result. Can somebody help me?
Thank you in advance,
Sara
The typical reason for 2+ USB cameras to not work together (still they might be working fine separately) is that USB bandwidth is insufficient for them both to run simultaneously. There is a bandwidth limit, which is rather low: The maximum throughput of an isochronous pipe (which is usually used for video) is 24MB/s.
More on this issue:
Implications of using many USB web cameras
How many USB cameras can be accessed by one PC
Not able to capture video using 2 webcamera simulteneously
Two webcams on one usb hub - bandwidth issues

OpenCV + Webcam compatibility

For the people that have experience with OpenCV, are there any webcams that don't work with OpenCV.
I am looking into the feasibility of a project and I know I am going to need a high quality feed (1080p), so I am going to need a webcam that is capable of that. So does OpenCV have problems with certain cameras?
To be analysing a video feed of that resolution on the fly I am going to need a fast processor, I know this, but will I need a machine that is not consumer available...ie, will an i7 do?
Thanks.
On Linux, if it's supported by v4l2, it is probably going to work (e.g., my home webcam isn't listed, but it's v4l2 compatible and works out of the box). You can always use the camera manufacturer's driver to acquire frames, and feed them to your OpenCV code. You can even sub-class the VideoCapture class, and implement your camera driver to make it work seamlessly with OpenCV.
I would think the latest i7 series should work just fine. You may want to also check out Intel's IPP library for more optimized routines. IPP also easily integrates into OpenCV code since OpenCV was an Intel project at its inception.
If you need really fast image processing, you might want to consider adding a high performance GPU to the box, so that you have that option available to you.
Unfortunately, the page that I'm about to reference doesn't exist anymore. OpenCV evolved a lot since I first wrote this answer in 2011 and it's difficult for them to keep track of which cameras in the market are supported by OpenCV.
Anyway, here is the old list of supported cameras organized by Operating System (this list was available until the beginning of 2013).
It depends if your camera is supported by OpenCV, mainly by the driver model that your camera is using.
Quote from Getting Started with OpenCV capturing,
Currently two camera interfaces can be used on Windows: Video for Windows (VFW) and Matrox Imaging Library (MIL) and two on Linux: Video for Linux(V4L) and IEEE1394. For the latter there exists two implemented interfaces (CvCaptureCAM_DC1394_CPP and CvCapture_DC1394V2).
So if your camera is VFW or MIL compliant under Windows or suits into standard V4L or IEEE1394 driver model, then probably it will work.
But if not, like mevatron says, you can even sub-class the VideoCapture class, and implement your camera driver to make it work seamlessly with OpenCV.

Microsoft Robotics Studio, simple simulation

I am soon to start with Microsoft Robotics Studio.
My question is to all the gurus of MSRS, Can simple simulation (as obstacle avoidance and wall following) be done without any hardware ?
Does MSRS have 3-dimensional as well as 2-dimensional rendering? As of now I do not have any hardware and I am only interested in simulation, when I have the robot hardware I may try to interface it!
Sorry for a silly question, I am a MSRS noob, but have previous robotics h/w and s/w experience.
Other than MSRS and Player Project (Player/Stage/Gazebo) is there any other Software to simulate robots, effectively ?
MSRS tackles several key areas. One of them is simulation. The 3D engine is based on the AGeia Physics engine and can simulate not only your robot and its sensors, but a somewhat complex environment.
The demo I saw had a Pioneer with a SICK lidar running around a cluttered appartment living room, with tables, chairs and etc.
The idea is that your code doesn't even need to know if it's running on the simulator or the real robot.
Edit:
A few links as requested:
Start here: http://msdn.microsoft.com/en-us/library/dd939184.aspx
alt text http://i.msdn.microsoft.com/Dd939184.image001(en-us,MSDN.10).jpg
Then go here: http://msdn.microsoft.com/en-us/library/dd939190.aspx
alt text http://i.msdn.microsoft.com/Dd939190.image008(en-us,MSDN.10).jpg
Then take a look at some more samples: http://msdn.microsoft.com/en-us/library/cc998497.aspx
alt text http://i.msdn.microsoft.com/Cc998496.Sumo1(en-us,MSDN.10).jpg
simple answer is yes, MRDS simulator and player/stage have very similar capabilities. MRDS uses a video game quality physics engine under the hood, so you can do collisions, and some basic physics on your robots, but its not going to be the level of accuracy of a matlab simulation (on the flip side its realtime and easier to develop with though). You can do a lot in MRDS without any hardware.
MRDS uses some pretty advanced programming abstractions, so can be a bit intimidating at first, but do the tutorials, and the course that has been posted to codeplex "software engineering for robotics" and you will be fine. http://swrobotics.codeplex.com/

Resources