LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

arrange images in grid form

Solved!
Go to solution

hi

 

how arrange images in grid form like 2x2 matrix form.

any solution please.

 

Regards,

Hari

 

0 Kudos
Message 1 of 10
(2,852 Views)

Have you tried using a two-dimensional array of type "picture control"?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 10
(2,838 Views)

hi Thoric

 

No i didnt tried.

please give one example how to do it.

 

Regards,

Hari

 

0 Kudos
Message 3 of 10
(2,828 Views)
I'm not at a PC to create a VI, so the following description is the best I can do for now:
Create an array control, place a Picture indicator inside it, right click the array to add a second dimension, resize the array to your requirements.
To populate the array, load all your images in a for loop (for example) to create an array of pictures, reshape the array to 2-dimensional and wire it to your picture array.

That's off the top of my head, so it may need tweaking, but if should get you started.
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 10
(2,815 Views)

@Thoric wrote:
I'm not at a PC to create a VI, so the following description is the best I can do for now:
Create an array control, place a Picture indicator inside it, right click the array to add a second dimension, resize the array to your requirements.
To populate the array, load all your images in a for loop (for example) to create an array of pictures, reshape the array to 2-dimensional and wire it to your picture array.

That's off the top of my head, so it may need tweaking, but if should get you started.

Following instructions: (I'm at a PC)


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 10
(2,813 Views)
0 Kudos
Message 6 of 10
(2,808 Views)
Thanks Jeff, does it work? (still not at a PC so I can't load your VI) 🙂
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 7 of 10
(2,803 Views)

Hi Thoric

 

I tried according to your guidence.

final image was updated in all windows.

tell me where is the problem.

 

Regards,

Hari

0 Kudos
Message 8 of 10
(2,786 Views)

Hi Thoric

 

I tried according to your guidence.

final image was updated in all windows.

tell me where is the problem.

 

Regards,

Hari

Download All
0 Kudos
Message 9 of 10
(2,781 Views)
Solution
Accepted by topic author thinnker

Thinnker,

 

I'm not sure I understand what you're trying to do, but I altered what I could of your code to make it work without changing the structure so much that it become unrecognisable to you.

I've replaced your IMAQ control with a 2D Picture control because I don't have IMAQ installed. This VI works as expected and loads your folder of JPGs into the picture array.

If you work with IMAQ, note that your images will all be loaded into the same IMAQ reference because you are creating only one of them (called untitled), therefore with each image you load, you are overriding the previous one. You will need to move the IMAQ Create function into the For Loop and generate a new reference for each image you wish to load (each will require a unique string for its name).

 

 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 10 of 10
(2,765 Views)