Scaling Images - Interpolation?
Moderator: Moderator Team
Scaling Images - Interpolation?
Hey,
I have a question about the interpolation algorithms that have been implemented for scaling a DicomImage. The documentation refers to the pmbplus algorithm and the c't algorithm, but this is not very helpful. I even tried looking this up online, and I couldn't find any information regarding what these algorithms do.
Are they linear, bilinear, or bicubic? I'm involved in a study where our results will be highly influenced by the interpolation metric, and we would need to know this information if we were to use this library. Thanks for the clarification.
regards,
tom
I have a question about the interpolation algorithms that have been implemented for scaling a DicomImage. The documentation refers to the pmbplus algorithm and the c't algorithm, but this is not very helpful. I even tried looking this up online, and I couldn't find any information regarding what these algorithms do.
Are they linear, bilinear, or bicubic? I'm involved in a study where our results will be highly influenced by the interpolation metric, and we would need to know this information if we were to use this library. Thanks for the clarification.
regards,
tom
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
As far as I remember, both algorithms are (bi)linear.
More information should be available as part of the original sources:
More information should be available as part of the original sources:
- Manfred Rieg: Superelastisch - Verlustarmes Skalieren von Bitmap-Grafiken, c't magazine 11/94, page 302 (in German)
- Jef Poskanzer: pbmplus toolkit version "10dec91" (use your favorite search engine to find it)
-
- Posts: 8
- Joined: Thu, 2005-10-27, 18:06
- Location: Toronto, Ontario, Canada
speaking about interpolation....
Does the interpolation work when enlarging the image??? It seems that it doesn't work although the code in discalet.h looks like it should do the job.....Any more ideas on this topic?
Thanks a lot!
Thanks a lot!
-
- Posts: 8
- Joined: Thu, 2005-10-27, 18:06
- Location: Toronto, Ontario, Canada
more info on interpolation
When I call createScaledImage() with xfactor and yfactor parameters higher than 1.0 and I set interpolate = 1 parameter, the interpolatePixel() method of the DiScaleTemplate class defined in the discalet.h file gets called. When I set interpolate = 2, the expandPixel() method of the same class gets called. The code in those methods get executed as I have run the code with the debugger on,
The weird thing is that the end result, the scaled image, looks the same no matter what value I choose for the interpolate parameter. The enlarged image appears 'tiled', as no interpolation is performed, the pixels being just replicated. Is this behaviour by design?!
Thanks a lot,
Eduard
The weird thing is that the end result, the scaled image, looks the same no matter what value I choose for the interpolate parameter. The enlarged image appears 'tiled', as no interpolation is performed, the pixels being just replicated. Is this behaviour by design?!
Thanks a lot,
Eduard
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 8
- Joined: Thu, 2005-10-27, 18:06
- Location: Toronto, Ontario, Canada
bilinear/bicubic improvement
An update on this rather old topic, I have added methods to perform bilinear and bicubic interpolations on images in the discalet.h file. I am prettty happy with the results, the quality of the images is much better now.
Regarding the algorithms performance, the bilinear one is basically as fast as rendering the images uninterpolated. Naturally, the bicubic one is slower than uninterpolated or bilinear but still faster than current interpolations from discalet.h.
If someone needs the modified file, I can send it to him/her. I apologize for being so late with the update, I have done these improvements more than an year ago....
Eduard
Regarding the algorithms performance, the bilinear one is basically as fast as rendering the images uninterpolated. Naturally, the bicubic one is slower than uninterpolated or bilinear but still faster than current interpolations from discalet.h.
If someone needs the modified file, I can send it to him/her. I apologize for being so late with the update, I have done these improvements more than an year ago....
Eduard
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest