Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Could somebody fix my program?

Solved!
Go to solution

Hi, I would like to make imae panorama. If I open two consecutive images (for example 1.jpg and 2.jpg or 2.jpg and 3.jpg or 3.jpg and 4.jpg), it works fine, but at the third picture it fails.  I would like that when I open 1.jpg, then 2, then 3, then 4.jpg it concatenates the pictures correctly. Could somebody fix it and upload the fixed VI? Thanks.

0 Kudos
Message 1 of 12
(5,658 Views)

Dear holex,

 

I'm really unsure as to what you're trying to accomplish in this application. Please try commenting and cleaning up your code, so that I have a chance to do debugwork. The biggest thing that helps me and fellow forumgoers would be to separate the application functions into clean logical units. For instance, you could have a separate VI for the algorythm that does the region match, one that does the merging of two images, one that loads images from file and so on.

 

This way, we can narrow down the potential problems and get results.

 

Kind regards:

Andrew Valko
National Instruments Hungary
0 Kudos
Message 2 of 12
(5,620 Views)
It will fail because,
-When you give 2nd image, you are searching for match in 1st image. But, after that when give 3rd image still you are trying to match in 1st image!!!
-If you search in proper image and when it identifies match it should works.
-So change which image you need to use for searching.
-Please try connecting error wires, instead of sequence structure.
Thanks
uday
0 Kudos
Message 3 of 12
(5,611 Views)

Could you upload the fixed VI? I have tried a lot of thing: IMAQ Copy, shift register, etc, but I couldn't solve the problem.

Thank you!

0 Kudos
Message 4 of 12
(5,592 Views)

Somebody please?

0 Kudos
Message 5 of 12
(5,531 Views)
-Can you explain in brief what you are doing there?
-One thing is sure, that some how matching is not working. If you could tell what you are doing exactly there, then we can help.
Thanks
uday
0 Kudos
Message 6 of 12
(5,524 Views)

I would like to make a panorama image from 1.jpg-10.jpg.

First, I open an image (1.jpg), then I open the second picture, 2.jpg. On the second picture I select a 100x900 pixels area, it will be the pattern. The first and the second image have a common area, which contains this 100x900 template. So I find the center of this template on the first image (IMAQ Match Color Pattern gives its position) . From the position and the size of the second image, I calculate the size of the new image, and resample the image (IMAQ Resample). I copy the first image to the resampled image, and then,th second image too. Up to this point, the program works. But then, I would like to add the 3.jpg to the panorama, which also has a common area with the 2.jpg, but the panorama which was maked from 1.jpg and 2.jpg disappears, only 3.jpg will be in the panorama picture, instead of 1.jpg, 2.jpg and 3.jpg.

Thank you for your help!

0 Kudos
Message 7 of 12
(5,521 Views)
Solution
Accepted by topic author holex

Please find the attached vi.

-I did not do optimization of code, just made it to work. Please do optimizations to current code.

-IMAQ Bit map overlay is nondestructive, which means when you added two images together in first iteration, it will not add or modify the image. So, you need to use merge overlay which adds overlay to image.(this is one possible way, since you used overlays, i tried to merge them to image.There can be other ways also).

Thanks
uday
Message 8 of 12
(5,514 Views)

Thank you very much for your help!

0 Kudos
Message 9 of 12
(5,504 Views)

Hi,

 

I have a similar problem, I have two image datas and I want to merge these two in only one, like the operation in the image below.

 

Can do it in LabVIEW?

 

ty

0 Kudos
Message 10 of 12
(4,095 Views)