Angle between two objects approximated as lines

Hi there,
I have NI Vision and have been wondering the best way to get the angle of two objects that has been approximated by a line (say using edge detection). I have attached one frame of the avi file for your perusal. The scene is changing from frame to frame where the objects are constantly being shifted and rotated. I can track either the small object or the big object in isolation using pattern matching algorithms but the issue lies in moving the edge detection rake from frame to frame for two objects in a single trial. Please advise.
Cheers, B.
Attachments:
example.jpg ‏20 KB

Hi,
You can do this in several ways. The straight forward way would be to use the trigonometric funtions. If you filter the image you are acquiring to get the co-ordinates of the edges of the stick and also the refence to ground, as shown in the image attached, you can use the known values to calculate the angle the stick is aligned to ground.
Here, treat the picture as a 2D image, get the x,y co-ordinates of the point of interception (C) and the co-ordinates of a point in your stick (A). The difference in value of y between A and ground is your "p" and the difference in value of x between C and x value of the point (A) is your "b". Use the supplied equation to work out the angle as shown in image.
This should get you started and hope it helps.
Regards,
CLA | LabVIEW 7.1... 2013
www.renishaw.com
Attachments:
triangle1.JPG ‏12 KB

Similar Messages

  • Additional data on relationship between two objects

    Hi
    We have a requirement to capture additional data on a relationship between two objects.  The data to be captured are custom fields that are unique to the relationship between the objects and not specific to either of the objects.
    We created a new object type and related it to the position (S)and the job (C) object.  In the customising (Personnel Management/Personnel Development/Basic Settings/Maintain Relationships there is an option to set up Additional Data.  There are however several restrictions (e.g. the substructure has to be in T77AD).  When you set up an existing substructure (e.g. PAD22) and screen (e.g. 3000), it works really well, however we have not been able to get this to read our own substructure and screen (since there is no customer include on HRP1001 and the 'Additional data' button seems to go to MP100100 to find the screen).
    My question is two fold:
    a) Is this an allowed customisation (e.g. can we create our own substructure, screen and Query string)? And if so, how does the data get into T77AD (since SAP recommends that data should not be added to this table)? and
    b) Is there any documentation on this (thus far I have only received info on how to enhance infotypes which I don't think is relevant???)?
    If this can not be maintained is there any other suggestions on how to deal with this scenario?
    Any assistance will be appreciated.
    Regards
    Liezl

    Hi everyone
    Thanks for everyone who tried to assist us with this.  I am happy to report that our in-house guru's have found the answer.  So, for anyone who is interested:
    In programme MP100100 you have a screen 6000 which is a customer enhancements screen.  We set up two in-house function modules for the PBO and PAI with its own screen and added an append structure to PAD31 to add the fields required.  In the configuration, we then specified PAD31 as the substructure with screen 6000 and then also specified our own PBO and PAI function modules.  The parameters required for screen 6000 is set up within our own customer screens.
    Hope this will be helpful to someone - it certainly seemed to open up some doors for us!
    Regards
    Liezl

  • Angle between two points

    hi,
    if I have two points
    Point2D.Double p;
    Point2D.Double q;
    how do you find the angle between them (measured from a vertical bar)?
    thanks,
    asjf

    Point2D.Double  p = new Point2D.Double(4.0,3.0),
                 q=new Point2D.Double(-3.0,4.0);
    double angle = Math.atan(p.y,p.x)-Math.atan(q.y,q.x);
    System.out.println("angle(radians)="+angle+", (degrees)="+ angle/Math.PI*180);Defend the hionour of atan2? Gaaah! you are making two[d] calls to a math library! My code only needs to make one, to acos().
    Firstly, of course, in the atan method the order of the operands is significant. In the dot product method, they are not. One gives "the angular distance from p to q", wheras the other gives "the angle between p and q".
    Secondly, atan2 behaves ... oddly sometimes, I can never get straight whether the results are 0 to PI, or -PI/2 to PI/2. So if the angle is 60 degrees, you might get 60, -60, 120, -120, 300, -300 etc depending subtly on what the two points p and q contain, and all in floating point. You get the situation where the result flicks between two wildly different values when you move one of the points by a pixel, and the nature of the flick can change depending on which quarant the points are in. Been there, done that. The dot product method, by contrast, goes smoothly from 0 to PI.
    Someone pass me a saucer of milk.

  • Screen painter space between two element in one line

    Hi Experts,
    i am developing a RF program with screens of size 16linesX20columns. limited space should be used . But when i create more than one element in one line , one space is always present between two elements,and the space can not be deleted or overlaped. because of this, elements can not get enought columns.
    i am sure that elements can be adjacent without space in the past time. i am not sure space appear after what changes was done by me...
    can you please give some suggestion if you also have the same issue.
    Yimeng

    Hi,
    Can you elaborate which screen elements are you using.
    You can place screen elements one after another in a single line without any spaces.
    Danish.
    Edited by: Danish2285 on Sep 21, 2011 12:38 PM

  • Event dispatch between two objects not received

    Hi,
    In my application there are two objects: one is
    myAc:ArrayCollection and the second is a mySprite:Sprite. myAC
    stores coordinates and other custom fields of the mySprite objects.
    I would like the sprite object to dispatch an event to the
    array so that when changes are made to the mySprite object the myAC
    can update itself.
    In the mySprite object I have added the following code to
    dispatch the event.
    var e:Event = new Event("spriteMove", true);
    dispatchEvent(e);
    trace("dispatched");
    In the myAC object I have set the following listener
    this.addEventListener("spriteMove", spriteMoveHandler, true);
    private function spriteMoveHandler( event:Event ):void
    trace("recd event");
    var sp:Object = event.target;
    trace(sp.x);
    I do not receive the event in the myAC object.
    However, when I set a similar thing between the mySprite
    object and one of its subobjects viz. myPoint I am able to receive
    the event.
    Thanks for the help,
    Raju

    Please do not duplicate your posts. It can be very confusing when two different persons answer the post in different ways.

  • Distance between two objects

    Hi folks,
    Who knows how I can discover the distance between two selected objects without using neither guides nor grids?
    Thanks.

    How do imagine this would working without using guides or grids? The way I normally do it is:
    1. Drag out a guide to point A
    2. Drag out a guide to point B
    3. Hold shift and put the mouse cursoe between the two -- it shows you the distance
    You could also use the measuring tool (click and hold the rectangle tool in the tool pallette.)
    Or even just draw a rectangle and look at the width in the property panel. That's a fast and easy method I use sometimes.
    Aaron Beall
    http://fireworks.abeall.com

  • ___How do I calculate scale between two objects (without ArtDirector Toolkit)?

    Normally I'd use ArtDirector Toolkit, but I can't install it or oter software right now (too long to explain why).
    Anyway I have several elements to scale, and I'm trying to find a formula/calculation to determine scale.
    Example - 1 object is 3.7486" and I want to make it 5.3231" - how do I calculate the scale percentage to enlarge it?
    I know you smart forum folk can help!
    Thanks!

    142.00234754308275 %
    Hugh Betcha wrote: Normally I'd use ArtDirector Toolkit, but I can't install it or oter software right now (too long to explain why).
    Alternatively, you could Google "scale percentage between two numbers" - yields plenty of free info/calculators

  • More space between two objects (using twitter bootstrap 3)

    I have two specific objects on my website and they are to close together. I would like to know if there is a way to push the a bit farther apart from eachother. They are in the same row. I was told to increase container width but i am not sure how to do this. The two objects are the image slider and the picture. Also, how would i push that row down. It's to close to the navbar.
    My code:
    <div class="container">
            <div class="row">
                    <div class="col-xs-9">
                            <ul class="bxslider">
                                    <li><img src="img/Day1.jpg" width="980" height="280"/></li>
      <li><img src="img/Day1.jpg" width="980" height="280"/></li>
      <li><img src="img/Day1.jpg" width="980" height="280"/></li>
      <li><img src="img/Day1.jpg" width="980" height="280"/></li>
                            </ul>
                    </div>
                    <div class="col-xs-3">
                            <div class="imagess"> <img src="http://rootforsite.azurewebsites.net/img/pic.jpg" class="img-responsive center-block"  /> </div>
                    </div>
            </div>
      <iframe width="640" height="360" src="http://www.youtube.com/embed/mb6SNytt5YI" frameborder="0" allowfullscreen></iframe>
    </div>
    My Website : http://rootforsite.azurewebsites.net/
    -Thanks

    Please do not duplicate your posts. It can be very confusing when two different persons answer the post in different ways.

  • How to get the distance between two object!!!

    I have two GEOM object and want to know the distance between them, may u give me some solution to find the distance between them.

    Hi!,
    SDO_GEOM.SDO_DISTANCE
    see: http://www.oracle.com/technology/documentation/spatial.html
    regards, Andreas

  • Drag and drop between two object oriented grid ALV

    Hello,
    I am using two alv to display two different reports in the same screen. I need to drag and drop a field from one ALV to another in order to do some processing.
    Thanks in advance for your help

    just define the cl_dragdrop objects as attributes for both grid controls, a container for the data to be dragged and the handlers for ongetflavor and ondrag event. set the flavor_select, drag, drop, drop_complete handlers.
    Regards,
    Clemens

  • Swap colors between two objects

    Hello , How do I swap colors between these two in Photoshop Elements 12
    Thank you very Much
    [email protected]

    wasserluft wrote:
    Hello , How do I swap colors between these two in Photoshop Elements 12
    Thank you very Much
    [email protected]
    Open picture file
    Duplicated background layer
    With eyedropper tool, sample the color of the dark gear. This will be the foreground color
    Shut off visibility of the background layer by clicking on its eye icon
    Working on the background copy layer, use the magic wand tool to delete the white background. Tolerance 32, with "contiguous" checked worked well for me. You should see the 2 gears surrounded by transparency.
    Duplicate the layer from step #5
    On this layer, use the eraser tool to get rid of the small gear. You will be left with the large gear. Press CTRL+left click the layer thumbnail of this layer (not the name). You should see "marching ants" surrounding the large gear. Go to Edit>fill selection>use foreground color
    Go back to the background layer, and with the eyedropper tool sample the original color of the large gear
    Repeat this process on the middle layer to fill the small gear with the foreground color.

  • Maintain distance between two objects

    hi evryone,
    i am trying to develop a simple car game, and to do that i have to maintain the distance between the two wheels.
    for the collision detection i have used coreyoneil class, which i think is excellent. i cant get the distances to go smoothly. and basically i am finding it hard to get the physics to work. if anyone has an idea what i should do, or has a good example it would be greatly appreaciated.
    i have attached the swf and fla for you to see.
    thanks.

    Basically you can put them together in a sprite, or you might even thing of using box2d or quickbox2d.
    if that doesn't work with your setup then you might have  a look in here:
    http://www.gotoandplay.it/_articles/2004/12/inverseKinematics.php

  • Find angle between two kinect sensors

    hi,
    Consider a person is standing in front of kinect sensor A and to the side of the person another kinect sensor B is placed (i.e exactly 90 degree).How to find programmatically that the sensor B is located 90 degree to sensor A?
    Any help is greatly appreciated
    Thanks

    Use LIBICP to get a correspondence between the point clouds from the depth maps, or from body positions.
    Iterative Closest Point

  • How can I insert a vertical line  between two underlined unfilled with text lines.  I am trying to construct an invoice and I need a break.  If I try any of the shapes or inset functions it eliminates my underlined lines and shifts the whole document.

    I am trying to construct an invoice.  How can I install a vertical line between two or more underlined lines to create a break.  I have tried the insert, shapes and nothing works.  If I try any of the functions the whole document shifts to the right and I loose some of the lines.  Is there a work around, or is I work not able to do what I want?   
    Thanks
    Armand

    It sounds as though you may have "Object Causes Wrap" activated for the Line Shape. This will push other content away.
    See the Wrap Inspector.
    Jerry

  • Bearing between two points

    This may be an obvious question to more experienced users, but I can't seem to find anything on it in the documentation.
    Is there any way to find the bearing of a line segment, that is, the angle between due north and the line between two points? It seems so simple, and Spatial provides a function to find a point at a specified distance and heading from another, so it seems like existing functionality.
    Thanks in advance - J

    Upgrading to 11g is one option.
    The other option is to write this function in PL/SQL yourself if you don't need a very accurate solution.
    This web page here gives a simple algorithm to find the bearing for two points.
    http://www.movable-type.co.uk/scripts/latlong.html

Maybe you are looking for