Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1471
Number of posts: 2147

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
simulink vision Posted by dbhellmith on 25 Mar 2009 at 3:31 PM
I am currently working on a class project, my goal is to track a color or shape with a camera. Then to receive the coordinates of the object. any assistance would be helpful, including how to track an object by color or shape and how to detect the coordinates.


I have done some work but the built in library seems to be missing some things that i have to extract from demos.
Report
Re: simulink vision Posted by giug on 26 Mar 2009 at 1:22 AM
Please post your try so that I can help you to understand what is wrong.
Report
Re: simulink vision Posted by dbhellmith on 26 Mar 2009 at 2:11 PM
sorry here is what i was able to get with tracking red. but i am not sure about shapes or a coordinate system.
Attachment: red color vision tracking.JPG (73741 Bytes | downloaded 231 times)
Report
Re: simulink vision Posted by giug on 27 Mar 2009 at 12:43 AM
Your result is good.
I think that, first of all, you have to "clean" the image, so that it remains only the circle.
You can mantein only the objects that have an area > of a certain threshold, or you can use some morphological operators.
Then, you can use the function regionprops to find the coordinates of the center of your object.
For the color you can simply check the value of the centroid pixel.
Report
Re: simulink vision Posted by dbhellmith on 28 Mar 2009 at 2:19 PM
i understand the cleaning part i figured that out, well started to. but the regionprops, i don't i can see using it in matlab but not how to incorporate it into simulink i know that it is possible but i can not figure out how exactly
Report
Re: simulink vision Posted by giug on 29 Mar 2009 at 2:08 AM
If you search in the matlab help "regionprops simulink" you can figure it out.
Report
Re: simulink vision Posted by dbhellmith on 31 Mar 2009 at 8:25 PM
thanks for the help i think i finally understand i had a little trouble combining the "blob" out put back in because the output size ended up as 50*by like 2 but i got it worked out i will post my final for anyone else reference soon
Report
Re: simulink vision Posted by dbhellmith on 7 Apr 2009 at 10:25 AM
thank you very much for all of your help, the only thing i have left is that i wish to receive the output of blob analysis in x,y cord so that i can use this separately.
Attachment: final only missing x,y output.JPG (103301 Bytes | downloaded 154 times)
Report
Re: simulink vision Posted by giug on 7 Apr 2009 at 10:44 AM
Your work is very fine!
What is the problem with the coordinates?
Report
Re: simulink vision Posted by dbhellmith on 7 Apr 2009 at 3:04 PM
i just need the cord output but do not know how to display it, centroid or bbox. i do not know, i am trying to get a numeral display that can be edited. so the way i see it would be like x = 100 , y = 124.
and if there are multiple targets then each point is needed. i sort of see it in centroid but do not know what can view that.
Report
Re: simulink vision Posted by giug on 8 Apr 2009 at 12:13 AM
Why don't you use the display block?
Report
Re: simulink vision Posted by dbhellmith on 10 Apr 2009 at 7:57 AM
because i did not understand that i could. thanks and the way my block library's are i couldn't find it until i knew what i needed because it did not show up. thanks for all of the help and quick responses



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.