Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: Regarding t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 19 Topic 5470 of 6457
Post > Topic >>

Re: Regarding the Fit_Ellipse Program

by plim.dreaming@[EMAIL PROTECTED] Feb 27, 2008 at 03:47 PM

> Yes, so what you need to do is to compute the ellipse
> in a way that does not depend on the graphic device used and
> then plot it. Can I just quickly ask what is your starting data
> again (that is, how exactly you define your points in the first
> place)?
>
> Paolo> B


Hi Paolo and David,
So, I went ahead an managed to create ellipses for the blobs!!  I
changed set_plot,'x' so now !D.X_size gives me 640 instead which the
computer can crunch and produce nice figures on the screen.  I would
still like to convert the values for x,y, semimajor, semiminor, and
center of the ellipse back to data coordinates such that I can place
them on the postscript file again but convert_coord( ... /to_data)
doesn't do the job.

Some code to make this more interesting:

contour_array = [s2c2(0,*),s2c2(1,*)]   ; this is the x,y positions of
the vertices of the polygon which defines the contour

blob_x = s2c2(0,*)
blob_y = s2c2(1,*)

set_plot,'x'

polyfill,blob_x,blob_y,color=100,/data

D = convert_coord(blob_x, blob_y, /to_device)

result = polyfillv(d(0,*), d(1,*),640,640)

Ellipse_out = fit_ellipse(result,semiaxes=semiaxes,center=center)

plots,Ellipse_out,/device

   set_plot,'ps
   device,filename='Surface_Plots.ps'
New_coords = convert_coord(Ellipse_out, /to_device)
       plots,s2c2(0,*),s2c2(1,*)
plots,New_coords,/device
   device,/close

Much thanks!
Bruno

p.s. I haven't banged my head on the IDLanROI more than being capable
of making the object:
blob_roi = OBJ_NEW('IDLanROI', blob_x,blob_y)
blob_mask = blob_roi->ComputeMask(initialize=0)
because I still don't see how to fit an ellipse and obtain its
parameters using the object functions.
 




 19 Posts in Topic:
Regarding the Fit_Ellipse Program
plim.dreaming@[EMAIL PROT  2008-02-26 06:28:22 
Re: Regarding the Fit_Ellipse Program
David Fanning <news@[E  2008-02-26 07:46:15 
Re: Regarding the Fit_Ellipse Program
plim.dreaming@[EMAIL PROT  2008-02-26 08:57:08 
Re: Regarding the Fit_Ellipse Program
David Fanning <news@[E  2008-02-26 13:44:00 
Re: Regarding the Fit_Ellipse Program
plim.dreaming@[EMAIL PROT  2008-02-26 13:38:29 
Re: Regarding the Fit_Ellipse Program
pgrigis@[EMAIL PROTECTED]  2008-02-26 13:51:51 
Re: Regarding the Fit_Ellipse Program
pgrigis@[EMAIL PROTECTED]  2008-02-26 14:06:07 
Re: Regarding the Fit_Ellipse Program
David Fanning <news@[E  2008-02-26 16:16:48 
Re: Regarding the Fit_Ellipse Program
plim.dreaming@[EMAIL PROT  2008-02-26 14:19:04 
Re: Regarding the Fit_Ellipse Program
pgrigis@[EMAIL PROTECTED]  2008-02-26 14:28:49 
Re: Regarding the Fit_Ellipse Program
plim.dreaming@[EMAIL PROT  2008-02-27 15:47:29 
Re: Regarding the Fit_Ellipse Program
pgrigis@[EMAIL PROTECTED]  2008-02-27 15:56:13 
Re: Regarding the Fit_Ellipse Program
David Fanning <news@[E  2008-02-27 17:00:20 
Re: Regarding the Fit_Ellipse Program
plim.dreaming@[EMAIL PROT  2008-02-28 05:46:39 
Re: Regarding the Fit_Ellipse Program
pgrigis@[EMAIL PROTECTED]  2008-02-28 07:44:13 
Re: Regarding the Fit_Ellipse Program
plim.dreaming@[EMAIL PROT  2008-02-28 08:30:04 
Re: Regarding the Fit_Ellipse Program
David Fanning <news@[E  2008-02-28 10:27:00 
Re: Regarding the Fit_Ellipse Program
pgrigis@[EMAIL PROTECTED]  2008-02-28 08:53:34 
Re: Regarding the Fit_Ellipse Program
pgrigis@[EMAIL PROTECTED]  2008-02-28 09:10:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 0:10:14 CST 2008.