Finding Shapes in image

Finding Shapes in image
Hi,
I have to determine the location and size of a black rectangle (stroke 1-2 millimeter, black) in a tiff-image.
My current approach is:
1) Start detection in defined loacation (to limit detect-area)
2) Start detection in samples (e.g. 5 per centimeter)
3) evaluate iterative the rgb of pixel and calculate the percental part of color to detect
Does anybody know some Objects providing a convinient way to realize this demand.
imagined code - just a draft:
private void detect(BufferedImage someImage, Rectangle cutRectangle, float expectedPercentage, int detectedRGB){
     //..doing some calcuation to find cut-in points - values defined by Configuration
     Point [] cutinPointsX = getCutInPoints("x");
     Point [] cutinPointsY = getCutInPoints("y");
     float percentageOfRGB;
     // find x
     for(int i = 0, i < cutinPointsX.length; i++){
          percentageOfRGB = getRgbFromRectangle(cutinPointsX, cutRectangle, someImage, detectedRGB);
          if(percentageOfRGB == expectedPercentage){
               // calculate x of DetectedRectangle
     // find y
     for(int i = 0, i < cutinPointsY.length; i++){
          percentageOfRGB = getRgbFromRectangle(cutinPointsY, cutRectangle, someImage, detectedRGB);
          if(percentageOfRGB == expectedPercentage){
               // calculate y of DetectedRectangle
private float getRgbFromRectangle(Point startPoint, Rectangle cutRectangle, BufferedImage someImage, int detectedRGB){
     float rgbPercentage;
     int startx = startPoint.getX();
     int startY = startPoint.getY();
     int xLength = startx + cutRectangle.getWidth();
     int yLength = startY + cutRectangle.getHeigth();
     int rgb;
     for(int x = startX; x < xLength; x++){
          for(int y = 0; y  < yLength; y++){
               currentRGB = someImage.getRGB(x,y);
               if(currentRGB = detectedRGB){
                    rgb++;
     // some calculations
     return rgbPercentage = calculateRGBPercentage(rgb, (xLength * yLength));
...

Hi,
do u mean recognize a shape in a 2d bitmap?
If so I think is has little to do with j3d but it is more like image segmntation problem and data clustering.
I worked on kvm and cvm algos when i was at the university, if this is your problem le me know...
I think u could start looking for object recognizing algos for mobile robots, but I'm afraid it is an hard job.
If the shape must exactly match the prototype (like a square or a star) u could use a fuzzy matching among translation and rotation params, but this hardly cover overlapping images case.
Anyway.. good luck
Mario

Similar Messages

  • When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.

    When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.
    Initially I could find no cause. Then I tried right click - Edit and on the affected images, always get this warning:
    "Image Cannot Be Edited - This photo was previously edited with another application or with an early version of Iphoto. Duplicate this photo to edit it." and a "Duplicate To Edit" Button is displayed. 
    The external Editor defined for iPhoto is Adobe Photoshop Elements.
    Now, I reckon the MUST be others out there affected by this same apparent Preview bug, yet my searches have not revealed any answers.  Also seems impossible to find a contact number for adobe???
    Thanks

    Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift ''(Mac Options)'' >''' key, and then starting Firefox. Is the problem still there?

  • How can i find/add/edit images.gif to an application ?

    Hi,
    I would like to know How to find/add/edit images.gif in an application ?
    Thanks in advance
    Yoel

    Yoel,
    Go to shared components. Search for images (left under)
    Leo

  • Windows 8.1, BootCamp does not find the ISO image.

    When I try to install Windows 8.1, BootCamp does not find the ISO image.
    I purchased Windows 8.1 Pro, I downloaded the .exe requested file from a Windows computer, performed the steps recommended by Microsoft in order to create the ISO file saving it on a flash drive as well and, as a precaution, on a DVD too.
    I performed the "Download the latest Windows Support Software from Apple" step directly into another flash drive and having it completed BootCamp displays the following message:
    "The installer disc could not be found  –  Insert the Windows installer disc and wait a few seconds for the disc to be recognized. "
    So happens that I have tried this using the DVD, pendrive and also copying the ISO file to the desktop and to the "Documents" folder as recommended in certain websites, but none of this has made the process go ahead. What can I do?
    My equipment is a mid 2011 iMac running Mac OSX 10.10.1.

    Dear Loner T,
    thanks to my coworker, the solution was unpacking from that ISO file which I had recorded (according to the steps indicated by Microsoft), but now using Nero software (Windows) and then recording by the most common way in a new DVD. See the screen of the first DVD before unpacking:
    This true saga only demonstrated that the generated ISO file as an option at the time of the Windows installation, is not for direct installation through BootCamp, and as a I could check, even for direct installation on a Windows PC. See the last DVD burned using Nero and  again recorded:
    The execution of BootCamp, was perfect
    Thank you for attention to my problem!

  • How to find out the image size?

    How to find out the image size values(Width and height) in illustrator CS3 using any script. I tried but i got only the document height and width. I need to find out the image BoundingBox value of width and height. Kindly advice me.

    Try this.
    tell application "Adobe Illustrator"
    set heightImage to get height of raster item 1 of current layer of current document
    set widthImage to get width of raster item 1 of current layer of current document
    display dialog (heightImage & " X " & widthImage) as string
    end tell
    JaiMS

  • How to find out the image resolution in illustrator?

    How to find out the image resolution in illustrator cs through javascript or vbscript?
    Thanks,
    Prabudass

    Anyone please help me, how to find out the embedded image resolution in illustrator file through script.
    Thanks,
    Prabudass

  • Why are some jpg images scrambled when they appear in my screen saver?   The same images look fine in Preview and Finder.  Some images appear scrambled in the screen saver 'preview' window and the actual screen saver. Other jpg images look fine.

    Why are some jpg images scrambled when they appear in my screen saver?   The same images look fine in Preview and Finder.  Some images appear scrambled in the screen saver 'preview' window and the actual screen saver. Other jpg images look fine.

    The desktop image is fine, taken from the exact same pool of jpg photos.  However, as soon as the slide show screen saver comes on, the images are scrambled.  What is it about the apple screen saver algorithm that scrambles the pics?

  • I have my camera (Canon 5D MARK 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put ab

    I have my camera (Canon 5D Mark 2) set to take both JPEG Large and Raw files with each shot. I uploaded the images from the card to my Pro (Aperture 3) and while the import info said 1500 images were uploaded, I can't find the RAW images.  Aperture put about 700 images in an untitled project folder, but all the images are the JPEGs.  What am I missing?
    Thanks,
    upsjdris

    Have you checked your "Import" settings for "Raw&Jpeg" pairs in the "Import" panel?
    You can set Aperture to import raw, jpeg, or raw&jpeg.
    If you imported Raw&Jpeg, but have set Aperture to use the Jpeg as original, you will see the imported image as Jpeg image, not as a raw image, even if the raw has also been imported. You can switch between Raw and Jpeg originals for selected images from the Photos menu:
    Photos > Use Raw as original.
    Regards
    Léonie

  • ImageIcon : How can I find out if image is loaded correctly?

    How can I find out if image is loaded coretly? (see example)
    private Image img;
    img = new ImageIcon("C:\image.jpg").getImage();
    If path is wrong, there is no exception or null in img.
    Thanks....
    Message was edited by:
    ptibull77

    also from the ImageIcon docs (note the ERRORED and ABORTED):
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/ImageIcon.html#loadImage(java.awt.Image)
    getImageLoadStatus
    public int getImageLoadStatus()Returns the status of the image loading operation.
    Returns:
    the loading status as defined by java.awt.MediaTracker
    See Also:
    MediaTracker.ABORTED, MediaTracker.ERRORED, MediaTracker.COMPLETE

  • Xcode cannot find the software image to install this version

    Hello,
    I have a iPhone 5 with 6.1.3 version. So, I get the message "xcode cannot find the software image to install this version" when I have connected to Organizer.
    Why? Xcode version is the lastest 4.6.2 Abril 2013.
    How to update the xcode in order to have an updated image for my iPhone 5?
    Thank you
    Jordi Saboya

    Here is some more info on the error.
    Builds fine and runs on iPhone simulator.
    OS 10.5.4
    XCode 3.1
    iPhone 2.0
    Is iPhone 3G supported?
    Error message XCode when building to device.
    "Your mobile device has encountered an unexpected error (0xE8000001)
    during the install phase: Verifying application
    Try disconnecting and powering off the device; then power the device on and reconnect it."
    I did try that and it did not work.
    Thanks again.

  • How do I find/delete damaged image?

    I have been able to get Aperture to open successfully by holding the shift key down when first opening the application, deferring preview generation. According to the basic troubleshooting tips this indicates that I have a damaged image that is causing the problem opening Aperture. How do i find the offending image?
    Thanks,
    George

    Hello George,
    your damaged image probably is from your most recent import. I'd suggest to try to open the master image files from your recent import in another program e,g, Preview.
    If your library is managed . the masters included in he library package, you will find them by ctrl-clicking the  the Aperture library package in the Finder and selecting "Show package Contents".
    Then open the "Masters" folder. This folder is organized chronologically by the import date. So your corrupted image most probably will be in the folder with the most recent date.
    Browse this folder and try to open the images in Preview (or your camera's raw converter, if you are shooting raw).
    If you cannot spot the culprit this way,  then you will have to try to find the corrupted image by creating previews for subsets of your images in Aperture.
    Turn on the Activity Viewer (Window -> Show Activity) to see which images Aperture is processing.
    Select some of your recent import, ctrl-click the images and select "Update Preview".
    If Aperture crashes again, you will know the corrupt image is one of the currently selected.
    Restart, and try the same for half of the selection, until you know which image it is.
    Regards
    Léonie
    It will be hard work to find the image ...

  • I accidentally ejected my book camp, where can i find the mountable images?

    i have accidentally ejected all the images from the disk utility including my bootcamp.. where can i find the mountable images?

    another way, go to XSplit official website and Users may download the latest XSplit Gamecaster from http://xsplit.com/download

  • Window can not find a system image on this computer

    I have HPPavilion dv6 3134se notebook.when I purchased.its operating system was windows 7 home basic.My friend suggest me to upgrade windows 7 ultimate.he also give dvd of windows 7.i have installed it.after3days a message appear from microsoft.that your copy is not original.ITry to get my previous windows 7 home basic.when i press F 11&amp;force to recovery amessage apear tahat window can not find a system image on this computer.I try to my level find it a message appear.thatspecify the location of the system image.How search system image on the network pleasehelp me with url address&amp;my hp recovery partion also now not loki ngcomputer.i hope some one help me.
    This question was solved.
    View Solution.

    Hi,
    You're welcome, glad it helped
    All the best,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Where can i find the Dock image ?

    I'm trying to find the dock image under the system folder but there's way to many folders?

    You may have blundered into Full Screen mode. "And since full-screen apps use every available pixel, they make working on smaller screens more practical than ever."
    http://www.apple.com/macosx/whats-new/full-screen.html

  • How do I find the aperture image files so that I can attach them to an email

    How do I find the aperture image files? I know that you can email images from aperture. But how would I attach an image using Mail?

    if you mean to go into the Aperture library in order to get image files to print with Canon's software it's not really possible. The best you would be able to do would be to get the master image and if you're shooting RAW that will be the RAW file. In any case no adjustments you made to the image in Aperture would be available, versions don't exist as files until you export them.
    If you want to print with the Canon software you would export the image from Aperture and then print that image file.
    If I've misunderstood your question post back,
    regards

Maybe you are looking for

  • How to extract multiple values from a procedure

    Hi, i have a plsql procedure that i have to invoque in a select statement. This procedure return several values (it has multiple OUTPUTS). How can i get this values and how they are returned. Thanks

  • JOB is created but SPOOL is not created - using SUBMIT stmt in WD

    Hi, I am submitting report from WD. PFB the code i used. This is cuccessfully creating the JOB in SM37 and the status is 'Finished'. But when I click for the SPOOL, it is giving me an error 'No list available'. I used the following code for submittin

  • Can I use both Lightroom for a Mac and PC to do the same project?

    My school uses Mac I use PC I would like to know if I start my project in light room for Mac if I can finish it in Lightroom for PC?

  • Two adsl connection on router

    Hi Guys, I have a router with two adsl connection, one of them is working fine. The another one I cannot see any packet going to the ISP. The interface atm is up, there is no reset, error, etc but the router doesn't try to connect to ISP, I see this

  • Installing WRT54G with both Vista and XP OS Access

    First, I'm a new member of this forum.  I'm am preparing to update to a new Linksys WRT54G router.  We have one computer (HP 8100N) which has Microsoft Vista Home Premium installed; but our other 3 computers all use Windows XP SP 2.   The Linksys WRT