02-23-2009 05:46 PM
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.
Solved! Go to Solution.
02-24-2009 09:35 AM
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
02-24-2009 11:06 AM
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
02-25-2009 08:42 AM
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.
02-25-2009 10:40 AM
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
02-25-2009 02:35 PM - edited 02-25-2009 02:36 PM
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.
02-25-2009 03:34 PM - edited 02-25-2009 03:35 PM
02-26-2009 12:26 PM
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
09-26-2009 01:00 PM
Hi!
I saw your code, Cool! 🙂 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... 😞 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?
09-28-2009 08:40 AM