[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with "nearest" procedure in IMROTATE.M
From: |
Journeaux, Ian |
Subject: |
Problems with "nearest" procedure in IMROTATE.M |
Date: |
Wed, 24 Mar 2010 15:40:53 -0500 |
I have be trying to troubleshoot a problem with the imrotate method in Octave.
When I use the "nearest" option, the results of imrotate are not ideal. I have
a small test image that I rotate by a few degrees. The histogram of the
resulting images look ok visually but if you do a histogram of the 8bit
grayscale values, the Matlab version of imrotate produces a smooth distribution
that is identical to that of the original image (as expected). The Octave
version gives an odd looking histogram where many of the bins are 0. It looks
like there is a significant rounding error.
The table list the histogram distribution for the original image and the
rotated image via Matlab and Octave versions of imrotate.
Notice that for Octave bin 71 is the sum of bin 71 and 72 in the original image
and that the Octave bin 72 is the value of the bin 73 in the original image and
the Octave bin 73 is 0. This pattern repeasts through the histogram.
Bin Original Matlab Octave
64 37 37 38
65 38 38 0
66 38 38 38
67 33 33 65
68 32 32 28
69 28 28 0
70 47 47 47
71 30 30 54
72 24 24 34
73 34 34 0
74 27 27 27
75 32 32 95
76 63 63 80
77 80 80 0
78 190 190 189
79 448 448 1523
80 1087 1087 2422
81 2453 2453 0
82 3922 3923 3868
83 4338 4338 8400
84 4161 4161 3693
85 3741 3741 0
86 2908 2908 2871
87 2383 2383 4145
88 1802 1802 1418
89 1431 1431 0
90 1235 1235 1225
91 1106 1106 2116
92 1028 1028 903
93 911 911 0
94 762 762 759
95 659 659 1177
96 530 530 404
97 410 410 0
98 364 364 364
99 325 325 582
100 259 259 247
101 248 248 0
102 212 212 211
103 192 192 359
104 169 169 152
105 153 153 0
This electronic message contains information from NewPage Corporation or
subsidiary companies,
which may be confidential, privileged or otherwise protected from disclosure.
The information is
intended to be used solely by the recipient(s) named. If you are not an
intended recipient, be
aware that any review, disclosure, copying, distribution or use of this
transmission or its
contents is prohibited. If you have received this transmission in error, please
notify NewPage
immediately at address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problems with "nearest" procedure in IMROTATE.M,
Journeaux, Ian <=