george seifert Posted December 11, 2007 Report Share Posted December 11, 2007 Is it possible to scale an IMAQ image by something other than power of 2? I have two 640 x 480 images that I want to display side by side, but that gets kind of big for some screens. If I shrink the image by a half it's a little too small. I can't seem to find any way to scale the image by say 1/3. Am I missing something? George Quote Link to comment
shoneill Posted December 11, 2007 Report Share Posted December 11, 2007 QUOTE(george seifert @ Dec 10 2007, 04:42 PM) Is it possible to scale an IMAQ image by something other than power of 2? I have two 640 x 480 images that I want to display side by side, but that gets kind of big for some screens. If I shrink the image by a half it's a little too small. I can't seem to find any way to scale the image by say 1/3. Am I missing something?George Have you tried the "Zoom (Single)" item on the property node for the display? Setting a value of 0.66 will reduce the size by 1/3, setting 0.1 will reduce the size by factor 10. This is useful if you only want the displöay scaled, but leave the actual image untouched. To rescale the image itself, you can use the "IMAQ Resample" under the "Image Manipulation" palette. Shane. Quote Link to comment
george seifert Posted December 11, 2007 Author Report Share Posted December 11, 2007 QUOTE(shoneill @ Dec 10 2007, 10:19 AM) Have you tried the "Zoom (Single)" item on the property node for the display? Setting a value of 0.66 will reduce the size by 1/3, setting 0.1 will reduce the size by factor 10. This is useful if you only want the displöay scaled, but leave the actual image untouched.To rescale the image itself, you can use the "IMAQ Resample" under the "Image Manipulation" palette. Shane. Thanks. I missed that one. Unfortunately both methods introduce some funky artifacts in the image if you scale by something other than a power of 2. George Quote Link to comment
shoneill Posted December 11, 2007 Report Share Posted December 11, 2007 QUOTE(george seifert @ Dec 10 2007, 08:30 PM) Thanks. I missed that one. Unfortunately both methods introduce some funky artifacts in the image if you scale by something other than a power of 2.George Funky artifacts? The only funky artifacts I see is the picture getting larger or smaller......... In both methods I listed? Shane. Quote Link to comment
george seifert Posted December 11, 2007 Author Report Share Posted December 11, 2007 QUOTE(shoneill @ Dec 10 2007, 02:08 PM) Funky artifacts? The only funky artifacts I see is the picture getting larger or smaller......... In both methods I listed?Shane. There are evenly spaced little squares (like a grid) over the whole picture. I'm using a grey scale 8 bit image. Maybe that makes a difference. Yep, both methods yield the same artifacts. George Quote Link to comment
eaolson Posted December 11, 2007 Report Share Posted December 11, 2007 QUOTE(george seifert @ Dec 10 2007, 01:30 PM) Thanks. I missed that one. Unfortunately both methods introduce some funky artifacts in the image if you scale by something other than a power of 2. Have you tried fiddling with the Interpolation Type option in IMAQ Resample? Zero Order is the default and will be the fastest, but will also be the worst. Bi-linear and Cubic may give you better results, but will be slower. Quote Link to comment
george seifert Posted December 11, 2007 Author Report Share Posted December 11, 2007 QUOTE(eaolson @ Dec 10 2007, 02:16 PM) Have you tried fiddling with the Interpolation Type option in IMAQ Resample? Zero Order is the default and will be the fastest, but will also be the worst. Bi-linear and Cubic may give you better results, but will be slower. Thanks. The Bi-linear is pretty good. Some slight artifacts, but tolerable. BTW, there aren't any noticeable artifacts with even the Zero Order with a 32 bit image. George Quote Link to comment
Rolf Kalbermatter Posted December 12, 2007 Report Share Posted December 12, 2007 QUOTE(george seifert @ Dec 10 2007, 03:33 PM) Thanks. The Bi-linear is pretty good. Some slight artifacts, but tolerable. BTW, there aren't any noticeable artifacts with even the Zero Order with a 32 bit image.George When you have to calculate the weighted average of several pixels, the result will be much more smoothly when you have 8 bits per color to distribute your values in, than in 8 bits altogether. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.