06-02-2019 02:01 PM
I have developed a VI to arrange images row wise. I have M rows ans N columns. I have developed VI such that final resultant images in each row as single image with M rows.So final image is M by 1 array. i.e, M rows and 1 column. I am selecting files from 1 folder. I have programmed in such a way that VI will automatically take images from folder. But one problem I am facing is images in each rows are same. For example, number of rows is 3 and columns 4 , program should take first 4 images stacked as single image to be row1, next 4 images stacked as single image to be row2,etc.But in this VI , images in all rows are the same first column number of images.
How to rectify this issue?
I have attached VI.
Solved! Go to Solution.
06-02-2019 03:25 PM
Images are a reference to a memory location.
In your first For Loop, you are creating image locations based on the iteration number. But when the outer loop runs again, you are creating the same names for the image locations in that same For Loop. Thus you are overwriting the images you got the first time around.
Incorporate the outer Forloop iteration along with the inner For Loop iteration in the naming process.
06-02-2019 10:05 PM
This is an interesting (and intriguing) problem. Thank you for attaching some images, which makes clear (to me) what you are trying to do.
I've taken a crack at it, and have some comments for you to consider:
I haven't (yet) gone back to your code to see where you went astray, nor to see which IMAQ functions you are using. If I can, I'll take another look tomorrow ...
Bob Schor
06-02-2019 10:37 PM
Ok Thanks
06-02-2019 11:10 PM
I have tried and atlast found a way to stack 2 rows of images and N number of columns.
But my aim is M rows and N columns.
I have attached VI.
06-03-2019 05:42 AM
06-03-2019 08:02 AM
You need to hard code a number larger than 2 in your Reshape Array!
06-03-2019 08:52 AM
My attempt is much more complex than the lovely demonstration posted by @alexderjuengere. I tried to use IMAQ functions, and included some "sanity checks" (like making sure that all Images in a row had the same height, and all Images in a column had the same width, plus making sure that all of the Images in a rectangle were present). The other thing I wanted to do (but have not had the time to work on it) was to use the IMAQ function ImagetoImage 2 to create a single 790 x 435 Image with no separation between the 8 sub-Images. I think this should work ..
With this in mind, I went back for another look at the OP's code, which seems to be following what I was thinking about. Here are some (minor) problems based on "assumptions" that may not always be true:
This Snippet shows what I think is the correct logic for stitching your Images together. I've changed the order of processing to Row-Major, included some of the IMAQ functions for reference to your code, and redone somewhat the logic for creating the X-Y location of the individual Images into the single Composite Image.
Stitching Logic
Bob Schor
06-04-2019 01:06 AM
What if I have to do to convert array of images to single joined image?
I tried to use array to image function ,but its not working
06-04-2019 03:43 AM
I have M rows and N columns of images. My aim is to convert it into final joined images. These images have no overlap. I want my final image as panorama based on M rows and N columns. Images are selected from folder.
I have attached program. But not getting result.