Want to crop an image of car and extract number plate from it.

i have a problem in my project.I have to crop the edges of a car's image and i want to extract only it's number plate.The OCR i am using can not extract charcters which are skewed etc.Can i have a code through which i can crop an image and extract only specific part?

Is this a college project ?
Cos it sounds extremely tricky to attempt.
If I was attempting this I might
1. Assume a fixed camera position.
So that I'd know what the road looked like without any cars.
Take a photo of this road as a "control background".
2. Assume a standard number plate system.
In Ireland, they've a white background, black lettering.
No italic writing.
Then, when I detect a car ( say more than 5% of the "control background" is covered ), I might try searching for the black & white lettering.
This might involve scanning the image from left to right, top to bottom, and defining rectangular ranges of black & white pixels.
( I'd allow multiple regions, so there could be more than 1 plate in the photo.
It might even pick up sign-writing on vans and cars ! )
That's just my initial quick idea of how to attempt it.
Could be easier ways...
regards,
Owen

Similar Messages

  • How do I crop an image in photoshop and place it in an illustrator file without having a white backg

    How do I crop and image in photoshop and place it in an illustrator file without having a white background ?

    Could you post the image (or a lores version of it) on this Forum?

  • How do I read a web page and extract text information from it with LabVIEW?

    Hello,
    I want to read a webpage (not Labview), extract the text from the page and then sort out the text to get the information I want. It would be like reading a weather webpage and wanting to extract the current temperature from the webpage usign labview. Any suggestions?
    Thanks

    The discussion below touches on the subject, it looks like it will do what you want.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=137315&requireLogin=False

  • Download and extract jar file from applet

    Can any one provide me a solution for my below problem. Thanks in advance for all the suggestions.
    I want my applet to download a jar file, extract into users home directory by creating a folder and then set the created folder to java library path.
    My applet html file is in "root" directory. The applet is included into applet.jar and placed under "lib" directory which is under "root" directory.
    Now i also had another jar file(contains dlls what I packed) under the same lib folder.
    The below is the following directory structure in my server.
    root ---
         |
         |
         default.html
         lib--
         |
         |
         applet.jar - contains applet related classes
         native.jar - contains dlls which are to be loaded
    When a client downloads my applet, it should copy the native.jar and then extract into a new folder under user home directory. Then set this folder to java library path.
    Regards
    raman kumar

    I managed to do it this way, Just remember that you need to sign the jar files for your applet, else it won't work.
    package jar.extract;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.jar.JarFile;
    import java.util.zip.ZipEntry;
    public class JarExtractor {
         // Dll file in the jar
         private static String JAR_FILE = "dll.jar";
         public void extract() {
              try {
                   JarFile jf = new JarFile(JAR_FILE);
                   // Entry in the jar file rember package and dll file
                   ZipEntry ze = new ZipEntry("package/dll_file");      
                   int length = (int) ze.getSize();
                   byte fileContent[] = new byte[length];
                   InputStream fin = jf.getInputStream(ze);
                   fin.read(fileContent, 0, length);
                   // CODE missing.
                   // You need to write the input stream (fin) to a new files output stream
                   // it is like copying a file !!!
              } catch (IOException e) {
                   e.printStackTrace();
    }Tom

  • Compare and extract number from string

    Hi, all
    If I want to compare a requirement number and extract a number form a continuous data, . for example,
    the string like this ( ******** 123 ******
                                   *********456 ******
                                   *********789*******)
    and I have requiremnts that I need to extract the number is nearest greater 450, so in the above example, I need to pick 456.
    How can I result it?
    thanks

    Just extract all numbers into an array, then find the element with the smallest absolute difference. See attached (LabVIEW 7.0).
    EDIT: Sorry, If by "Nearest greater" you mean the next higher number, you can use something like in my example II. (Also LabVIEW 7.0).
    If you don't recognize an node, just right-click on it and select help.
    You still need to add proper execption handling, e.g.:
    What if no element is greater?
    What if there are multiple solutions?
    What if the string does not contain any numbers?
    Message Edited by altenbach on 10-13-2005 09:05 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FindClosest.vi ‏29 KB
    FindClosestII.vi ‏30 KB

  • Preorder and port number over from AT&T?

    My contract is up with AT&T. I want to pre-order an iPhone 6 and port my number to Verizon. Can I do this ordering through Apple,com? I'm not sure how this process works...

    Personally I would not port right now.
    Many people will be pr-ordering and quite frankly there is no phone in the world that I am going to jump through hoops to get.
    They will have them in the stores. If you are going to port out from AT&T I would say first wait until Apple has them in the stores (apple stores) and then go in and get one for the carrier of your choice.
    I would even go to a Verizon Corporate Store and do the port at the same time you buy the device. This would be the easy way. Are you looking at paying full price? Contract price? Edge Agreement? they are all to be considered.
    Good Luck

  • How to compress and extract files & databases from current BC site?

    Hello All -
    It's been a good run with BC, but we're under new management and are starting over with a different CMS.    I would like to extract all data from the current site (text from all pages, images, pdfs, etc from media library, information from customers).  I know how to export customer reports, but is there a way to compress and extract everything in a comprehensive way?
    Thanks so much - any help would be much appreciated! 
    Also... need to do this ASAP...

    Hi,
    Unfortunately it's not a comprehensive as you may be hoping.  You'll need to export everything using the existing tools mentioned in the article below.  It's similar concept of migration one site to another.  
    - http://kb.worldsecuresystems.com/203/bc_2038.html
    I'm afraid there's no automated feature for this at the moment.
    Kind regards,
    -Sidney

  • I just want to crop my photos! Preview and iPhoto not working since upgrading.

    I just upgraded to OS X Yosemite, and since doing so the edit function on Preview is non-selectable and iPhoto won't save any of my edits!? Please help this is an urgent requirement! I'm not interested in upgrading to the new Photos app - I've head terrible things about it.

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Upload image to directory and data to database from the same form

    Hello all
    I'm playing at building a shopping cart (never done one
    before) from a tutorial by Gordon Knapp at www.webthang.com.
    I have created the site and it works perfectly. Now I want to
    extend it.
    There is a form that allows the user to add data to the
    database. I would also like to be able to upload an image to a
    directory on the server and add the data to the database at the
    same time from the same form. It would be good if the input field
    "<input name="product_picture" type="text" id="product_picture"
    tabindex="6" size="50" />" could be populated automatically by
    the filename of the image being uploaded, but this isn't a
    neccessity.
    I have looked at various ASP Upload packages and I can upload
    an image alone but none of them make it clear how to upload the
    image and add data to the database at the same time.
    As this is a private project I need any suggestions to by
    free.
    The tutorial shows how to create the site in Ultra Dev but
    worked perfectly well in DW. The page concerned looks like this. It
    is named 'admin_add.asp':
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <!--#include file="../Connections/con_ecom.asp" -->
    <%
    Dim MM_editAction
    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" &
    Server.HTMLEncode(Request.QueryString)
    End If
    ' boolean to abort record edit
    Dim MM_abortEdit
    MM_abortEdit = false
    %>
    <%
    ' IIf implementation
    Function MM_IIf(condition, ifTrue, ifFalse)
    If condition = "" Then
    MM_IIf = ifFalse
    Else
    MM_IIf = ifTrue
    End If
    End Function
    %>
    <%
    If (CStr(Request("MM_insert")) = "add_form") Then
    If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_con_ecom_STRING
    MM_editCmd.CommandText = "INSERT INTO products
    (product_category, product_name, product_price, product_briefdesc,
    product_fulldesc, product_picture) VALUES (?, ?, ?, ?, ?, ?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 202, 1, 50,
    Request.Form("product_category")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param2", 202, 1, 50,
    Request.Form("product_name")) ' adVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param3", 5, 1, -1,
    MM_IIF(Request.Form("product_price"),
    Request.Form("product_price"), null)) ' adDouble
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param4", 203, 1, 536870910,
    Request.Form("product_briefdesc")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param5", 203, 1, 536870910,
    Request.Form("product_fulldesc")) ' adLongVarWChar
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param6", 202, 1, 50,
    Request.Form("product_picture")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "admin_control.asp"
    If (Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0)
    Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Administration - Add Product</title>
    <link href="../scripts/admin.css" rel="stylesheet"
    type="text/css" />
    <script type="text/javascript"
    src="../scripts/ecom.js"></script>
    </head>
    <body onLoad="adminTitle()">
    <div id="wrapper">
    <div id="pageHeading">ADMINISTRATION - ADD
    PRODUCT</div>
    <div id="navBar"><a
    href="admin_control.asp">Control</a> | Add | <a
    href="admin_view.asp">View</a> | <a
    href="admin_update1.asp">Update</a> | <a
    href="admin_delete1.asp">Delete</a> | <a
    href="../Default.asp">Shop</a></div>
    <br />
    <form name="add_form" id="add_form" method="POST"
    action="<%=MM_editAction%>">
    <table border="1" align="center" id="tblArea">
    <tr>
    <td class="tdLabel">Product Category</td>
    <td colspan="2"><input name="product_category"
    type="text" id="product_category" tabindex="1" size="50"
    /></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Name</td>
    <td colspan="2"><input name="product_name"
    type="text" id="product_name" tabindex="2" size="50"
    /></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Price</td>
    <td class="tdContent" colspan="2"><input
    type="text" name="product_price" id="product_price" tabindex="3"
    size="50" /></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Short
    Desciption</td>
    <td class="tdContent" colspan="2"><textarea
    name="product_briefdesc" id="product_briefdesc" cols="47" rows="4"
    tabindex="4"></textarea></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Full
    Description</td>
    <td class="tdContent" colspan="2"><textarea
    name="product_fulldesc" id="product_fulldesc" cols="47" rows="5"
    tabindex="5"></textarea></td>
    </tr>
    <tr>
    <td class="tdLabel">Product Image File Name</td>
    <td class="tdContent" colspan="2"><input
    name="product_picture" type="text" id="product_picture"
    tabindex="6" size="50" /></td>
    </tr>
    <tr>
    <td class="tdLabel"> </td>
    <td align="center"><input type="reset" name="Reset"
    id="Reset" value="Reset Form" /></td>
    <td align="center"><input type="submit"
    name="Submit" id="Submit" value="Add To Shop" /></td>
    </tr>
    </table>
    <input type="hidden" name="MM_insert" value="add_form"
    />
    </form>
    </div>
    </body>
    </html>
    Hope you can help.
    Warm regards
    Martin

    Got it sorted.
    Found an excellent tutorial at Webthang.
    http://www.webthang.co.uk/tuts/tuts_dmx/rob15/rob15.asp

  • Hello i have a problem ! When i brand a cd with music i can play this afterwards on my apple but not anymore on my cd player and in my car  and before i went from snow leopard to lion it worked very well!?

    I have a problem when i brand a cd i can play it on my computer but not in my car or cd player and this used to xork when i had snow leopard but now with lion it does not work?!

    Could you explain what "branding" a CD is?
    Did you copy a CD?
    Is this a commercial CD?
    What Mac model do you have?

  • Blotchy image in Lightroom and Photoshop/difficulty waking from sleep

    I am suddenly having problems with my 15" 2.4ghz MacBook Pro. There are two problems actually, the first is that I am not looking at gradient colours when I open an image in Photoshop or view it in Lightroom. The image looks blotchy, almost as if I had set my monitor to 256 colours, when in fact my monitor setting is 1440 x 900 at MILLIONS of colours. I don't have this problem with every image, only those I'm viewing in Lightroom and Photoshop.
    The second problem is in waking my Mac from sleep, sometimes it just won't wake up and I have to do a forced shutdown and then re-start.
    Does anyone know a fix for either problem?

    *A few suggestions:*
    Change the energy saving options, to put the display to sleep and the computer to sleep at the same time.
    Enable (check mark) put the hard disk to sleep when possible.
    Lock the padlock.
    Optional: Repair permissions &/or restart.
    ==============
    Check your Energy Saver settings to make sure they are correct.
    http://docs.info.apple.com/article.html?artnum=303698 Mac OS X: Why your Mac might not sleep or stay in sleep mode
    See Knowledge Base Article http://docs.info.apple.com/article.html?artnum=301733 iMac G5: How to Reset the SMU (iMac G5, the iMac G5 (Ambient Light Sensor), and the iMac G5 (iSight)).
    Check to determine if your computer qualifies for The 20-inch iMac G5 Repair Extension Program for Power Supply Issues (Rev B)
    **WARNING: DUE TO SECURITY REASONS, PLEASE DO NOT POST YOUR COMPUTER'S SERIAL NUMBER ON THESE MESSAGE BOARDS.**

  • Image capture stalls and does no download from iphone

    macbook pro os/x yosemite and iPhone 5c ios 8.1
    Since upgradging to Yosemeite I cannot get image capture to work. 
    With an IOS 8.1 iPhone 5c it never shows any photos on the phone.  Starting iTunes seems to not change the behavior.
    With an older iPhone 5s running IOS 7x I managed to get some photos to show but then it stops.  Again, starting and stoping iTunesd does not change the behavior. 
    fwiw I also have Aperture on this mbp.   Anyone else having issues?  It clearly seems to be a Yosemite issue but I'm not at my iMac where I can test against the older os/x release.

    Hello sillyvalley,
    Sorry to hear that you are having issues with importing photos to your Mac. Now I am not sure what the communication problem is with Picasa, I can say that there are other alternatives to import your photos in, like using iPhoto or Image Capture. Take a look at the article below for more information. 
    Import photos and videos from your iPhone, iPad, or iPod touch to your Mac or Windows PC
    http://support.apple.com/en-us/HT201302
    Regards,
    -Norm G. 

  • I just purchased a mac air and am unable to get my entire music library and pictures moved from my iPhone.  I subscribed to match and it wants to delete everything on my iPhone and replace with nothing from the new computer  How do I get my music and pict

    I just purchased a mac air and cannot figure out how to get my pictures from my toshiba windows to the air into iphoto and I also cannot get my library of music and apps to get to the mac air as well.  Each time I try to synch it tells me it will repace my ipad and iphone with the blank library from the new air.  How do I get my music, apps and photos to the air.  I just subscribed to imatch and it charged me and only has 600 of my 2,000 songs!

    You must move your photos and music from your Toshiba to your MBA directly, not using the iPhone. The Migration Assistant app on your Mac will help.

  • Parsing and extraction of numbers from select lines in a string

    hey guys, i've been running into some issues with my code and i was wondering if you could help me out. currently what i've done is take an xml document returned from a server, put it into a string, and then select specific lines from that string, from which i will extract numbers. here's the string
    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
        <rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
            <census1:totalPopulation>
                <rdf:Description>
                    <dc:title>SEX BY AGE (P012001)</dc:title>
                    <census1:female>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
                            <census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
                            <census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
                            <census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
                            <census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:female>
                    <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
                    <census1:male>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
                            <census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
                            <census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
                            <census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
                            <census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:male>
                </rdf:Description>
            </census1:totalPopulation>
        </rdf:Description>
    </rdf:RDF>now my first attempt at pulling this off worked just fine, but only for the female demographics, since the tags for female and male are identical (only the numbers/data is different) and my parser would stop after reaching the first round of tags specified.
    here's part of my code for that section, located in the main (response is the xml string returned from server):
    while ((temp = in.readLine()) != null)
                 response += temp + "\n";
            temp = null;
            in.close ();
    int left = response.indexOf("<census1:under5Years rdf:datatype=\"http://www.w3.org/2001/XMLSchema#integer\">");
              int right = response.indexOf("</census1:under5Years>");
                   // pull out the text inside the parens
                   String parsed = response.substring(left+77, right);
                   double parseddub = Double.parseDouble(parsed);
                        //divide the group Under5Years into Under12Mo and 1to4Yr
                        double Group1Adub = parseddub*.25;//25% for Under12Mo
                        Group1Adub = Math.ceil(Group1Adub);
                        int Group1A =(int)Group1Adub;
                        double Group1Bdub = parseddub*.75;//75% for 1to4Yr
                        Group1Bdub = Math.ceil(Group1Bdub);
                        int Group1B =(int)Group1Bdub;
    //..need to basically duplicate this for 3 other age groups
    int Group1 = Group1A;
    System.out.println("Server response:\n" + "Female");
              System.out.println("Under 12 Months:    " + Group1);now basically, everything works great for the female data, but i would like to somehow loop this or selectively parse by line and then extract information from those selected lines. any thoughts? i would really appreciate some insight thanks.

    lol no offense taken. sorry for the confusion, please disregard my earlier statements... :)
    i actually was able to get the thing working, i just didn't quite understand what i was doing at first.
    however, i noticed that the regex only handles the first four lines of each group (male and female). i was wondering if there was a way to do it that's non-sequential?
    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:census1="tag:govshare.info,2005:rdf/census/details/100pct/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:census="http://www.rdfabout.com/rdf/schema/census/">
        <rdf:Description rdf:about="http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90041/censustables">
            <census1:totalPopulation>
                <rdf:Description>
                    <dc:title>SEX BY AGE (P012001)</dc:title>
                    <census1:female>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1131</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">327</census1:_62To64Years>
                           -<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">875</census1:_10To14Years>
                           -<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">864</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">592</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">307</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">689</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">600</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">450</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">331</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">932</census1:_25To29Years>
                           -<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">534</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1035</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">14540</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">970</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1038</census1:_45To49Years>
                           -<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">949</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">261</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">264</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">482</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">208</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1026</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">285</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">390</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:female>
                    <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">27864</rdf:value>
                    <census1:male>
                        <rdf:Description>
                            <census1:_40To44Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1077</census1:_40To44Years>
                            <census1:_62To64Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">270</census1:_62To64Years>
                           -<census1:_10To14Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">872</census1:_10To14Years>
                           -<census1:under5Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">862</census1:under5Years>
                            <census1:_18And19Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">511</census1:_18And19Years>
                            <census1:_67To69Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">258</census1:_67To69Years>
                            <census1:_55To59Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">647</census1:_55To59Years>
                            <census1:_22To24Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">569</census1:_22To24Years>
                            <census1:_75To79Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">252</census1:_75To79Years>
                            <census1:_80To84Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">183</census1:_80To84Years>
                            <census1:_25To29Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">969</census1:_25To29Years>
                           -<census1:_15To17Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">525</census1:_15To17Years>
                            <census1:_30To34Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1024</census1:_30To34Years>
                            <rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">13324</rdf:value>
                            <census1:_50To54Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">822</census1:_50To54Years>
                            <census1:_45To49Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">987</census1:_45To49Years>
                           -<census1:_5To9Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">974</census1:_5To9Years>
                            <census1:_60And61Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">215</census1:_60And61Years>
                            <census1:_21Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">287</census1:_21Years>
                            <census1:_70To74Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">320</census1:_70To74Years>
                            <census1:_65And66Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">155</census1:_65And66Years>
                            <census1:_35To39Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1140</census1:_35To39Years>
                            <census1:_20Years rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">257</census1:_20Years>
                            <census1:_85YearsAndOver rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">148</census1:_85YearsAndOver>
                        </rdf:Description>
                    </census1:male>
                </rdf:Description>
            </census1:totalPopulation>
        </rdf:Description>
    </rdf:RDF> using the regular expression, i can parse the string, but what i really need is to only parse the 8 lines designated, and they are not in sequential order, which makes it somewhat problematic.
    the format of the output i want to get should be as in the following example (female: under5, 5to9, 10to14, 15to17):
    [864, 949, 875, 534]
    same format for male of course. i'm just not sure how to edit the regex so that it can select only the lines i'm concerned with...? thanks so much i really appreciate this.

  • I had my computer replaced but copied my hard drive and now I can't access my firefox bookmarks, how can I go and extract the bookmarks from my copied harddrive?

    My HP Touchsmart was sent back in to HP for repairs under warranty. I was advised to make a copy of my harddrive because they may erase my hard drive, which they did, if the problem had to do with a faulty motherboard, which it was. They replaced my HD with a brand new one and now I DO NOT have any of my data installed in the new computer. Luckily I still have an exact replicate of my hard drive on a seperate external HD. However, when I looked in the bookmark.html under the firefox folder, the bookmarks were all blank and none of my bookmarks were there. I checked the properties tabe and it was dated sometime in March of 2011, earlier this year. I have a lot of stuff I wish to pull out from. The Firefox version I was using was the 3.6.16 and the file version was 1.9.2.4095, my OS was use Windows 7 Ultimate 64-bit. I would like to be able to access it again. Please help. Just a heads up but I'm taking a guess you guys already know, that the information under troubleshooting information is of my current computer and not the same as the one that is copied in my hard drive.

    Sorry, I don't find a support article for that type of situation. Read these two articles for help, as bookmarks.html isn't the file type you should be looking for.
    https://support.mozilla.com/en-US/kb/Lost+Bookmarks
    http://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile

