LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace or rebuild array, please help

Hi, everyone

 

I have to get the color values array from an input image and then increase or decrease the number of elements (pixel).
For example, If I have 2x2 color values and I have to change it to be 4x4 and then change array to image to represent a new image.
The size of array is from the input image size 

In case of increasing, it will look like this,


2 4>>>>>>>>>> 2 2 4 4     >>>>>>> new image
6 8                     2 2 4 4
                         6 6 8 8
                         6 6 8 8


But if I have to decrease array from 4x4 to 2x2 , I have to find and average of each array group
2 3 4 10 >>>>>>>>  2.5  7  >>>>>>> new image  

3 2 10 4                   5     8

6 4 8  8

4 6 8  8 

 

My problem is I don't know how to do it. Now, I only get the color value array but I cannot increase or decrease to form a new array.
Please help, I am just the beginner.

Regard
Thank you in advance

P.S. Sorry for my poor English grammar.  

0 Kudos
Message 1 of 3
(2,307 Views)

Hello,

 

I've made this. This VI only scales in whole numbers and I programmed only scale- factor up to 4. It is able to enlarge and to shrink the image data.

 

Greets, Dave
0 Kudos
Message 2 of 3
(2,287 Views)

Thank you so much!
I will try to adapt it with others sizes Smiley Wink 

0 Kudos
Message 3 of 3
(2,280 Views)