Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

simulink vision

dbhellmithdbhellmith Posts: 14Member
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.
«1

Comments

  • giuggiug Posts: 217Member
    Please post your try so that I can help you to understand what is wrong.
  • dbhellmithdbhellmith Posts: 14Member
    sorry here is what i was able to get with tracking red. but i am not sure about shapes or a coordinate system.
  • giuggiug Posts: 217Member
    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.
  • dbhellmithdbhellmith Posts: 14Member
    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
  • giuggiug Posts: 217Member
    If you search in the matlab help "regionprops simulink" you can figure it out.
  • dbhellmithdbhellmith Posts: 14Member
    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
  • dbhellmithdbhellmith Posts: 14Member
    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.
  • giuggiug Posts: 217Member
    Your work is very fine!
    What is the problem with the coordinates?
  • dbhellmithdbhellmith Posts: 14Member
    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.
  • giuggiug Posts: 217Member
    Why don't you use the [u]display[/u] block?
«1
Sign In or Register to comment.