Assignment 3
Fabian Prada
Experiment 1: Sequential Rotations
Description: Using Cardinal-Omoms5 as reference filter, I generated 16 images of lena-256.png with orientations 0, 22.5, 45, 67.5,...,337.5 degrees by direct rotations (i.e, each image independent of the others). Then, for each evaluation filter I did successive rotations of the image by 22.5 degrees, feeding back the result in every step (i.e, the rotation is done from the previous recontruction). For each rotation, the reconstruction was compared with the corresponding image in the set of 16 images initially generated by the reference filter. The region of comparision is a circle of radius 0.45*min(h,w). For each evaluation filter 400 rotations were considered (i.e, 25 cycles) ,and here we have the results:
Images after 400 rotations:
Original |
Box |
|
Hat |
|
|
|
|
|
|
Keys4 |
Condat3 |
|
Cardinal-Bspline3 |
|
|
|
|
|
|
Cardinal-Omoms3 |
Lanczos-sinc6 |
|
IMOMS5 |
|
|
|
|
|
|
Cardinal-SOmoms5 |
Cardinal-Bspline5 |
|
Cardinal-Omoms5 |
|
|
|
|
|
|
Measures:
Experiment 2: Sequential Translations
Description: Using Cardinal-Omoms5 as reference filter, I generated 12 images of lena-256.png corresponding to translations around a circle of 20 pixels of radius (I magnifyed this parameter to make the changes more noticeables). Then, for each evaluation filter I did successive translations of the image around the circle, feeding back the result in every step (i.e, the translation is done from the previous recontruction). For each translation, the reconstruction was compared with the corresponding image in the set of 12 images initially generated by the reference filter. The region of comparision was 0.3*min(h,w).For each evaluation filter 400 translations were considered (i.e, 33,3 cycles) ,and here we have the results:
Images after 400 translations:
Original |
Hat |
|
|
|
|
Keys4 |
Condat3 |
|
Cardinal-Bspline3 |
|
|
|
|
|
|
Cardinal-Omoms3 |
Lanczos-sinc6 |
|
IMOMS5 |
|
|
|
|
|
|
Cardinal-SOmoms5 |
Cardinal-Bspline5 |
|
Cardinal-Omoms5 |
|
|
|
|
|
|
Measures:
Experiment 3: Cummulative Rotations
Description: In order to evaluate the robustness of the filters to small angle rotations, cactus-256.png, was rotated n times by angles of
360/n degrees to return to the initial position. Each partial rotation is reconstructed from the image obtained in the previous step. Finally, the image obtained by the cummulative full rotation is compared with the initial image. Again, the region of comparision is a circle of radius 0.45*min(h,w). I performed the experiment for n=6,12,16,...,120 (see cummulativeRotations.txt). Here we have the results for n=120:
Original |
Box. PSNR=16.6796,SSIM=0.552193. |
|
Hat. PSNR=20.4141,SSIM=0.750063. |
|
|
|
|
|
|
Keys4. PSNR=23.5808,SSIM=0.895623. |
Condat3. PSNR=26.0157,SSIM=0.94625. |
|
Cardinal-Bspline3. PSNR=26.375SSIM=,0.948255. |
|
|
|
|
|
|
Cardinal-Omoms3. PSNR=28.6422,SSIM=0.971516. |
Lanczos-sinc6. PSNR=15.0696,SSIM=0.661923. |
|
IMOMS5. PSNR=25.4338,SSIM=0.934982. |
|
|
|
|
|
|
Cardinal-SOmoms5. PSNR=29.9961,SSIM=0.978901. |
Cardinal-Bspline5. PSNR=29.8685,SSIM=0.978282. |
|
Cardinal-Omoms5. PSNR=30.7504,SSIM=0.982471. |
|
|
|
|
|
|
Experiment 4: Cummulative Translations
Description: In order to evaluate the robustness of the filters to small translations, cactus-256.png, was moved around a circle of radius 20 pixels,in such a way that it returned to the initial position after n uniforms displacement (i.e, the magnitud of each displacement was about 2*pi*r/n). Each partial translation is reconstructed from the image obtained in the previous step. Finally, the image obtained by the cummulative full translation is compared with the initial image. Again, the region of comparision is a circle of radius 0.3*min(h,w). I performed the experiment for n=4,8,12,...,160 (see cummulativeTranslations.txt). Here we have the results for n=160:
Original |
Hat. PSNR=17.985,SSIM=0.483424. |
|
|
|
|
Keys4. PSNR=20.6157,SSIM=0.770859. |
Condat3. PSNR=24.1636,SSIM=0.914029. |
|
Cardinal-Bspline3. PSNR=22.9358,SSIM=0.879491. |
|
|
|
|
|
|
Cardinal-Omoms3. PSNR=26.0465,SSIM=0.949753. |
Lanczos-sinc6. PSNR=6.46471,SSIM=0.162407. |
|
IMOMS5. PSNR=22.2955,SSIM=0.858539. |
|
|
|
|
|
|
Cardinal-SOmoms5. PSNR=26.7788,SSIM=0.956534. |
Cardinal-Bspline5. PSNR=26.6211,SSIM=0.954678. |
|
Cardinal-Omoms5. PSNR=27.6577,SSIM=0.965124. |
|
|
|
|
|
|
Technical Observations :
- The values for PSNR and SSIM were calculated using only the red channel (predominant in lena and cactus). I took such decision since image reconstruction is done independently in each channel, so it would be expected that the measure of degradation be similar in each channel (this was just my intuition!). Following this criteria, I decided to take the measures in the predominant channel. When I finished the experiments I realized that it would have been more robust to the take the mean or a weighted mean of the degradation measure by each channel. Taking the mean of degradation in each channel is precisely what is done by PSNR. However, in the case of SSIM, I think that doing the calculations for the predominat channel (or better yet, do the calculations for each channel independently and then take a weighted mean) is more robust than taking the mean of the channel as the pixel value (i.e, transforming the image to gray scale). When the image is transformed to gray scale a lot of information is lost, and for instance a full red image would be equivalent to full green one.
- In the case of translations experiments I decided to take a smaller region of comparision because I think (I have not confirmed yet!) that translation around a circle of 20 pixel of radius (as was done) produces stronger propagation of frontier errors than rotation.
- Lanczos-sinc6 was normalized to avoid loss of intensity.
Conclusions and Observations:
- From the results obtained, both in rotations and translations, we confirm the superiority of filters of highest order (I mean Card-Omoms5, Card-SOmoms, and Card-Bspline5) over the remain evaluated filters.
Even after 400 rotations and translations the reconstructions are very close to the exact result (measured in PSNR and SSIM). In this set of highest order filters, Card-SOmoms5 and Card-Bspline5 almost performed quite similar in all the experiments, while Card-Omoms5 was superior. Card-Omoms5 had an odd behavior in the sequential rotations experiment after 300 rotations (that is extremely large in comparision with any common appliaction) that would be interesting to review.
- In these experiments the PSNR and SSIM, inspite of having different approach to compare image degradation (or similarity resp.) let to an identical ordering of quality for the evaluated filters (i.e.,the best, the second best,..., in each experiment, was the same for both measures). Also, the level of separation of both measures (how it separates the performance for any two filters) is very similar (up to scale). Therefore, from this small set of result I consider extremely hard to identify preference for a measure instead of the other.
- It is very interesting to observe how the process of sequential rotation and translation seems to ''converges'' to a periodic state for some filtes (specially the cardinal spline filters). It would be interseting to study if the proccess is effectively convergent or if it is slowly decreasing to a totally distorted image (as in Lanczos). In the case of convergence, it would be nice to study the relation between the original image, the image of convergence and the filter. It would be also great to study the speed at which the image is distorted for each filter (clearly, this depends on the metric of reference).
- These experiments let to observe some strange behavior of the filters that were not identifyied in the previous assignemt. One of them, is the strong ringing effect related to Lanczos-sinc6 filter which lead to fast image degradation. The results of Lanczos-sinc6 were not satisfactory even for less than 100 translations or rotations, and as observed from the images, the distortion after 400 steps is total.
- Other strange behavior was evidenced by Condat3. In the case of translations experiments the result were satisfactory (better than Card Bspline3, Keys4, and Imoms5), but in the case of rotations the results were surprising. It seems like the reconstruction procces suddenly gets numerical inestability (similar to what occured to Cardinal-Omoms5 in the Sequential Rotations experiment) and the speed of distortion increases. It would be interesting to study what causes such sudden changes in the rate of degradation and why that leads to interesting geometrical shapes (see the lena image for Conadat3).
- The experiment also evidenced that Imoms5, inspite of being a high degree filter, is overcome by ''cheaper'' filters like Card Bspline3, Card Omoms3 and Condat3.
Ranking:
Here I post my new ranking based in the PSNR and SSIM measures for the 4 experiments. This rank NOT measures the quality of reconstruction for a single operation (for instance just resampling, where Lanczos is by far better than Box), instead, it measures the robustness to extreme operations (lots of rotations or translations). This rank is closely related to the order of approximation of the filters and their numerical stability.
- Card.Omoms5
- Card.SOmoms5
- Card.Bspline5
- Card.Omoms3
- Condat3
- Card.Bspline3
- Imoms5
- Keys4
- Hat
- Box
- Lanczos-sinc6