08-22-2012 03:49 PM
I have very images. These images form a total image then I Require to unite all image for complete the total image. I think build the total image with a matrix store the image in the position, but I have a problem: The pictures have a common regions, then if I use the array I will have the same region in two parts of total image, then I need join the images such that the common region of images only appear once.. The common region have 80 pixel.
Then I have very images and need build with these image one total image, but these image have common region then in the total image appear one part more once
08-22-2012 08:02 PM - edited 08-22-2012 08:04 PM
Is the overlap always 80 pixels and is it always there?
If so, here's one way of doing it....
1) Convert images to arrays
2) Strip unnecessary pixels
3) join arrays into one big array
4) convert array back to an image
There are VIs for doing 1 (image to array), 3 and 4 (array to image) already.
So the issue is step 2.
Lets look at a simple example.
Imagine you have the following group of arrays that form a 3x1 grid. (left to right)
11111
12222
12334
12222
11111
11111
22222
34443
22222
11111
11111
22221
43321
22221
11111
Now imagine you know that there is an overlap of 2 columns between neighbouring arrays.
You could do one of the following:
remove 2 columns on each side of the second array
remove 2 colums from the right of the first array and the left of the third array
remove 2 columns from the right of the first and second array
remove 2 colums from the left of the second and third array
Lets assume you do the first one.
You'd then have the following arrays:
11111
12222
12334
12222
11111
1
2
4
2
1
11111
22221
43321
22221
11111
Joining them together would then give you your un-region duplicated array.
11111111111
12222222221
12334443321
12222222221
11111111111