Welcome to Synthiam!

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

Asked — Edited

Need Guidance With Camera Tracking

So, I've gotten my wireless camera I bought from EZ Robot temporally mounted on top of the brain of my B9 and powered from the 3rd EZB I've got mounted up there. That makes it about 6 feet above the ground and pointed down to capture movement as people walk past. The idea is to have the radar section swing left or right and follow the movement. I had no problem setting it up and having EZ Builder recognize it after adding the camera control. I got a good clear picture from the camera with little noise. So far so good.

A couple more things: the radar section the camera is mounted on is powered by a small DC gear motor and a H-bridge that is hooked to two of EZB's digital ports (one for each direction of the motor) and also a third for a PWM. So, this being a H-Bridge set up I added the 4 Wire H-Bridge Movement Panel and assigned the proper digital ports for left & right movement. I can press each direction arrow in the panel and get the radar to swing left and right smoothly so I know it's connected and working.

The problem I'm having is that after setting up what I think is the proper settings in the camera control panel I cant get the radar section to follow movement properly. It will notice movement to each side and start to turn in that direction but quickly stop. I can get it to follow me across it's radius if I move very slowly and wiggle around a little but it's a stop and go process. Also it seems to get distracted and focus on other things like stuff laying on the workbench. Almost like he has the attention span of a 1 year old kid that's board with me.

I see there are several settings within the camera control panel that can be adjusted. After tinkering with a few of them I did get better response and tracking but nothing close to what I see in DJ's videos. I have "Motion" checked in the Tracking section and in the Config section I have "Enable Movement Tracking" checked with only the "Allow left/Right Movement" checked.

Does anybody have any suggestions on how to adjust the settings to get my tracking smoother and follow motion of a person walking past better? I'm not sure what to do with the cross hairs of the grid, Motion Delay in the Config area, Tracking speed and the two sliders in the Motion section that adjusts Movement sensitivity and Object Size. Then there is the "Check Every ? Frames" box. I'm getting flustered with all the choices with no real results.

Any advice is welcomed.

Thanks, Dave Schulpius

AI Support Bot
AI Support Bot
Hey there! This is an automated response from me, the support bot. I've searched other questions, tutorials and controls related to your question. Take a look at these links. They're all sorted by what I believe is the most relevant:
Just a thought; I do have a pot already installed and attached to a ADC port on one of the 3 EZB boards for poison of the radar. Can I use this feedback info somehow to so I can use the servo Relative Position feature instead of the h-bridge movement in camera control? Then I can mount my camera on a fixed part of the robot without changing to a servo or buying a new interface board. Just wondering. Here's a couple pics of my set up:

User-inserted image

User-inserted image
I don't know if this helps you or not, but here is what I'm doing.
As I said, I am working on the waist section. Getting a servo big enough to lift the entire top half of him is out of the question for me. If you look at the second video that DJ posted on this page; I tried that a while ago. I couldn't get it to work. I am doing a similar thing but with mechanical connections, rather than electronic.

I don't know how easy it is to make out in the picture. The servo is connected to the bottom plate. The little push buttons are connected to the top. They trip the relays on the H Bridge and the motor (not visible on the bottom) moves the top plate. I am kind of at a "proof of concept" stage now. I will be modifying the head of the servo with some sort of a larger paddle, and there is a little slack in the buttons, but it works surprisingly well right now. The top plate follows the servo exactly, with no hesitation or flutter. When it gets done, I will post a video.

More moving parts do create the potential for more problems. I am a little concerned about that, but until a better work around comes along, I intend to go with this and make a similar setup to turn the radar.

It does save plugs on the EZ-B using one servo instead of an H Bridge and feedback pot. It also completely eliminates the chance of a voltage spike feeding back from the motor.

I am not sure if you could even work this sort of a setup into your system, but it might be food for thought.
User-inserted image
Humm, interesting. Nice design with thinking out of the box. So is this for the rotation of the waist or the lowering of the hips? I'm a little confused on how it really works. If for rotation does the servo just moves enough to push the button on either side and stops and then returns back to center when the rotation gets to the point you want it to be at? If for the hips does the servo keep rotating with the angle of the hips after the button is pushed? How are you sending position feedback to EZB or does this just work with the camera control?
This is to lean at the waist. Unlike some designs that have a hinge on the back, he pivots in the middle when he leans forward and back. I thought that looked more natural. I want to use this as the X axis for camera tracking. If a face is below his line of site, he will lean forward to maintain eye contact.
This picture is a side view. As the servo rotates, it pushes one of the buttons; let's say the red one. From this view, the left side of the top plate would go down as the right side goes up. Both buttons swing along in the direction of the movement of the servo. As long as the servo is turning, it holds pressure against the button. Once the servo stops, the red button starts to pull away from it, it releases and the motor stops. If you watch it in action, it is as though the servo is attached to the buttons and swinging the entire top plate back and forth. The small buttons on either side are stops. It moves until one of them hits the bottom, and shuts it down.
I'll have to post a video, but I need to create a Youtube account, and in order to do that, a Gmail, etc.

Right now I am only using a servo control to move it. I have not tested the actual camera tracking with it yet.

Unfortunately, to make the radar rotate, the servo will have to be placed right in the center underneath it. Basically, the servo is placed as if it is actually turning the part. The buttons just activate the motor to haul the weight around. It is something like power assisted steering.
This is a short video of the mechanism in action. I uploaded it to my brother's Youtube account. I was going to wait until I got all of the bugs worked out, but this will give you an idea. It is kind of poorly lit, but you should be able to make it out. The servo needs to be adjusted down a little bit. It is not in the center of motion. Also, the horn of the servo needs to be replaced with something rectangular that makes better contact with the buttons. Once all of that is done, I can adjust the buttons to take all of the play out.