Thread: Connected Components not quite working

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    270

    Connected Components not quite working

    Ok see the attachments(note i have converted the images to gif as pgm is not allowed to be uploaded)

    I am trying to do Connected Components Labeling in an image (Gaus.gif) and output the result (smallOut.gif)

    It almost works except for one little part in the smallOut.gif. The first object from the left the top left of that object you will notice a dfferent color. Not sure why its doing that.
    The link here Send big files the easy way. Files too large for email attachments? No problem! has all the files used to run the program, just run make and ./process

    Could someone help please?

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    You are using an array to hold the data for the image, and processing on it is done from top left on down, right?

    Your first references are probably incorrectly outside your array, or your values at that point, are not what you want.

    Print out those first 20 values, and re-check your array bounds. If there's trouble with an array bound, it's nearly always right at the edges.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Not working Right
    By raven420smoke in forum C++ Programming
    Replies: 2
    Last Post: 09-16-2005, 03:21 AM
  2. Simple program not working
    By oobootsy1 in forum C# Programming
    Replies: 1
    Last Post: 08-10-2005, 02:20 AM
  3. Trying to eject D drive using code, but not working... :(
    By snowfrog in forum C++ Programming
    Replies: 3
    Last Post: 05-07-2005, 07:47 PM
  4. x on upper right corner not working
    By caduardo21 in forum Windows Programming
    Replies: 1
    Last Post: 02-20-2005, 08:35 PM
  5. cygwin -> unix , my code not working properly ;(
    By CyC|OpS in forum C Programming
    Replies: 4
    Last Post: 05-18-2002, 04:08 AM