How to extract straight line

Hi all 
I would like to ask any helpful tips regarding real time straight line detection. I'm using Vision acquisition and Vision assistant to help detect the edges. I'm using FindStraightEdge, am i doing the right thing to extract the line from the image/camera? And for information i'm very newbie with myRio and Labview so please help
Thanks before
The image attachment example from what i want to extract from camera.
Attachments:
Untitled 1.vi ‏143 KB
tes.jpg ‏11 KB
tes1.jpg ‏10 KB

Hello,
have you seen this post:
http://forums.ni.com/t5/Machine-Vision/real-time-s​traight-line-detection/td-p/3121811
Regards,
K
https://decibel.ni.com/content/blogs/kl3m3n
"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

Similar Messages

  • How to extract specific line from a string

    Hi guys.
    I?m starting to work with java...
    i have the following data inside a string variable:
    0 rows inserted.
    0 rows updated.
    0 rows ignored.
    98 rows marked as deleted.
    0 rows have no country.
    3345 rows have no geo.
    0 rows are invalid.
    what i want to do i to extract the number of rows marked as delete.
    I think that i figured out how to extract the number from this line :"98 rows marked as deleted."
    but how do i get to that line?
    I hope you can Help me. Thanks.

    the string is the result from a Function... this function gets the info from a store procedure...
                   rta = "Results for " + dh.getSource() + " source:\n" +
    dh.getInsertedCount() + " rows inserted.\n" +
    dh.getUpdatedCount() + " rows updated.\n" +
    dh.getIgnoredCount() + " rows ignored.\n" +
                   dh.getDeletedCount() + " rows marked as deleted.\n" +
                   dh.getNoCtryCnt() + " rows have no country.\n" +
                   dh.getNoGeoCnt() + " rows have no geo.\n" +
                   dh.getInvalidCnt() + " rows are invalid.\n";
    i can?t change this function...
    so i need to work with the returned value...
    i what thinking to use the following method to extract te number...
    private int GetNumericValue(string sVal)
    int iFirst, iCharVal, iEnd;
    int iMult = 1, iRet = 0;
    char[] aNumbers = "1234567890".ToCharArray();
    iFirst = sVal.IndexOfAny(aNumbers);
    iEnd = sVal.LastIndexOfAny(aNumbers);
    if (iEnd < 0)
    return 0;
    string subStr = sVal.Substring(iFirst, iEnd - iFirst + 1);
    iEnd = subStr.Length - 1;
    while (subStr.Length > 0)
    iCharVal = int.Parse(subStr[subStr.Length-1].ToString());
    iRet += iMult * iCharVal;
    iMult *= 10;
    if (iEnd <= 0)
    break;
    subStr = subStr.Substring(0, subStr.Length - 1);
    iEnd = subStr.LastIndexOfAny(aNumbers);
    subStr = sVal.Substring(iFirst, iEnd + 1);
    return iRet;
    but i still need the 4rd line to extract the number

  • How to extract the lines from the image

    Hi Everyone,
    I have an Image. In that, a circle object (plastic material) placed at centre with dark background. When the light is allowed to propagate through the plasic ring, It is getting disturbed by the cut made in that. When light allowed to pass through, we can see some lines (via camera) in the plastic ring. Now I need to count the number of lines in the plastic ring programatically using Vision. How to start this ??? I m new here, so please treat me like a baby...
    Find the sample Image below.
    I am using NI Vision assistant & Labview 8.2.1.
    Thanks in Advance
    Attachments:
    DSC_3017.JPG ‏165 KB

    I followed the same procedure in Labview 8.2 and it doesnt work (Returns an error: Invalid ROI). Then I started the same programming in 2013 and its working good. I really dont know why ?????!!!!!!!!
    Now the problem is different. After thresholding the image, it stays with some noise. I need to eliminate all and count the number of lines in the image. How to do that ???
    Here I dont see any function like Threshold Detector like what BruceAmmons said.''
    Refer the modified VI attached below.
    Attachments:
    IMAQ_lines_Modified.vi ‏51 KB

  • How to draw only straight line instead of angled one??

    Dear friends,
    I saw a very good code posted by guru here(I think is camickr),
    But I tried to change it and I hope to draw only straight line instead of angled one, can you help how to do it??
    Thanks so much.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 3;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[2] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[2] = endPoint.y;
                   if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }

    Change the AngledLine class to store two points instead of 3 points (I would rename the class to be StraightLine). The code is much simpler because you just store the starting and ending points and you don't need to calculate the middle point.

  • When I record an audio track, there is a waveform. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is there. How can I stop the waveform from disappearing?

    When I record an audio track using Logic Pro X, there is a visible waveform which appears as I record. When I stop recording, the waveform disappears and becomes a straight line. It also disappears from the track edit window. But the sound is still there. How can I stop the waveform from disappearing? And can I do something to view it after it has disappeared? Anyone know the anser?

    In Logic:
    Preferences/Audio Set Recording Delay to 0 <zero>
    This should always be set to zero unless a specific set of circumstances exist and you're audio drivers do not report position correctly.
    On occasion, usually when importing a Logic 9 project, Logic-X randomly changes this to a negative/positive number.  It's actually a bug in Logic, as it should always display the waveform.

  • How can i get Radio buttons  and parameters  in a Single Straight Line

    Hi Experts,
    How can i get Radio buttons  and parameters  in a Single Straight Line...
    Example:
       r1 r2 p1 p2.....
    Cheers,
    Priya
    Points granted.

    Write the following code for the selection screen:
    DECLARATION OF PARAMETERS.
    SELECTION-SCREEN: BEGIN OF BLOCK select WITH FRAME TITLE text-001,
                      BEGIN OF LINE.
                      SELECTION-SCREEN COMMENT 1(10) FOR FIELD p_detail.
                      PARAMETERS p_detail RADIOBUTTON GROUP r1 DEFAULT 'X'.
                      SELECTION-SCREEN COMMENT 25(10)  FOR FIELD p_summry.
                      PARAMETERS p_summry RADIOBUTTON GROUP r1.
    SELECTION-SCREEN: END OF LINE,
                      END OF BLOCK select.
    this will solve your poblem surly. reward the points if you find helpful
    Regards,
    Siddarth

  • How to make a macron in Pages '09? (a straight line over a letter)

    Does anyone know how to do a macron (you know a letter with a straight line indicating a long vowel) over a letter in Pages? I am using Hoeffler font, and I can't figure it out. I could really use some help.
    Thanks
    Maggi

    +Menu > Edit > Special Characters > Punctuation+
    Or for as you type:
    +Apple > Menu > Systems Preferences > International > Input Menu > U.S. Extended Keyboard or Maori+
    then close the panel.
    In Finder on the upper menubar, click on the +American flag icon > select "U.S. Extended" or "Maori"+
    Then to get the macron type first the "dead keys" +option with a" then the character you want the macron over.
    The macron may or may not actually be in Hoeffler, but OSX should find it from a font that does have it, which may give you an odd character in the middle of your text depending how closely they match.
    Some links for you:
    http://tlt.its.psu.edu/suggestions/international/accents/codemac.html#osx
    http://www.tomrobinson.co.nz/work/macronsosx.html
    http://www.personal.psu.edu/staff/e/j/ejp10/psu/gotunicode/macron.html

  • How do  put a straight line over an "o" such as in Roti Grille?

    How do I get a straight line over a letter "o" such as in Roti Grille?
    Thanks

    PeterBreis0807 wrote:
    Unless there is something else out there that I am unaware of, Roti grill is an Indian cooking method.
    Why the accent is needed I don't know, I was unaware it used one.
    One more time you read wrongly
    The OP wrote "*Roti Grille*" not "*Roti Grill*"
    In French rôti requires the accent and grillé requires its accent too !
    Yvan KOENIG (VALLAURIS, France) jeudi 28 janvier 2010 22:31:33

  • How to get rid of or at least easily fix random Position A to Positon B 'archs'?(want straight line)

    Hey,
    I hope i can describe my question correctly: is there a way to tell after effects that i want to default every position edit to be a straight path/arch (i'm actually looking for a lack of 'arch'--I just want a straight line) instead of defaulting to a seemingly random arch that i then find very tedious if not impossible to fix, even by manipulating vertice box 'arms' while holding alt? in other words, can i tell the program that, from now on, 'position A' and 'position B' must be traveled between in a straight line ONLY, never any erronious archs? i hope i described it well enough without being too familar with technical terms
    thanks

    Rick's pointing you in the right direction.
    Details are here:
    http://help.adobe.com/en_US/aftereffects/cs/using/WS3878526689cb91655866c1103906c6dea-7d99 a.html#WS3878526689cb91655866c1103906c6dea-7d98a

  • How do you draw freehand lines like in Paint,I can only draw straight lines

    Hi,
    Im tryin to develop a page where people can practice writing foreign characters using a mouse, I can currently only get straight lines from my code and was wondering what i would have to do for my lines to follow the movements of the user? As this would be more helpful!
    (is it some sort of FOR loop with a repaint() method occuring at a regular interval??)
    Yours Thankfully
    Raj

    was wondering what i would have to do for my lines to follow the movements of the userKeep track of the mouse x and y coordinates starting with mousePressed, continuing with every detected mouseMoved and terminating on mouseReleased. As a new set of coordinates is formed, redraw and repaint!
    ;o)
    V.V.

  • How to Stop Flickering Straight Line in CS4

    Hi all,
    For some reason CS4 cause all my straight lines to flicker. For example, if I have a video of a form with lots of straight lines on it, the rendered video of the form flickers like crazy?? I've tried to use the Anti-Flicker Filter but it made it worse?
    Please!

    More information is good
    Read Bill Hunt on a file type as WRAPPER http://forums.adobe.com/thread/440037?tstart=0
    What is a CODEC... a Primer http://forums.adobe.com/thread/546811?tstart=0
    What CODEC is INSIDE that file? http://forums.adobe.com/thread/440037?tstart=0
    For PC http://www.headbands.com/gspot/ or http://mediainfo.sourceforge.net/en
    For Mac http://mediainfo.massanti.com/

  • How to make a straight line of points in a curve in CS6

    In PSCS5 and earlier, I used to be able to make a straight line of points in a curve by placing 9 points on the straight line curve.  I did this by drawing a small straight line at the bottom of the curve using the pencil tool and then clicking the curve point icon.
    I can't seem to do this with CS6.  Any thoughts?
    Thanks,
    Matthew Kraus

    Did you not ask a similar question a while ago?
    http://forums.adobe.com/message/4524084#4524084

  • How can i draw a straight line with a brush?

    i know the pencil tool can draw a straight line with anchor points. is there a setting for the pencil tool that can mimic a 30 point brush, low hardness (faded side to side) at about an 80 degree angle or is there a way to make a straight line with the brush tool using a mouse?
    i know this image is a bit blurry. what i want to do is replace the 2 white angled lines with the 30 point brush effect 230 pixels wide. the project on the left of the pic is a 2ft by 4ft canvas. any ideas? please help.

    Hello Mike, I wonder if you can help, no one else can. I asked this question on the forum in August Brush line fades on start with anchor points
    Only on Photoshop CC does this happen, drawing a diagonal line with shift key, instead of line starting dark & then fading out, it does the reverse, starts on nothing & then darkens towards anchor point. I am on trial versions & can't purchase until this is cleared up.

  • Problem with creating a straight line with polygamo lasso

    I am having a problem with polygamo lasso. when i create a triangle or a rechtangle in straight line it is turn out the line become not straight. I don't what did i wrong, was always working fine till today. YOu can see the pic the top line lookslike a step.

    Ihope I did right, was not sure how to save as channel.

  • Ssrs 2008 r2 straight line within a matrix

    In an SSRS 2008 R2 new report have placed a matrix on the end of the report for information the user wants to see at the end of the report. The user wants to place a straight line between the different infomation sections in the tablix. Here are the problems
    I am having:
    1. In a row I would like to merge 2 cells together so that a line placed within the matrix is the same length. The problem is that I do not know how to merge the cells.
    2. When I drag a line into a cell in the matrix, the line is not straight. The line points to an angle. I have tried to change the properties of the line on the endpoint values but that has not worked. Thus can you tell me how to make the line placed within
    a matrix cell to be straight?

    Take a look at this post for inserting a horizontal (or vertical) line into a tablix cell:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/397d6dc4-766a-43c9-9706-5370a2bfaeb4/insert-line-into-table?forum=sqlreportingservices
    For merging cells, you simply select a set of contiguous cells, right-click, merge cells. There is a catch of course. The catch is that all of the cells you are trying to merge must be in the same scope. Below are some screenshots showing a simple Matrix
    with 1 column group and 1 row group.
    As you can see in this screenshot, I have selected 2 adjacent cells that are both in the same scope, and merge cells is available.
    In this screenshot, I have selected 2 adjacent cells that are not in the same scope. The left cell is only scoped by the row group while the cell on the right is scoped by both the row and the column group. As a result, I cannot merge the cells.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

Maybe you are looking for