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

Question on best parameters for tracing picture

Expand Messages
  • evgen_ek
    Hi, I am new to autotrace and can t understand well what should I do: I have source picture as http://www.laser.ru/evgen/soft/bugs/gazel1.png (converted to
    Message 1 of 3 , Sep 7, 2003
    View Source
    • 0 Attachment
      Hi,

      I am new to autotrace and can't understand well what should I do:
      I have source picture as http://www.laser.ru/evgen/soft/bugs/gazel1.png
      (converted to windows bmp)
      command line is
      AutoTrace.exe -report-progress -despeckle-level 10 -output-format
      dxf -output-file gazel1.dxf -color-count 16 gazel_c.bmp

      result in autocad is look like
      http://www.laser.ru/evgen/soft/bugs/autotrace.png

      So my questions are:
      - what are best parameters for picters like it
      - what mean first polyline in dxf out with only one vertex (I need
      delete it with hands) ?
      - why is realloc using in source code in very uneffective manner (like
      foo *prt = malloc(sizeof(foo));
      for(i=1;i<n;i++)
      { prt = (foo *) relloc((void *)prt, i*sizeof(foo));
      ....
      }

      ?

      SY,
      Evgeny
    • Masatake YAMATO
      ... Could you tell me the file and line you are talking about?
      Message 2 of 3 , Sep 8, 2003
      View Source
      • 0 Attachment
        > - why is realloc using in source code in very uneffective manner (like
        > foo *prt = malloc(sizeof(foo));
        > for(i=1;i<n;i++)
        > { prt = (foo *) relloc((void *)prt, i*sizeof(foo));
        > ....
        > }

        Could you tell me the file and line you are talking about?
      • evgen_ek
        ... (like ... All things like void append_point (curve_type curve, at_real_coord coord) { CURVE_LENGTH (curve)++; XREALLOC (curve- point_list, CURVE_LENGTH
        Message 3 of 3 , Sep 8, 2003
        View Source
        • 0 Attachment
          --- In autotrace@yahoogroups.com, Masatake YAMATO <jet@g...> wrote:
          > > - why is realloc using in source code in very uneffective manner
          (like
          > > foo *prt = malloc(sizeof(foo));
          > > for(i=1;i<n;i++)
          > > { prt = (foo *) relloc((void *)prt, i*sizeof(foo));
          > > ....
          > > }
          >
          > Could you tell me the file and line you are talking about?

          All things like
          void
          append_point (curve_type curve, at_real_coord coord)
          {
          CURVE_LENGTH (curve)++;
          XREALLOC (curve->point_list, CURVE_LENGTH (curve) * sizeof(point_type));
          LAST_CURVE_POINT (curve) = coord;
          /* The t value does not need to be set. */
          }

          I have change some of then to things like
          [....]
          curve_list_array->length = 0;
          curve_list_array->allocated = 0;
          [....]
          void
          append_curve_list (curve_list_array_type *curve_list_array,
          curve_list_type curve_list)
          {
          curve_list_array->length++;
          if(curve_list_array->length >= curve_list_array->allocated)
          { curve_list_array->allocated = curve_list_array->length + 32;
          XREALLOC (curve_list_array->data, curve_list_array->allocated *
          sizeof (curve_list_type));
          }
          LAST_CURVE_LIST_ARRAY_ELT (*curve_list_array) = curve_list;
          }

          SY,
          EK
        Your message has been successfully submitted and would be delivered to recipients shortly.