Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Motor Via Motion Detection

I Have a Project That Detect Motion From Cam and then robot move in the same direction which object moving
i Know How to detect motion but i don't have any idea how to move motor 
Can Anybody help me?

0 Kudos
Message 1 of 18
(4,741 Views)

Hello,

 

could you provide some more information please? What kind of motor is it? How are you communicating with the motor? Is there a problem sending the commands to the motor or the algorithm to perform motion of the motor?

 

Please  better explain your problem.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 18
(4,731 Views)

I'm Using Two DC Motor Which I Can Move (Forward , Reverse , Left , Right) Depend on Moving of the object 
I will Send Signal To Motor Via Wireless Form Labview and then receive it to PIC Micro
I Don't Know How to know the direction of the object if it moving Forward , Reverse , Left , Right

0 Kudos
Message 3 of 18
(4,726 Views)

Hello,

 

How are you detecting motion?

 

The best way would be acquiring a depth image, so that the position of the moving object in 3D space is known (two cameras, a camera and a light projector - Kinect for exmple. Kinect enables you to acquire texture image also, so your object detection could be on the image which could be directly linked to the 3D point cloud). What is the distance of the robot from the object? You probably have the camera mounted on the robot? Is it connected directly to a PC? Doing 3D vision could be very awkward because of all the extra components.

 

The second option would be to use one camera and detect the object and move the motor in such a way that it constantly lies in the centre of the image. Then track the object as it moves, not considering only different image coordinates as it moves, but also scale. So, if it moves further away from the camera, the imaged object will be smaller, and in this case you know that the object moved away from the camera (and vice versa). Motion from left to right should then be easy.

 

I just throwing some ideas out there to consider. I am convinced that someone else could help you with a better approach.

 

Best regards,

K

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 18
(4,716 Views)

Hello dear,

 

Do it in simple way just mount a camera on motor first try to locate the pattren or any colour matching technique to generate a target then use some methametical calc on the recieved x or y values because it will become a close loop control then you have no need to send much data through VISA just try to keep the pattren in center of the image and pas three values to ur controller 4-5-6.

 

4 will indicate clock wise rotation(pattren left)

6 will indicate anti clock wise(pattren right)

5 will indicate not to move (pattren center)

 

Thanks,

Gagandeep sharma
0 Kudos
Message 5 of 18
(4,656 Views)

Dear sir (kelmen)

 

one thing am also confused like when i give a pattren to the camera it always locate when there is same distance but when my pattren goes far or come near from the perticular point from where pattren was clicked it never recognise is there any solution for that....

 

 

Thanks,

Gagandeep sharma
0 Kudos
Message 6 of 18
(4,656 Views)

Hello,

 

I am not sure what you mean, but you are talking about object scale change? So if the object gets bigger or smaller, you are unable to detect it?


Pattern matching is not scale invariant (only up to small ratios). You need to train more templates for various scales or use the geometric matching (try edge-based first, as it is more accurate), where you train your template also for scale changes.

 

Does this answer your question?

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 7 of 18
(4,648 Views)
yes sir it was close to the question
i am talking about the distant and nearby object i had used geomatry option also but i think m nt using it correctly if u can help me with example.. i will b very greatful to you...
thanks,
Gagandeep sharma
0 Kudos
Message 8 of 18
(4,644 Views)

Hello,

 

i am attaching an example of geometric matching.

 

There are two vi's:

- learn geometric template, where you can manually learn the template (the most interesting to you is scale span - it is set to 50% - 150% of the original size)

- match template, where you can search for the template on different images.

 

The test.png is already a template of image "legos00.jpg" (see the folder images). The other two images in the image folder are the same, only scaled (so the object is smaller and bigger). You should be able to find both scaled objects with the learned template. If using different scales, you have to specify this at the learning stage.

 

The attachments are in Labview 2012.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 9 of 18
(4,640 Views)
right sir i will be back with updation.

thanks,
Gagandeep sharma
0 Kudos
Message 10 of 18
(4,634 Views)