Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

image to image

Solved!
Go to solution

Hi there,

I have two AVI files that I want to combine to one AVI file where each frame of the new AVI is composed as follow, left part of the new frame is frame n of movie 1 and right part of the new frame is frame n of movie 2.

 

So far I manage to read both movie's frame by frame but when I want to put both frames together only the frame of movie 1 shows up, the left part of the new frame. The right part of the new frame, where I expect the frame of movie 2 is always black.

So I would say 50% of the job is done but I prefer the full 100% Smiley Very Happy

 

Can someone please review my code and tell me what I'm doing wrong.

Thanks for that!

0 Kudos
Message 1 of 4
(3,867 Views)

I would say you are at 99%.  You just need to swap the inputs for the top and left values for the offset of the second image.  Right now you are setting the top offset to the width of the image, so it would show up below the first image (if there was space to put it there).

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 4
(3,862 Views)
Solution
Accepted by topic author Alain_S

Hi,

 

As far as I can see your code is OK, but you have swapped Left/Top, so actually your second image located UNDER first image, not from the right side. Try to swap array elemenths here:

 

swap.png 

 

Andrey.

By the way, local variables can be replaced with wires (with shift registers or without - doesn't matter) in your case.

 

Message 3 of 4
(3,861 Views)

That I overlooked that for 2 hours Smiley Mad

Anyway thanks a lot guys!

 

 

I have a small dilemma checking the "Solved" answer since you helped me both.

I selected Dmitriev because of the tip regarding the tunnels Smiley Happy 

0 Kudos
Message 4 of 4
(3,838 Views)