Shape identification from array data

Is there a function or a package in matlab that deals with identifying shapes fromed by arrays like for example L shape C shape etc.
I have data recorded from position tracking device and I want to identify the shape of movement or how close it is to certain shapes. The data are coordinates in x,y,z
Any help would be highly appricited.
Thank you so much!

Answers (1)

See my attached shape identification demos.
You could also use deep learning if you have a set of shapes to train on.

4 Comments

I love this idea. Any chance you could elaborate on how you could identify a shape with just xy data (a vector for x and a vector for y). I see your code and I'm a little confused on how I would input my data to get a shape. Also, I don't know what deep learning tool I could use to help with this.
@Lauren Crew not exactly sure which lines from which m-file you're talking about. But in general, if you have x and y coordinates you can turn that into a binary image with poly2mask
@Image Analyst Okay, I managed to get a "shape", but my data is behavioral tracking data (location in an environment from overhead camera). Does your code fill in the holes of my shape? And I guess my question would be how do I use your code? I'm a little be of a novice when dealing with coding.
I don't know. We have not seen what kind of data you have. If you're tracking an animal or vehicle or something I don't know why you'd need shape info, unless it's to select the thing you're tracking from a multitude of other blobs in the scene.
If you have any more questions, then attach your data and code to read it in with the paperclip icon, in a NEW discussion thread, after you read this:

Sign in to comment.

Products

Release

R2020a

Asked:

on 10 Aug 2020

Commented:

on 19 Oct 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!