From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Resize a picture

hi
I am using web cam acquiring image using lab view. i want to reduce the size of the picture before saving it .currently the size of the iamge is 300*200. i want to save it in smaller size becaz iwill be displaying this image on mobile and that require small pictures.any idea how to do it in labview.
0 Kudos
Message 1 of 30
(26,755 Views)

Attached is a VI which resizes a 2D array (7.0) . It was designed to resize pictures and for pictures of your size it should be fast enough. I don't think webcams use 24 bit color, so you may have to make some modifications. Also, it doesn't do any "clever" stuff like averaging color values. It just takes some of the elements from the original, which seems to be good enough.

From what I saw, this VI gets slow when handling large arrays (I saw about a second for a 2800x1500). Does anyone have any optimizations ideas? I know that when windows creates thumbnails it also takes time, so I'm not too optimistic.

Message Edited by tst on 07-27-2005 12:14 PM


___________________
Try to take over the world!
Message 2 of 30
(26,754 Views)

Try this link for the quicktime library. It has an imagetransformation vi in it. You can scale the X and Y independent of each other. You need quicktime installed.

 

http://labview.epfl.ch/QT/QTVis.html

0 Kudos
Message 3 of 30
(26,736 Views)
Here's an addition - a VI which loads a directory of JPGs, resizes them and displays them in a 2D array.

___________________
Try to take over the world!
Message 4 of 30
(26,728 Views)

VERY nice vi. 10 stars ..at least

Thanks tst...

0 Kudos
Message 5 of 30
(25,915 Views)
Thank you very much for these most useful vi's
They resize the jpeg's quickly, and present them in a handy 2D array.
Thanks again for sharing your work.
John
0 Kudos
Message 6 of 30
(25,817 Views)