From: Justus P. <Jus...@UL...> - 2005-02-22 11:32:44
|
Paul Kienzle <pki...@us...> wrote on Tue, 22 Feb 2005 01:09:38 -0500: > FWIW, matlab also exhibits the alternating bright-dim stripes but less > severely than yours. For imrotate(eye(...), ..., ...) I just verified that for all of "nearest", "bilinear" and "bicubic", Matlab's (6.5) and my code produce *exactly* the same result, modulo the following: - My code crops the image a little more aggressively than Matlab does. I round the size such that 90.1 and 90 degrees (e.g.) give the same result. Matlab uses the ceil. It's a matter of taste. Moreover, Matlab appears to pad the image with zeros, while I do not pad. Thus, Matlab fills in more values/produces a larger image. However, I do not see why we should pad; the value of zero is about as arbitrary as any other value. My code fills in (the arbitrary value of) zero wherever the result is not defined. Again, it's a matter of taste, but my method yields simpler code. - Both Matlab and my code may produce an odd-size result image for an even-size source image, and vice versa. In those cases where Matlab's and my code produce resulting image sizes of opposing parity, the results are obviously not identical, but neither is more "correct" than the other. Justus --=20 Justus H. Piater, Ph.D. http://www.montefiore.ulg.ac.be/~piater/ Institut Montefiore, B28 Phone: +32-4-366-2279 Universit=E9 de Li=E8ge, Belgium Fax: +32-4-366-2620 |