Loading ...
Sorry, an error occurred while loading the content.

Re: [AutoTrace] thinning and "despeckle"

Expand Messages
  • Markus Meyer
    ... Unless Martin responds, I m afraid you have to dig through the source code to get insight into the inner workings of the algorithms. ... Remeber that for
    Message 1 of 3 , Oct 4, 2003
    • 0 Attachment
      Am Fre, den 03.10.2003 schrieb M.Shoaib Khan um 19:29:
      > Thanks a lot for your positive replies.
      > Plz tell me what thinning algorithm does autotrace use?
      > you mentioned of "despeckle" whcih means cleaning of image. Can u please
      > tell me what operations it performs in "despeckle". i mean what what taks
      > does it perform on image?

      Unless Martin responds, I'm afraid you have to dig through the source
      code to get insight into the inner workings of the algorithms.

      > The thing i want to do is bit different. I have a colored map. I know each
      > of my object has unique color. so i simply apply color filter to filter out
      > other colors and get color of my interest .

      Remeber that for this to work, you would need to have an exact color
      (the RGB values), not only the information that some object is "green".

      > In other words i get only one
      > type of objects in the image. Say i had raods and buildings in map, i
      > filters out buildings from map on basis of color and i am left with roads.
      > Now i dont need to perform edge detection here?? isnt it ? becoz i already
      > have a monochrome image now i.e foreground and background.

      To do the vectorisation you still have to trace the edges in some way.
      It's just simpler, because you don't have any thresholds for the
      gradient, because it is 100% clear what is an edge and what isn't. I do
      agree that for such a simple case the algorithm used could be highly
      optimized.

      > Now i can apply thinning to it and then apply some vecotrization algo to
      > represent it in vector form. I can either represent it in the form of
      > splines or i can use some geometric shapes like linear vectors or ploygons.
      > So in this way i vectorize one of my object in map. In similar manner i
      > vecotrize all other objects by first filtering other colors and performing
      > the same operation. If u think i am wrong in my appraoch in this, please
      > correct me!!

      This seems reasonable, though the normal approach in computer vision is
      to do first the object recognition and fitting, and do the segmentation
      (determining what's a building and what's a road) afterwards.

      > Soem questions i have is that how woudl i decide that now i have to perform
      > thinning and now i have to just checkthe boundary.For example i want to get
      > thinning on structures like roads but i wouldnt want to apply thinning on
      > landscapes.I would want that my program should represent these bulky closed
      > objects like lanscapes by vecotrizing its boundry so that original area of
      > that building or landscape is retained?? please help me in that!

      I'd apply no thinning at all in the first step. Afterwards, you can
      classify your object ("is it a road or a building?") based on color or
      shape. Then you can do the post-processing (e.g. convert the road
      "polygons" with the double edges into single polylines).

      > i know i have asked 5-6 questions in a single mail.. but i really need your
      > advice as i cant find any other good source.

      >From what I have read now about your problems it seems that AutoTrace
      would fit for your job. Even if AutoTrace doesn't exactly do what you
      want, you should ask yourself if f.e. post-processing the results of
      AutoTrace in some way would achieve what you're trying. There's no point
      in reinventing the wheel.

      Should you still decide to do this on your own, you should definitely
      read some book (I can recommend [1]). Note that books will describe the
      algorithms, but it isn't necessary do understand all the math, because
      there are already libraries (see [2]) out there that do the job well and
      are free.

      Hope that helps a bit


      Markus

      [1] Trucco, Verri. Introductory Techniques for 3-D Computer Vision.
      Prentice Hall (1998).

      [2] The Vision Something Libraries. http://vxl.sourceforge.net/


      > Thanks a lot!!!
      > Shoaib
      > ----- Original Message -----
      > From: <meyer@...>
      > To: <autotrace@yahoogroups.com>
      > Cc: <autotrace@yahoogroups.com>
      > Sent: Friday, October 03, 2003 4:42 AM
      > Subject: Re: [AutoTrace] Splines!!
      >
      > >
      > > Disclaimer: Developers, please correct me if I misunderstood something
      > > here!
      > >
      > > What you are describing is the "edge tracking" part of every edge
      > > detection algorithm. You normally need some preprocessing (like the
      > > "despeckle" process in AutoTrace, and edge thinning) first. It is
      > > correct that you first get a list of linear vectors out of the edge
      > > tracking process, but these are normally fit to splines afterwards. All
      > > of this can be quite CPU intensive too, but this is not necessarily a
      > > problem for AutoTrace. There are fields where this matters, like
      > > processing video in realtime, though.
      > >
      > > There have been many algorithms developed for edge detection. The
      > > simplest one is named "Sobel". A (in a certain mathematical sense)
      > > optimal edge detector is the "Canny" edge detector. These are described
      > > in any introductory book about image analysis.
      > >
      > > I think one pitfall which I stumbled upon when learning about AutoTrace
      > > is the fact that _after the despeckle process_, AutoTrace doesn't have
      > > anymore thresholds for the edge tracking process, so pixels which have
      > > only slightly different color (after the despeckle process) will
      > > nevertheless be split into two separate contours. IIRC this is necessary
      > > for the way AutoTrace works with closed contours, and the solution would
      > > be to improve on the despeckle process, not the edge detection.
      > >
      > > Another thing to note is that edge tracking and spline interpolation
      > > will often work on subpixel resolution, which the simple algorithm you
      > > described won't do in the current form.
      > >
      > > Markus
      > >
      >
      > **************************************************************
      > Scanned by MailScan Anti-Virus and Content Security Software.
      > Visit http://www.mwti.net for more info on eScan and MailScan.
      > **************************************************************
      >
      >
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
    • Martin Weber
      Sorry, but currently I am very stressed, so I can t answer now. Greetings Martin
      Message 2 of 3 , Oct 4, 2003
      • 0 Attachment
        Sorry, but currently I am very stressed, so I can't answer now.

        Greetings
        Martin

        Markus Meyer schrieb:

        > Am Fre, den 03.10.2003 schrieb M.Shoaib Khan um 19:29:
        > > Thanks a lot for your positive replies.
        > > Plz tell me what thinning algorithm does autotrace use?
        > > you mentioned of "despeckle" whcih means cleaning of image. Can u please
        > > tell me what operations it performs in "despeckle". i mean what what taks
        > > does it perform on image?
        >
        > Unless Martin responds, I'm afraid you have to dig through the source
        > code to get insight into the inner workings of the algorithms.
        >
        > > The thing i want to do is bit different. I have a colored map. I know each
        > > of my object has unique color. so i simply apply color filter to filter out
        > > other colors and get color of my interest .
        >
        > Remeber that for this to work, you would need to have an exact color
        > (the RGB values), not only the information that some object is "green".
        >
        > > In other words i get only one
        > > type of objects in the image. Say i had raods and buildings in map, i
        > > filters out buildings from map on basis of color and i am left with roads.
        > > Now i dont need to perform edge detection here?? isnt it ? becoz i already
        > > have a monochrome image now i.e foreground and background.
        >
        > To do the vectorisation you still have to trace the edges in some way.
        > It's just simpler, because you don't have any thresholds for the
        > gradient, because it is 100% clear what is an edge and what isn't. I do
        > agree that for such a simple case the algorithm used could be highly
        > optimized.
        >
        > > Now i can apply thinning to it and then apply some vecotrization algo to
        > > represent it in vector form. I can either represent it in the form of
        > > splines or i can use some geometric shapes like linear vectors or ploygons.
        > > So in this way i vectorize one of my object in map. In similar manner i
        > > vecotrize all other objects by first filtering other colors and performing
        > > the same operation. If u think i am wrong in my appraoch in this, please
        > > correct me!!
        >
        > This seems reasonable, though the normal approach in computer vision is
        > to do first the object recognition and fitting, and do the segmentation
        > (determining what's a building and what's a road) afterwards.
        >
        > > Soem questions i have is that how woudl i decide that now i have to perform
        > > thinning and now i have to just checkthe boundary.For example i want to get
        > > thinning on structures like roads but i wouldnt want to apply thinning on
        > > landscapes.I would want that my program should represent these bulky closed
        > > objects like lanscapes by vecotrizing its boundry so that original area of
        > > that building or landscape is retained?? please help me in that!
        >
        > I'd apply no thinning at all in the first step. Afterwards, you can
        > classify your object ("is it a road or a building?") based on color or
        > shape. Then you can do the post-processing (e.g. convert the road
        > "polygons" with the double edges into single polylines).
        >
        > > i know i have asked 5-6 questions in a single mail.. but i really need your
        > > advice as i cant find any other good source.
        >
        > >From what I have read now about your problems it seems that AutoTrace
        > would fit for your job. Even if AutoTrace doesn't exactly do what you
        > want, you should ask yourself if f.e. post-processing the results of
        > AutoTrace in some way would achieve what you're trying. There's no point
        > in reinventing the wheel.
        >
        > Should you still decide to do this on your own, you should definitely
        > read some book (I can recommend [1]). Note that books will describe the
        > algorithms, but it isn't necessary do understand all the math, because
        > there are already libraries (see [2]) out there that do the job well and
        > are free.
        >
        > Hope that helps a bit
        >
        > Markus
        >
        > [1] Trucco, Verri. Introductory Techniques for 3-D Computer Vision.
        > Prentice Hall (1998).
        >
        > [2] The Vision Something Libraries. http://vxl.sourceforge.net/
        >
        > > Thanks a lot!!!
        > > Shoaib
        > > ----- Original Message -----
        > > From: <meyer@...>
        > > To: <autotrace@yahoogroups.com>
        > > Cc: <autotrace@yahoogroups.com>
        > > Sent: Friday, October 03, 2003 4:42 AM
        > > Subject: Re: [AutoTrace] Splines!!
        > >
        > > >
        > > > Disclaimer: Developers, please correct me if I misunderstood something
        > > > here!
        > > >
        > > > What you are describing is the "edge tracking" part of every edge
        > > > detection algorithm. You normally need some preprocessing (like the
        > > > "despeckle" process in AutoTrace, and edge thinning) first. It is
        > > > correct that you first get a list of linear vectors out of the edge
        > > > tracking process, but these are normally fit to splines afterwards. All
        > > > of this can be quite CPU intensive too, but this is not necessarily a
        > > > problem for AutoTrace. There are fields where this matters, like
        > > > processing video in realtime, though.
        > > >
        > > > There have been many algorithms developed for edge detection. The
        > > > simplest one is named "Sobel". A (in a certain mathematical sense)
        > > > optimal edge detector is the "Canny" edge detector. These are described
        > > > in any introductory book about image analysis.
        > > >
        > > > I think one pitfall which I stumbled upon when learning about AutoTrace
        > > > is the fact that _after the despeckle process_, AutoTrace doesn't have
        > > > anymore thresholds for the edge tracking process, so pixels which have
        > > > only slightly different color (after the despeckle process) will
        > > > nevertheless be split into two separate contours. IIRC this is necessary
        > > > for the way AutoTrace works with closed contours, and the solution would
        > > > be to improve on the despeckle process, not the edge detection.
        > > >
        > > > Another thing to note is that edge tracking and spline interpolation
        > > > will often work on subpixel resolution, which the simple algorithm you
        > > > described won't do in the current form.
        > > >
        > > > Markus
        > > >
        > >
        > > **************************************************************
        > > Scanned by MailScan Anti-Virus and Content Security Software.
        > > Visit http://www.mwti.net for more info on eScan and MailScan.
        > > **************************************************************
        > >
        > >
        > >
        > >
        > >
        > >
        > >
        > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        > >
        > >
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      Your message has been successfully submitted and would be delivered to recipients shortly.