From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Combine images into one image

I have 13 small images 100x100, and I would like to combine them into one 1300x1300 image.  I have all the latest vision assistant and IMAQ software.  I can't figure out an easy way to do this using Labview?  Any help would be greatly appreciated.
 
Kevin Baker
0 Kudos
Message 1 of 10
(12,565 Views)
Hi Kevin
 
Under Functions->Graphics&Sound->Graphics format you will find Flatten Pixmap and Unflatten pixmap fuinctions.
The Unflatten pixmap will give you the 2-D array of pixels representing your image (e.g. 100x100).
You can combine all your 2-D array pixmaps into one big array (1300x1300) and use Flatten Pixmap to draw your final picture (1300x1300).
 
hope it helps
take care
Pawel
 
0 Kudos
Message 2 of 10
(12,555 Views)
13 individule 100x100 pixels pictures will not give you a 1300x1300 it will give you a 1300X100 picture or some similar combination.  usually you combine numbers like 9 (3x3), 12
 (3x4) or some other combination.  what is the layout of the 13 images this will determine how you will concatinate the arrays togerther, see below:
 
[ 1 ] [ 2 ] [ 3 ] [ 4 ]
[ 5 ] [ 6 ] [ 7 ] [ 8 ]
[ 9 ] [ 10][11] [12]
[13] [---] [---] [---]
 
this will give you a 400 x 400 piexl array with 300x100 extra pixels to fill out the array.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 10
(12,552 Views)
Yes, I guess I was having a brain fart when I said 1300x1300 image. 
 
 
1
2
 3
[7][8][9][4][10][11][12][13]
5
6
 
 
0 Kudos
Message 4 of 10
(12,545 Views)

I accendenty sent the last one before I was done.  I want the form to be:

                [1]
                [2]
                [3]
[ 8][ 9][10][4][11][12][13]
                [5]
                [6]
                [7]

Where each # corresponds to an image.  Therefore it would be a 700x700 pixel image.  Can I still use the unflatten pixelmap?  Thank you.

Kevin Baker

0 Kudos
Message 5 of 10
(12,541 Views)

Now I am having problems using these functions because I am using the IMAQ image data type.  Is their a conversion to go back and forth?  Thanks again.

Kevin Baker

0 Kudos
Message 6 of 10
(12,528 Views)

I am not too familiar with IMAQ but have done LV image processing where you can use an array to represent the data (I think IMAQ uses some border pixels in their array to accomidate for image processing near image edges).  You can initialize a 700x700 array (use a numeric type which agrees with your image bit depth, then for each image use the replace array subset with the column/ row corresponding to the x,y location of the origin (upper left  corner) of each image to replace, the length of each subset is equal to the width and height (100 in this case) of the inserting image.  So for image 1 the replace subset would be:

column = 300, length = 100, row =0, length 100.

Repete this for all 13 images.  As for the IMAQ conversion I dont know the answer since I dont have a copy of IMAQ.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 10
(12,517 Views)
I believe I found an answer using IMAQ functions.  Thanks for the help.
0 Kudos
Message 8 of 10
(12,514 Views)
Hey Kevin,
 
You can use the IMAQ ImageToArray function if you want to manipulate the images as arrays, then when you have the array you want, you can use the Vision function IMAQ ArrayToImage to get back to the image data type. Also, you can use the IMAQ ImageToImage.VI to copy a small image into part of another larger image. This VI is useful for making thumbnail sketches from multiple miniature images.
 
I hope this helps. Please let us know if you have any other questions. Thanks, and have a great day.
 
Regards,
DJ L.
0 Kudos
Message 9 of 10
(12,492 Views)

What was you solution using IMAQ functions?

0 Kudos
Message 10 of 10
(5,625 Views)