Jump to content

infinitenothing

Members
  • Posts

    372
  • Joined

  • Last visited

  • Days Won

    16

Posts posted by infinitenothing

  1. That makes sense. Let me throw out an idea:

     

    So you're trying to find the coefficients in this formula: Z=a1x+a2y+C. You might be able to use this: http://zone.ni.com/reference/en-XX/help/371361H-01/gmath/general_ls_linear_fit/

     

    Where Y is an array of all the pixel intensities and H is {x1,y1,c}, ...

     

    You might want to use real world coordinates instead of pixel coordinates.

    post-15670-0-59330000-1433263440.png

  2. You might have to show us some pictures. It sounded like you had some edge detection which should give you points that make a circle on the edge of the cylinder. You can use a circle fit to get the radius which will give you an area. If you need, you can take an average inside the circle to get the height of the cylinder.

  3. Thanks everyone, for the insightful discussion. I agree that it's most sensible to perform cleanups even if an error occurred, and the Network Stream example sounds like a design flaw.

     

    Aside from cleanups though, I can't think of any other good cases which should run regardless of error -- do you guys do this in non-cleanup code?

     

    As for accessors, I agree that read VIs for a simple number shouldn't have error I/O terminals. I still put them in write VIs though -- I avoid modifying my object's state if an error occurred beforehand. Does anyone feel strongly against this?

     

    Any sort of inter-module communication will have certain messages that you want to get across regardless of the error.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.