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

Similar Messages

  • How to extract HTML page from the internet

    i am new to java, i wish to know how to extract Html page from the internet and also how to identify the differences between the images and text information?

    You can create a java.net.URL that points to the file you want to "extract" and read the HTML code (or what ever that file contains) from there using the inputstream given by URL.openStream().
    The difference between images and text... well, images are embedded in html using the img-tag. example: <IMG src="http://forum.java.sun.com/images/reply.gif" alt="Reply">. Attributes width, height, alt are sometimes left out and there may or may not be quotes around the values and everything is case insensitive... you'll be having hard time trying to parse the input so I'd suggest using existing parsers.
    What are you trying to do anyway? You can load a URL directly to a JTextEditorPane with the setPage(URL page) method...

  • Any hints of how to exclude these lines from the following BEx output?

    Hi,
    I have a BEx report which outputs the following shipment activities, showing Doc and Items numbers, Requested and Received dates, actual and PO quantities.
    DocNoItmNoReqDate-RcvdDate-PO_Qty-Act_Qty---TB%
    1101-----5--12/10/05-12/5/05020--
    80
    1101-----5--12/10/05#00--80
    1101-----5--12/10/05#200--
    80
    1101-----7--12/10/05-12/5/05030--
    50
    1101-----7--12/10/05-12/8/0505--
    50
    1101-----7--12/10/05#00--50
    1101-----7--12/10/05#350--
    50
    Somehow, I am getting some activity lines which I do not understand but do not want in the output. Those are the lines which show u201CPO_Qty = 0 AND Act_Qty = 0 at the same time.u201D i.e. the highlighted lines.
    Any hint on how to eliminate the highlighted lines from the output?
    I played with calculated key figures but could not reason it out.
    Thanks

    DocNoItmNoReqDate-RcvdDate-PO_Qty-Act_Qty---  Formula                        TB%                                                                               
    PO QTY + ACT QTY
    1101-----5--12/10/05-12/5/05020-----               20                        -
    80
    1101-----5--12/10/05#00--                 0                         -80
    1101-----5--12/10/05#200-----                  20                     -
    80
    1101-----7--12/10/05-12/5/05030-----                30                      -
    50
    1101-----7--12/10/05-12/8/0505--
                    5                         -
    50
    1101-----7--12/10/05#00-----                  0                         -50
    1101-----7--12/10/05#350-----                 35                        -
    50
    Create Conditions over the Formula. Since the sum would be always 0 only when both the KF's are zero I think you can create condition over this formula.
    Would this help?
    Regards
    VJ

  • How to remove characters/lines from the beginning of an InputStream

    Hi,
    I have a program which receives several InputStreams. From each of these streams I have to remove 2 lines from the beginning. After the lines are removed, all the streams are combined to one with SequenceInputStream and read in one chunk. Is there an easy/simple way of doing this?
    One option I thought would be to read the char by char until 2 end of line chars have been detected and then read the rest of the data to a buffer. And the create a ByteArrayInputStream out of this buffer. Problem with this approach is, that the amount of data can be large, so putting all the data in to memory might cause problems.
    Another option is to use BufferredInputStream and use the readline() method twice to get rid of the lines that are not needed. After this I would write the data to some output stream, which is then converted back to input stream. Propably would work, but sound too much of work for a simple thing like this. There has to be better way.
    To make it simple, what I need is a method that looks like the following, or something similar
    *  Removes n number of lines from the beginning of a InputStream.
    *  @param is InputStream where the lines are removed
    *  @param numberOfLines int value to indicate how many lines whould be removed
    *  @return InputStream where lines have been removed.
    public InputStream removeLines(InputStream is, numberOfLines);Thanks.

    Here's the code, feel free to use it. Comments are also welcome.
    public InputStream removeLinesFromTheBeginning(InputStream is, int numberOfLines) throws IOException
              char c = 'c';
              int i = 0;
              for(int n = 0 ; n < numberOfLines ; n++)
                   do
                        c = (char)is.read();
                        System.out.print(c);
                        if(c == (char)-1)     // end of stream reached before any newline characters were found.
                             return null;
                        i++;
                   while(c != '\n');
                   System.out.println();
                   System.out.println("Characters removed:" + i);
                   System.out.println("n: " + n);
                   i = 0;
              return is;
         }Edited by: dave_spaghetti on Jun 16, 2009 5:42 AM
    Fixed a bug.

  • How do I remove the lines from the picture after using rectangular grid tool.

    So I was making a pixel character for test purpose for my game, and after I finish I didn't know how remove the lines without messing up the picture. I use the erase to remove the excess lines. So I was wondering how do I remove the lines within the picture with out messing up the picture.
    I'm going be using the Illustrator and rectangular grid tool for my game pictures. This is in Illustrator CS6.

    If you use the pathfinders unite, you can be left with gaps between your filled objects. If thats the case, use your select menu to select all of one color, then add a stroke with that same color and increase the size of the stroke if necessary. Repeat for the next color until your done.

  • Mail Adaptor : How to extract particular Mail from the mail server?

    Hi @,
    I have a requirement where I need to extract all the new mails with a aprticular Subject line to the XI and then forward it to the receiveing system.My problem is that the actual payload is situated in the Mail attachment which I will use in my scenarion but the filtering has to happen based upon the mail subject.
    I am not able to deal as the filtering and usage of payload are diffrent,need help in this regard
    Regards

    Hi
    As far as i know Mail adapter wouldnt be able to do anything of this sort.It will read all mails which it has never read before.You should use the mail Server for this.
    Thanks

  • 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

  • I want to make specific lines from the x-axis dotted

    As you can see here, I want the line from the 750 Hz, 3000 Hz and 6000 Hz to be dotted, can anybody help me with that?

    This is not a feature Numbers supports.  You can turn off grid lines, then draw lines using the shapes menu in the tool bar:
    Graph without X-axis gridlines
    Graph without X-axis gridlines.  Adding a line using Shapes menu:
    Chart with some x-axis gridlines as dashed lines

  • 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."

  • Using WQL "one-liner" to extract a value from the registry

    Can I extract a value from the registry using a "one-liner" WQL command?  Something like the following:
    Under root\default:StdRegProv
                   SELECT <Data> FROM "HKLM:SOFTWARE\Toto\Version"
    Please note that I am aware of how this is done via script.  The problem is that I'm using a management system (SCOM), which only allows me to supply a simple WQL query to perform my evaluation.
    Thanks,
    Larry

    Hi Larry,
    There have a specific forum to support the scripting related question, i sugges you ask in Scripting forum there will have more
    professional engineer will help you.
    The Official Scripting Guys Forum!
    https://social.technet.microsoft.com/Forums/en-US/9d5a7990-b975-488a-b7c0-6d866f29cf0a/change-mouse-scheme?forum=ITCG
    Best Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to separate content area from the image area in cs6

    how to separate content area from the image area in cs6? looks just fine in design view but when opened up in explorer my text /content area is over the image area. the content is suppose to be below the image not over it. How do I move it down? Everything I have tried has not worked ;(

    Is your image in the CSS (background) or the HTML (foreground)? 
    Try copying and pasting this code into a new, blank document.  Change placehold.it images to your own.  Save and preview in browsers.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with CSS 2-Col Layout</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--[if IE]>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <![endif]-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <style>
    /**CSS Reset**/
        padding: 0;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    img {
        width: 100%;
        vertical-align: baseline;
    /**Layout**/
    body {
        padding: 0;
        width: 90%; /**adjust width in px or % as desired**/
        margin: 0 auto; /**this is centered**/
        background: #CFF;
        color: #505050;
        font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
        font-size: 100%;
        box-shadow: 2px 2px 4px #333;
    header {
        margin: 0;
        padding: 0 1%;
        width: 100%;
        background: #B00202;
        color: #FFF;
    /**top menu**/
    nav {
        background: #EAEAEA;
        font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 14px;
        font-weight: bold
    nav ul {
        margin: 0;
        padding: 0;
    nav li {
        list-style: none;
        display: inline-block;
        margin: 0 3% 0 5%;
    /**menu link styles**/
    nav li a {
        color: #666;
        text-decoration: none;
        line-height: 2.5em;
        padding: 6px;
        border: 1px solid #CCC;
    /**on select or mouseover**/
    nav li a:hover, nav li a:active, nav li a:focus {
        background: #CCC;
        color: #505050;
    #wrapper {
        background: #EAEAEA;
        overflow: hidden; /**float contaiment**/
    /**main content**/
    article {
        padding: 0 2%;
        background: #FFF;
        float: left;
        width: 70%;
    figure {
        width: 80%;
        margin: 4% auto 4% auto;
        text-align: center;
    /**right sidebar**/
    aside {
        padding: 0 2%;
        float: left;
        width: 30%;
    footer {
        clear: both;
        background: #B00202;
        color: #FFF;
        text-align: center;
        margin: 0;
    /**typography**/
    header h1, header h2 {
        display: inline;
        color: #F5DD83;
        padding: 0 1%;
    h3 {
        color: #2294AE;
        margin-bottom: 0
    p { margin: 0 0 1em 0 }
    figcaption {
        text-align: center;
        font-style: oblique;
        font-size: small;
        color: #2294AE;
    </style>
    </head>
    <body>
    <!--begin header-->
    <header> <h1>Sitename</h1>
    <h2>|  Responsive CSS Layout</h2>
    </header>
    <!--begin navigation-->
    <nav>
    <ul>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    <li><a href="#">Menu Item1</a></li>
    </ul>
    </nav>
    <div id="wrapper">
    <!--begin main content-->
    <img class="banner" src="http://placehold.it/1056x100/198EBA/FFFFFF&text=Banner.jpg" alt="banner" />
    <article> <h3>Article</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Mauris vitae libero lacus, vel hendrerit nisi!  Maecenas quis velit nisl, volutpat viverra felis. Vestibulum luctus mauris sed sem dapibus luctus.  Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus.  Aenean tristique enim ut ante dignissim. </p>
    <figure> <img src="http://placehold.it/500x325" alt="placeholder">
    <figcaption>Figure 2 Caption</figcaption>
    </figure>
    </article>
    <!--begin right sidebar-->
    <aside> <h3>Aside</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Mauris vitae libero lacus, vel hendrerit nisi!  Maecenas quis velit nisl, volutpat viverra felis. Vestibulum luctus mauris sed sem dapibus luctus. </p>
    <hr>
    <p>Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus.  Aenean tristique enim ut ante dignissim. </p>
    <hr>
    <p>Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius. Quisque varius scelerisque nunc eget rhoncus.  Aenean tristique enim ut ante dignissim. </p>
    </aside>
    <!--end wrapper--></div>
    <!--begin footer-->
    <footer> <small>© 2014 Your Site Name. All rights reserved</small> </footer>
    </body>
    </html>
    Nancy O.

  • How can i read all the lines from a text file in specific places and use the data ?

    string[] lines = File.ReadAllLines(@"c:\wmiclasses\wmiclasses1.txt");
    for (int i = 0; i < lines.Length; i++)
    if (lines[i].StartsWith("ComboBox"))
    And this is how the text file content look like:
    ComboBox Name cmbxOption
    Classes Win32_1394Controller
    Classes Win32_1394ControllerDevice
    ComboBox Name cmbxStorage
    Classes Win32_LogicalFileSecuritySetting
    Classes Win32_TapeDrive
    What i need to do is some things:
    1. Each time the line start with ComboBox then to get only the ComboBox name from the line for example cmbxOption.
       Since i have already this ComboBoxes in my form1 designer i need to identify where the cmbxOption start and end and when the next ComboBox start cmbxStorage.
    2. To get all the lines of the current ComboBox for example this lines belong to cmbxOption:
    Classes Win32_1394Controller
    Classes Win32_1394ControllerDevice
    3. To create from each line a Key and Value for example from the line:
    Classes Win32_1394Controller
    Then the key will be Win32_1394Controller and the value will be only 1394Controller
    Then the second line key Win32_1394ControllerDevice and value only 1394ControllerDevice
    4. To add to the correct belonging ComboBox only the value 1394Controller.
    5. To make that when i select in the ComboBox for example in cmbxOption the item 1394Controller it will act like i selected Win32_1394Controller.
    For example in this event:
    private void cmbxOption_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxOption.SelectedItem.ToString(), ref lstDisplayHardware, chkHardware.Checked);
    In need that the SelectedItem will be Win32_1394Controller but the user will see in the cmbxOption only 1394Controller without the Win32_
    This is the start of the method InsertInfo
    private void InsertInfo(string Key, ref ListView lst, bool DontInsertNull)
    That's why i need that the Key will be Win32_1394Controller but i want that the user will see in the ComboBox only 1394Controller without the Win32_

    Hello,
    Here is a running start on getting specific lines in the case lines starting with ComboBox. I took your data and placed it into a text file named TextFile1.txt in the bin\debug folder. Code below was done in
    a console app.
    using System;
    using System.IO;
    using System.Linq;
    namespace ConsoleApplication1
    internal class Program
    private static void Main(string[] args)
    var result =
    from T in File.ReadAllLines(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TextFile1.txt"))
    .Select((line, index) => new { Line = line, Index = index })
    .Where((s) => s.Line.StartsWith("ComboBox"))
    select T
    ).ToList();
    if (result.Count > 0)
    foreach (var item in result)
    Console.WriteLine("Line: {0} Data: {1}", item.Index, item.Line);
    Console.ReadLine();
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

  • My Iphone was sync with Itunes on a computer then this computer broke down and i purchased another one. I was able to extract all the data from the old one. now how can i sync my phone with the new tunes without loosing any data?

    My Iphone was sync with Itunes on a computer then this computer broke down and i purchased another one. I was able to extract all the data from the old one. now how can i sync my phone with the new tunes without loosing any data?

    Yes, windows to Mac too.
    iTunes: How to move [or copy] your music [library] to a new computer [or another drive] - http://support.apple.com/kb/HT4527
    Quick answer if you use iTunes' default preferences settings:  Copy the entire iTunes folder (and in doing so all its subfolders and files) intact to the other drive.  Open iTunes and immediately hold down the Option (alt) key (shift on Windows), then guide it to the new location of the library.
    Windows users see tip at: https://discussions.apple.com/message/18879381

  • I have a thin horizontal line running across my screen about 1/4 of the way from the bottom of the monitor. Why is it there and how do I get rid of it?

    There is a thin horizontal line running across the width of my screen about 1/4 of the way from the bottom. This line, along with an occasional vertical line about a 1/3 of the way from the right side of my monitor, started appearing about 7 days ago. Usually the line would disappear after a restart but now it seems intent on staying. Does anyone know what is going on and how can I resolve this?

    Contact Apple's Support, formerly Apple Express Lane.

  • How can I disappear the lines of the grid from the picture?

    Please help!
    This photo was made through a grid.
    http://www.flickr.com/photos/apexivision/4468964280/sizes/o/in/photostream/
    My question is: how can I disappear the lines of the grid from the picture with Photoshop CS2?  Thanks!!!

    Select the offending parts with a fuzzy-edged selection and adjust the curves to get some relief.
    Then Burn and Dodge can be your friends as well.
    Some things that can help:  Make a duplicate layer so you have the original to compare against (and to go back to as needed.  Work in 16 bits / channel and (ideally) at an upsampled resolution.  Add a Curves adjustment layer above with the curves pulled up so you can lighten up the shadows as needed and see that you're getting things right even in the dark shadows.
    You may need to do some selective noise reduction in the places you've enhanced, as the lightening and darkening will bring up the noise.
    -Noel

Maybe you are looking for

  • Iphone 3GS camera roll not showing up in iPhoto

    i see the tab that says iphone 3GS in iPhoto but the pictures are there but just white dot outlines??? any help

  • One of the pages I am working on is blocked and I cannot delete/change items displayed there

    One of the pages I am working on is blocked and I cannot delete/change items displayed there. I have unlocked all the layers but still cannot access the content on that page. Thoughts?

  • I can't get flash player 10.1 to work

    Hello I know others have posted this question and they have got the right steps and answers to follow but this just will not work for me! I have Mac OS X Version 10.4.11 I have downloaded the uninstaller to uninstall the old version i had which was 9

  • Computer won't reconise ipod shuffle

    I have a pc with windows xp pro. I already have i-tunes on my system. I am haveing problems with my new ipod shuffle software and hardware! The software only goes to the point where it ask for me to connect the shuffle for possible updates. Once done

  • Bridge CS5 downloading images

    I'm trying to download my pics from a card reader on a Mac via Bridge rather than Lightroom. It can see my images but when I try to select a destination folder it freezes leaving the only option to force quit. Any suggestions please.