From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

combine/join images

Hi. I want to acquire images from inside a tube. The tube spins and moves so that the camera goes inside and takes pictures in a spiral movement. I have the position of the tube (angle, linear position). How can I recompose the pictures into a larger picture of the tube internal surface, with X coordinate from 0..360 and Y coordinate from 0..Ymax? Any suggestions appreciated. thanks
0 Kudos
Message 1 of 5
(3,087 Views)

Hi Gyc..

 

Do you want to do Mosaic Image. If so this can be done by converting your pixels intensities in 2D Array (IMAQ Image to Array) and perform the array manipulation (Not applicable for RGB image).

---
Silver_Shaper | CLD
0 Kudos
Message 2 of 5
(3,085 Views)

The quick and dirty method is to create a new image and set the size to the full image (0..360, 0..Ymax).  I would also fill it with a solid color, either black or white.  For each image you capture, figure out the upper left corner and use Image to Image to paste it into the large image.  You will need to figure out how to do the wrapping going from 360 to 0.  Once you are done, you should have a collage that includes all your images.

 

The problem with this method is the overlapping edges and the distortion.  The pixels at the edges will not match up exactly due to distortion and perspective.  The ideal solution would be to gradually fade from one image to the other so there is no edge.  Also stretching and adjusting images to fix the distortion and perspective issues.  It really depends how accurate you need the final image to be.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 5
(3,081 Views)

Thanks, Bruce, for the suggestions.

I hoped that, by now, there would be some "tools" to do what I need.

 

Where and how is camera calibration data stored?

I'll have position data (corresponding to piexl (0,0)), and I'll have to figure out where in "big picture" it will land.

I gues I'll have a bit of coding to do.

 

0 Kudos
Message 4 of 5
(3,061 Views)

Thanks, precisely what Bruce also suggested.

I'll be using good old b/w images, no color. Smiley Happy

 

0 Kudos
Message 5 of 5
(3,057 Views)