NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
KevinR
Posts: 15
0 Kudos
Accepted Solution

Image stitching?

Hi,

 

I am working with a rectangular object but, due to various constraints, I need to take two squarish images and stich them together before processing the final image.  Searching this forum only shows a couple of threads from a while back so I was wondering if anything new has been developed or released that might help me?

 

Many thanks,

Kevin R.

Active Participant
BCho
Posts: 349

Re: Image stitching?

Hey Kevin,

 

There currently is not a function to stitch images as you are requesting. However, as mentioned in the threads Combine Two Images and Combine Images there are a few work arounds. If you have the Vision Development Module, you can use IMAQ ImageTo Array on both your images, combine the two arrays, and then use IMAQ ArrayToImage to put your final image back together again.

 

Hope this helps, let us know if you have anymore questions.

 

-Ben

 

Applications Engineering

National Instruments

Hope this helps.
-Ben

WaterlooLabs
Member
KevinR
Posts: 15
0 Kudos

Re: Image stitching?

Thanks Ben,

 

Image to Array sounds promising.  I assume if I were clever enough I could analyze the array data to determine the correct point to stitch the two images together (as there is some overlap of field of view for each image and just butting them together would not give a correct finale image).

 

Regards,

Kevin

Active Participant
rpursley8
Posts: 958

Re: Image stitching?

I tried to use LabVIEW to stitch together images.  I consisted of finding three common points in two images and using those to determine offset, rotation and scaling than then combining them.  It worked moderately OK, but then I just decided to use Adobe Photoshop to do it and it did a much better job.

 

You might try Microsoft Image Composite Editor.

 

 

 

Randall Pursley
Member
KevinR
Posts: 15
0 Kudos

Re: Image stitching?

I think my biggest hurdle is stitching them together accurately.  Rotation and scaling 'shouldn't' be an issue but offset will.  Does the Photoshop have an API available?  The Image Composite Editor looks interesting, have you tried that?

 

Thanks for your suggestions.

 

Kevin

Active Participant
rpursley8
Posts: 958
0 Kudos

Re: Image stitching?

[ Edited ]

Photoshop can be controlled via ActiveX properties and methods, but I was never able to get it to work without user interaction (I think I couldn't get the arguements in the right format).  I will attach the code in case you are interested.  It's very rough, but might be helpful.  It is for Photoshop CS3 and LV8.6.

 

 

Message Edited by rpursley8 on 02-25-2009 03:36 PM
Randall Pursley
Active Participant
rpursley8
Posts: 958

Re: Image stitching?

[ Edited ]
I think I got an automated stitcher using LabVIEW 8.6 and Photoshop CS3.
Message Edited by rpursley8 on 02-25-2009 04:35 PM
Randall Pursley
Member
KevinR
Posts: 15
0 Kudos

Re: Image stitching?

Randall that is superb!  This pc has LabVIEW but no Photoshop, my other has Photoshop but no LabVIEW so I'll have to reinstall somethnig to test.  Thanks so much!

 

Kevin

 

Active Participant D60
Active Participant
D60
Posts: 278
0 Kudos

Re: Image stitching?

 

Hi!  

I saw your code, Cool! :smileyhappy: I've tried to do same, but my problem is: I've PhotoShop CS4, i foud the script file, but Automation Refnum is my problem. I cant find The Object Library of Photoshop... :smileysad:  i placed the Refnum, than Right Click -> Select ActiveX class, but I can't find anything to use, for example: Photoshop... Could you help me, where can I find the right class?

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
Active Participant
rpursley8
Posts: 958
0 Kudos

Re: Image stitching?

I don't know if I have access to CS4.  I will see what I can find.
Randall Pursley
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page