Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How do I insert the coordinates (centroid) of detected moving objects onto the object?

Subject: How do I insert the coordinates (centroid) of detected moving objects onto the object?

From: Olu A

Date: 8 Sep, 2010 15:48:06

Message: 1 of 4

This is for Simulink.

I am trying to figure out how to insert the x,y coordinates of the centroid of moving objects that were detected in a video from a webcam. (Down the road, if possible I will like to be able to separate the x and y with a comma.)

Right now I can put a bounding box around the detected objects. Using the “Draw Markers” block, I can also indicate the location of each object’s centroid. I am thinking that the way to insert the coordinates is to use the Insert Text block but I am not having any luck doing so.

The Insert Text block has 3 inputs: image (240x320x3), location (2,5) and variables.
Image is the video from the webcam
Location contains the x,y of the centroids of 5 objects.
I want variables to contain the x,y information that will be inserted at the points specified by location (2,5).

Any help on how to do this? Is there another way to approach this?

Subject: How do I insert the coordinates (centroid) of detected moving objects onto the object?

From: witek@mathworks.com

Date: 8 Sep, 2010 16:59:24

Message: 2 of 4

Hi Olu,

You are on the right track with Insert Text block. Have a look at
>> vipstabilize
and
>> vipwarningsigns

demos. The first one places coordinates of a location at a fixed location in
the image and the latter shows how to dynamically relocate the text.

Let me know if you still have trouble.

Witek



Olu A <nothing@yahoo.com> wrote:
> This is for Simulink.
>
> I am trying to figure out how to insert the x,y coordinates of the centroid of moving objects that were detected in a video from a webcam. (Down the road, if possible I will like to be able to separate the x and y with a comma.)
>
> Right now I can put a bounding box around the detected objects. Using the “Draw Markers” block, I can also indicate the location of each object’s centroid. I am thinking that the way to insert the coordinates is to use the Insert Text block but I am not having any luck doing so.
>
> The Insert Text block has 3 inputs: image (240x320x3), location (2,5) and variables.
> Image is the video from the webcam
> Location contains the x,y of the centroids of 5 objects.
> I want variables to contain the x,y information that will be inserted at the points specified by location (2,5).
>
> Any help on how to do this? Is there another way to approach this?

Subject: How do I insert the coordinates (centroid) of detected moving objects onto the object?

From: Olu A

Date: 8 Sep, 2010 18:11:22

Message: 3 of 4

Hi Witek,

vipstabilize

provided what I was looking for.
Thanks

Subject: How do I insert the coordinates (centroid) of detected moving objects onto the object?

From: nethaji anandhavalli

Date: 31 Oct, 2010 18:09:03

Message: 4 of 4

hi,
have a look on viptrackpeople
i need to set ROI and then track.
pls help me. have u got any idea. pls

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us