Maybe you are looking for

  • Order Import Erroring while importing closed Order

    Hello, I am working on importing closed order for historical purpose and order import is erroring without giving much details. I set the debug level to 5 and log file contains only one error' ORDER IMPORT FAIL DUE TO UNEXPECTED ERROR. I am attaching

  • How to recreate mov's .THM file (for ZoomBrowser EX)

    It was always a problem to deal with THM files in ZoomBrowser EX. This oversimplified software won't cut movie files without the original THM files... 1. If only the mov file has been downloaded from the card, without the thm file, movie editing does

  • How to make a Text/image without a white background?

    I have an image that I would like to eliminate the white background to use in Dreamweaver CS4 I also found a funky text I would like to use without a white background as well and turn the text into an image. ANy help greatly appreciated. I trie dnume

  • TBLDTLS Log data stored .

    Hai Experts, We are migrated from the SAP BPC 5.1 into 7.5 MS SP 04 We taken the upload status from the TBLDTS Log from the *SQL Server 2008 * data base for our internal purpose.. All the data has been captured without PM and AM . We need data in the

  • Windows 8.1 opens wrong file

    In one folder that I know off, when I open a file with Photoshop it opens the wrong file. Also in Windows Explorer when I right click a file and preview it, it shows the wrong file. All these files are .jpg files. How can I resolve this problem? Than