I am trying to create an application that will track a green tennis ball but I am having problems with finding the location the ball. Here's the code that I think is incorrect, how can I change it find the location of the ball?
private void timer_Tick(object sender, EventArgs e)
camera = new Camera(ezB_Connect1.EZB);
ezB_Connect1.EZB.Movement.MovementType = EZ_B.Movement.MovementTypeEnum.ARDrone;
ObjectLocation objectLocation = camera.CameraBasicColorDetection.GetObjectLocationByColor(true, ColorDetection.ColorEnum.Green, 10, 100);
tbLog.Text = "found not object";
if (objectLocation.horizontalLocation == ObjectLocation.HorizontalLocationEnum.Left)
else if (objectLocation.horizontalLocation == ObjectLocation.HorizontalLocationEnum.Right)
else if (objectLocation.horizontalLocation == ObjectLocation.HorizontalLocationEnum.Middle)
Upgrade to ARC Pro
Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!
1) All detection needs to be done in the OnNewFrame event. For example, take a look at the code for Tutorial 11
2) Only set the MovementType once. Set it in the Form Load event
Also, I am not able to use
with AR Drone. My Visual Studio would not find the method. The only method that would work was
and this method would not work when dealing with following colored objects.
I believe this is not the current firmware. Do I need to upgrade to the latest firmware version for the SDK to work?
You should be aware that with the latest firmware, the Drone can connect to an infrastructure network and no longer needs to create its own ad-hoc network, so being able to specify the IP address of the drone to the EZ-B controls would be a great addition (as well as the long awaited support for the V2 camera).