LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to "double" a 2D array?

Solved!
Go to solution

This image shows the output array I want from an input array.

 

Example_VI_FP.png

 

What is the best way to do this? (Best meaning fastest and most memory efficient).

 

I want to double the size of an image. I don't have IMAQ. I know about the zoom factor on image controls but that is not what I want.

=====================
LabVIEW 2012


0 Kudos
Message 1 of 11
(4,013 Views)

Sorry I realized that I only did it one way.

Tim
GHSP
0 Kudos
Message 2 of 11
(4,001 Views)

Here is one possibility.

 

Double_Array.png

 

Probably not the fastest and most memory efficient but it works.

 

Ben64

Message 3 of 11
(3,993 Views)

ok here is mine

 

Example.png

Tim
GHSP
0 Kudos
Message 4 of 11
(3,986 Views)
Solution
Accepted by SteveChandler

Hi,

 

      I did a solution using in-place memory, for best performance.

 

Zoom Array.PNG

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
Message 5 of 11
(3,979 Views)

A small revision

 

Example.png

Tim
GHSP
Message 6 of 11
(3,976 Views)

 

 

I whent for the IPE as well but used a logical shift to avoid the mutiply by 2s

 

OK Steve- Benchmark 'em

 

DOUBLE.png


"Should be" isn't "Is" -Jay
Message 7 of 11
(3,969 Views)

and one more revision maks it so you can add how ever many copies you want.

 

Example.png

Tim
GHSP
0 Kudos
Message 8 of 11
(3,963 Views)

Thanks everyone!

 

I did some benchmarking. These are the results (vis set to high priority no debug)

 

Converting a 5000x5000 array, times in seconds

 

Luis          .43

Jeff           .43

Ben64       2.5

aeastet    .669

 

It is a tie between Jeff and Luis. Since the only way I can think of to decide who gets the solution is whoever posted first it goes to Luis.

 

 

Benchmark_BD.png

 

=====================
LabVIEW 2012


0 Kudos
Message 9 of 11
(3,948 Views)

Hi,

 

     Thanks Robot Happy

 

      A more thing, you can enable loop iteration parallelism for get better time.

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
Message 10 of 11
(3,931 Views)