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

Re: [AutoTrace] Autotrace speckle reduction

Expand Messages
  • Masatake YAMATO
    ... How do you think that you have write-access to our CVS repository at sourceforge.net? It seems that autotrace developers who have write-access are so
    Message 1 of 9 , Sep 3, 2001
    • 0 Attachment
      > Ok, I figured out that 8bit bitmaps in autotrace are greyscale and the
      > 24bit ones are used for all color images. Here's despeckle.c written to
      > autotrace's types. It provides the function:
      > ...

      How do you think that you have write-access to our CVS repository at
      sourceforge.net? It seems that autotrace developers who have
      write-access are so busy. Therefore none can review your code.


      Masatake YAMATO
    • Martin Weber
      Sorry, I wanted to test the code, but was too busy, perhaps I ll check it next weekend. Martin ... -- GMX - Die Kommunikationsplattform im Internet.
      Message 2 of 9 , Sep 3, 2001
      • 0 Attachment
        Sorry, I wanted to test the code, but was too busy, perhaps I'll check it
        next weekend.

        Martin

        > > Ok, I figured out that 8bit bitmaps in autotrace are greyscale and the
        > > 24bit ones are used for all color images. Here's despeckle.c written to
        > > autotrace's types. It provides the function:
        > > ...
        >
        > How do you think that you have write-access to our CVS repository at
        > sourceforge.net? It seems that autotrace developers who have
        > write-access are so busy. Therefore none can review your code.
        >
        >
        > Masatake YAMATO
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >

        --
        GMX - Die Kommunikationsplattform im Internet.
        http://www.gmx.net
      • Martin Weber
        It is a very good program. I will add it to AutoTrace, but first we could think about how to improve t a bit. 1. Certain parts of text will disappear. What can
        Message 3 of 9 , Sep 10, 2001
        • 0 Attachment
          It is a very good program. I will add it to AutoTrace, but first we
          could
          think about how to improve t a bit.
          1. Certain parts of text will disappear. What can we do here? (text.bmp)
          2. I found that adaptive_feature_coalescing = 0 messes the whole picture
          up.
          Only 1 and 2 were useful. 3-8 gave the same results for me than 2. Any
          pictures where this gives different results?
          3. Have we realy to do a color quantization or couldn't we despeckle a
          high
          color image directly.
          4. Speed up.
          An other thing that will be added to the next AutoTrace version would be
          an
          adoption to pstoedit 3.30.

          Martin

          "David A. Bartold" schrieb:

          > Ok, here's the test code. It needs glib but only for its typedefs and
          > g_new/g_free. To use: save a truecolor image as in.bmp in the same
          > directory as the executable. Run program, it will generate an 8 bit
          > quantized image saved as quantized.bmp and then save the despeckled image
          > as despeckled.bmp. The quantization is pretty cheesy-- the algorithm in
          > autotrace is probably much better. You may then try to trace the
          > despeckled image just to see what the final ouput looks like. There
          > are some constants in main (), two of which control the algorithm, the
          > other one controls the quantization. Those two constants are good
          > parameters to expose to the user.
          >
          > The algorithm works by recoloring small features with the most similar
          > color of all its neighboring pixels, effectively coalescing the feature
          > with one or more of its neighbors. Multiple passes are made to combine
          > singleton pixels into groups of two, then the groups of two to fours, then
          > fours to eights, etc. Turning on adaptive feature coalescing prevents
          > complementary colors from merging thus causing missing features in the
          > output image. The algorithm seems to produce results comparable
          > to traced photographs produced by other programs.
          >
          > - David
          >
          > On Sun, 12 Aug 2001, Martin Weber wrote:
          >
          > > Yes I am very interested and will test it.
          > >
          > > Thanks
          > > Martin
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          > ------------------------------------------------------------------------
          > Name: despeckle.tgz
          > despeckle.tgz Type: WinZip File (application/x-compressed)
          > Encoding: BASE64
          > Description: despeckle.tgz
        • David A. Bartold
          Hello, I apologize for not replying sooner.. I haven t had any free time at all the past weeks. ... This sounds like a problem you fixed below about the lines
          Message 4 of 9 , Sep 12, 2001
          • 0 Attachment
            Hello, I apologize for not replying sooner.. I haven't had any free time
            at all the past weeks.

            On Mon, 10 Sep 2001, Martin Weber wrote:

            > It is a very good program. I will add it to AutoTrace, but first we
            > could think about how to improve t a bit.
            > 1. Certain parts of text will disappear. What can we do here? (text.bmp)

            This sounds like a problem you fixed below about the lines disappearing?

            > 2. I found that adaptive_feature_coalescing = 0 messes the whole picture
            > up.

            Yes, well, technically the way the algorithm works is: Assuming the
            adaptive feature coalescing is off (i.e. 0), the despeckle level
            determines the smallest possible feature size remaining on the image after
            running it through the despeckle function. A level of 0 means 1 pixel
            minimum size, 1 means 2 pixels, 2 means 4 pixels, etc. The adaptive
            parameter allows small features to remain depending on 1: the adaptive
            coalescing parameter, 2: the contrast with the neighbor with closest
            color, and 3: the current iteration. So if you supply zero as the
            parameter's value and despeckle at a level of 5, the smallest pixel region
            is 2^5 pixels.

            There is one feature the algorithm lacks: when features are recolored they
            get the same value as the color of the closest neighbor. A better way
            would be compute a color average.

            > Only 1 and 2 were useful. 3-8 gave the same results for me than 2. Any
            > pictures where this gives different results?

            I've noticed that too: being able to specify fractions for lower values
            is essential because the parameter contributes a 1/x coefficent in
            determining the error threshold. It would be nice if the adaptive
            parameter made a linear difference.

            > 3. Have we realy to do a color quantization or couldn't we despeckle a
            > high
            > color image directly.

            No color quantization is needed.

            > I did some small modifications of the despeckle program. Please test it.

            I will try it out.

            > 1. By exchanging <= with < I removed the problem that thin nonvertical
            > or nonhorizontal lines disappeared.

            This is a definitely a bug.

            > 2. Changed the coalescence parameter from gint to gdouble.
            > 3. Changed the default value of the coalescence parameter from 2 to 1.0.

            Cool.

            > Any other possibilities to improve? Also a speedup is necessary.

            Efficency improvements are good. For improving the algorithm, see above
            about color averaging, but it will likely decrease speed.

            - Davdi
          Your message has been successfully submitted and would be delivered to recipients shortly.