Search found 1945 matches

by NicolasRobidoux
2010-08-31T07:05:42-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

There is something that we have not done (yet). We have no issues about the accuracy of the our formulas, but we have not done speed benchmarking. (The sin function often uses a co-processor implementation when compiled with gcc, so it is pretty hard to beat, irregardless of the quality of an approx...
by NicolasRobidoux
2010-08-30T07:28:00-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

Another question: I assumed so far that the most important use for the Sinc function is lanczos 3, hence the [-3,3] interval of approximation. But http://www.imagemagick.org/Usage/resize/#filter_windowed suggests that actually Sinc is often used over [-4,4]. Should we produce approximations of [-4,4...
by NicolasRobidoux
2010-08-30T07:08:01-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

RE: Forgive me again for sticking my nose in. I would suggest that it might be useful for evaluation purposes to see a graph showing the difference in the "fast" sinc from the more formal "exact" one and a difference graph and error measure. Thus, if differences are significant enough (or results di...
by NicolasRobidoux
2010-08-30T02:58:29-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

More questions : Q1: Some IM constants (for example, those defined in image-private.h) are given with 50 decimal digits after the decimal point: #define MagickPI 3.14159265358979323846264338327950288419716939937510 #define Magick2PI 6.28318530717958647692528676655900576839433879875020 #define Magick...
by NicolasRobidoux
2010-08-29T19:52:11-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

ETA: Thursday at the latest.

Nicolas Robidoux
by NicolasRobidoux
2010-08-29T15:10:22-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

Two questions:

1) Is MagickRealType ever larger (in terms of digits in the significand a.k.a. mantissa) than a standard double?

2) Is MagickRealType ever smaller than a standard double?

Are there guidelines somewhere RE: whether computations should be done with double or MagickRealType?
by NicolasRobidoux
2010-08-29T13:11:32-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

Thank for you the (tentative) inclusion. ------ There is something I oversaw in the code I gave, which is a result of having never worked on filtering where the widest sinc extent is, at least in principle, arbitrarily large (as is the case in IM). The long and short of it is that because the approx...
by NicolasRobidoux
2010-08-29T00:00:00-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

Apologies for the multiple posts: the x_squared <= 1.0 tests were wrong. (Still gave correct results, so was hard to detect.)

I fixed the version posted at

http://web.cs.laurentian.ca/nrobidoux/misc/resize.c
by NicolasRobidoux
2010-08-28T23:37:05-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Re: Cheaper sinc computation for resize.c

I have put a modified resize.c with three alternate sinc( functions commented out with #if 0 ... #endif here: http://web.cs.laurentian.ca/nrobidoux/misc/resize.c The key modified code follows at the end of this post. All three sinc approximations approximate sinc over [-3,3] because it appears to me...
by NicolasRobidoux
2010-08-28T16:35:02-07:00
Forum: Developers
Topic: Cheaper sinc computation for resize.c
Replies: 83
Views: 144264

Cheaper sinc computation for resize.c

I am an applied mathematician working on image filtering. For example, I am a regular contributor to the free open source VIPS/NIP2 system, and me and my students have contributed to the free open source GEGL library. My masters student Chantal Racette and I have just discovered an highly accurate a...