LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Concatenate Images

Solved!
Go to solution

I am trying to make a single image from a folder of multiple images.

The images are currently jpgs, which is also how I would like the final image.

 

The end product should eventually be a square grid with all of the images edge-to-edge.

I have currently gotten as far as arranging them into a 2D array.

 

What would be a good direction to go from there?
I saw a few posts like this one that have something called 'concatenateimages.llb' but I don't have the Vision Toolkit.

 

Think its possible without it?

 

I attached a .zip folder with some of the images as well as the VI that put them in a 2D array (feel free to comment on the VI as well)

To run the VI, change the path to wherever you save the folder of images

 

*I apoligize for the size of the zip file in advance 😉

Cory K
Download All
0 Kudos
Message 1 of 6
(5,949 Views)

Much of what you need is in my example posted here.

 

http://forums.ni.com/t5/LabVIEW/Create-multiple-VIs-using-a-for-loop/m-p/1140832#M502391

 

I will repost the snippet here.

 

PictureMatrix.png

 

 

Load from JPG will put the picture at (0,0) so you do not need to do that.  Inside the loop I shift the rectangle from the image data before drawing it.  You need to wire the column and row number to the cluster.  Now the tricky part.  Your pictures are not the same size like in this snippet (I was tiling the same image).  You can choose to scale the images, or fill with white space, I do not know what you are envisioning.

 

I have inserted the code I described into your VI, but was stymied by the varying picture size.

Message 2 of 6
(5,935 Views)
Solution
Accepted by topic author Cory_K

I decided that Album Artwork probably has a consistent aspect ratio so simple scaling should work.  Here is a version which lets you specify the size of each image then scales and tiles.  I have posted my scaling VI somewhere before but the new search is too big of a pain for me to find it right now so I have included it in the LLB.

 

Result: This JPEG image

17019iD85CCF7521292B4B

 

Message 3 of 6
(5,927 Views)

Thanks a lot Darin, I appreciate the help Smiley Happy

 

I hate to ask another favor of you, but I only have 8.6.1

Is there anyway you could downcovert that for me from 2009 --> 8.6.1?
Thanks a ton.

Cory K
0 Kudos
Message 4 of 6
(5,916 Views)

Here it is in 8.6

 

 

Message 5 of 6
(5,909 Views)

Awesome Darin, it works perfectly.

Thanks again.

Cory K
0 Kudos
Message 6 of 6
(5,840 Views)