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:
display the contour

Subject: display the contour

From: jan

Date: 4 Apr, 2013 17:15:06

Message: 1 of 7

Hi every body
 i want to display the contour on the image, i have only the coordinates (x and y)of each point in the contour
can somone help me please
thx

Subject: display the contour

From: kinor

Date: 4 Apr, 2013 17:21:10

Message: 2 of 7

"jan " <jansam.samjan@gmail.com> wrote in message <kjkceq$i48$1@newscl01ah.mathworks.com>...
> Hi every body
> i want to display the contour on the image, i have only the coordinates (x and y)of each point in the contour
> can somone help me please
> thx

Hi Jan,

which contour is the contour? if you want to plot a couple of points connected by a line:

help plot

kinor

Subject: display the contour

From: jan

Date: 4 Apr, 2013 18:01:25

Message: 3 of 7

"kinor" wrote in message <kjkcq6$ja7$1@newscl01ah.mathworks.com>...
> "jan " <jansam.samjan@gmail.com> wrote in message <kjkceq$i48$1@newscl01ah.mathworks.com>...
> > Hi every body
> > i want to display the contour on the image, i have only the coordinates (x and y)of each point in the contour
> > can somone help me please
> > thx
>
> Hi Jan,
>
> which contour is the contour? if you want to plot a couple of points connected by a line:
>
> help plot
>
> kinor
Hi Kinor
in fact i have 450 points and i want to display it simultaneous on the image ( i have the coordinates of this points i.e x and y )

Subject: display the contour

From: ammar al jodah

Date: 4 Apr, 2013 18:12:14

Message: 4 of 7

point_x=[1 2 3];
point_y=[2 4 6];
plot(point_x,point_y)

"jan " <jansam.samjan@gmail.com> wrote in message <kjkf5k$r4d$1@newscl01ah.mathworks.com>...
> "kinor" wrote in message <kjkcq6$ja7$1@newscl01ah.mathworks.com>...
> > "jan " <jansam.samjan@gmail.com> wrote in message <kjkceq$i48$1@newscl01ah.mathworks.com>...
> > > Hi every body
> > > i want to display the contour on the image, i have only the coordinates (x and y)of each point in the contour
> > > can somone help me please
> > > thx
> >
> > Hi Jan,
> >
> > which contour is the contour? if you want to plot a couple of points connected by a line:
> >
> > help plot
> >
> > kinor
> Hi Kinor
> in fact i have 450 points and i want to display it simultaneous on the image ( i have the coordinates of this points i.e x and y )

Subject: display the contour

From: jan

Date: 5 Apr, 2013 04:57:05

Message: 5 of 7

"ammar al jodah" wrote in message <kjkfpt$t5p$1@newscl01ah.mathworks.com>...
> point_x=[1 2 3];
> point_y=[2 4 6];
> plot(point_x,point_y)
> thanks ammar for the response but i want to display these points on the image so plot doesn't do the best work
> "jan " <jansam.samjan@gmail.com> wrote in message <kjkf5k$r4d$1@newscl01ah.mathworks.com>...
> > "kinor" wrote in message <kjkcq6$ja7$1@newscl01ah.mathworks.com>...
> > > "jan " <jansam.samjan@gmail.com> wrote in message <kjkceq$i48$1@newscl01ah.mathworks.com>...
> > > > Hi every body
> > > > i want to display the contour on the image, i have only the coordinates (x and y)of each point in the contour
> > > > can somone help me please
> > > > thx
> > >
> > > Hi Jan,
> > >
> > > which contour is the contour? if you want to plot a couple of points connected by a line:
> > >
> > > help plot
> > >
> > > kinor
> > Hi Kinor
> > in fact i have 450 points and i want to display it simultaneous on the image ( i have the coordinates of this points i.e x and y )

Subject: display the contour

From: kinor

Date: 5 Apr, 2013 15:26:06

Message: 6 of 7

Jan

you want to insert the points into your image data. plot does the display job..

kinor

Subject: display the contour

From: Nikolay S.

Date: 9 Apr, 2013 14:16:05

Message: 7 of 7

"kinor" wrote in message <kjmqee$3m0$1@newscl01ah.mathworks.com>...
> Jan
>
> you want to insert the points into your image data. plot does the display job..
>
> kinor
Hi Jan.
In case you're having a mask (as far as I can ssee you're working on snakes methods) and you want the edge coordinates you can do it via the contour function or my mask2poly (http://www.mathworks.com/matlabcentral/fileexchange/32112-mask2poly) function.
To the issue: in case you're using imshow, you may have to reverse the Y coordinates befor the plot\line command. You should note the X and Y coordinates- those are reversed in plot/line and image axes. A simple flilr, or coordinates hift resolves the issue.
If you want to generate an image with the line in it my function addMarkerLines2Img (http://www.mathworks.com/matlabcentral/fileexchange/37427-plot-on-an-image-addmarkerlines2img) can be handy.

Tags for this Thread

No tags are associated with 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