Login  Register

Re: TrakEM2: Stitching overlapping images from coordinates

Posted by André Pereira on Mar 10, 2015; 3:31am
URL: http://imagej.273.s1.nabble.com/TrakEM2-Stitching-overlapping-images-from-coordinates-tp5011918p5011932.html

Hi Albert,

Thanks for your help.

The first six lines of my file look like this:
/Volumes/MechBioSeagate1/Data/001/001_000001_034_2014-10-17T1703305049560.bmp
14273 19378 0
/Volumes/MechBioSeagate1/Data/001/001_000001_035_2014-10-17T1703305049560.bmp
17425 19374 0
/Volumes/MechBioSeagate1/Data/001/001_000001_037_2014-10-17T1703305049560.bmp
20540 13825 0
/Volumes/MechBioSeagate1/Data/001/001_000001_023_2014-10-17T1703305049560.bmp
17299 2764 0
/Volumes/MechBioSeagate1/Data/001/001_000001_022_2014-10-17T1703305049560.bmp
18902 5525 0
/Volumes/MechBioSeagate1/Data/001/001_000001_020_2014-10-17T1703305049560.bmp
22099 11052 0
(...)

I used your script to obtain the positions and got the following
AffineTransform[[1.0, 0.0, 20540.0], [0.0, 1.0, 13825.0]]
AffineTransform[[1.0, 0.0, 18902.0], [0.0, 1.0, 5525.0]]
AffineTransform[[1.0, 0.0, 14273.0], [0.0, 1.0, 19378.0]]
AffineTransform[[1.0, 0.0, 22099.0], [0.0, 1.0, 11052.0]]
AffineTransform[[1.0, 0.0, 17425.0], [0.0, 1.0, 19374.0]]
AffineTransform[[1.0, 0.0, 17299.0], [0.0, 1.0, 2764.0]]
(...)


The numbers seem to be correct, from comparing some of the lines:

/Volumes/MechBioSeagate1/Data/001/001_000001_034_2014-10-17T1703305049560.bmp
14273 19378 0
AffineTransform[[1.0, 0.0, 14273.0], [0.0, 1.0, 19378.0]]

/Volumes/MechBioSeagate1/Data/001/001_000001_037_2014-10-17T1703305049560.bmp
20540 13825 0
AffineTransform[[1.0, 0.0, 20540.0], [0.0, 1.0, 13825.0]]

/Volumes/MechBioSeagate1/Data/001/001_000001_023_2014-10-17T1703305049560.bmp
17299 2764 0
AffineTransform[[1.0, 0.0, 17299.0], [0.0, 1.0, 2764.0]]


I used Matlab scripts to plot the coordinates from both and they seem to
overlap correctly.

But I still get an incorrect alignment when visualising it in TrakEM2. By
comparing it to the output of the Grid/collection plugin, a very small
change in position and orientation (some tiles seem to rotate a tiny bit)
is visible.


On 10 March 2015 at 06:25, Albert Cardona <[hidden email]> wrote:

> Andre,
>
> Is there a calibration issue? Please could you post a few lines of the TXT
> file for loading tiles, the expected positions, and the actual positions.
> To obtain the actual positions, select them all and run this jython script:
>
> from ini.trakem2.display import Display
> for patch in Display.getSelected():
>   print patch.getAffineTransform()
>
> Best,
>
> Albert
>
> 2015-03-08 23:26 GMT-04:00 Andre Pereira <[hidden email]>:
>
> > Hi everybody,
> >
> > We are trying to stitch a very large dataset (~90GB) of overlapping
> > images. We used the Grid/collection stitching plugin, which was able to
> > stitch the images correctly in smaller datasets, but we ran into memory
> > problems with the larger ones. We then switched to TrakEM2 which is
> doing a
> > great job at handling the large ones.
> >
> > We are, however, facing a problem with the positioning of the tiles.
> After
> > importing the images using a text file with the coordinates, the tiles
> are
> > not positioned in the exact position. There is a small, but important
> > shift. We verified our coordinates in the text file and they are correct.
> > Our reconstructions with the Grid/collection stitching plugin, for
> > instance, are accurate.
> >
> > Has anyone had this problem before?
> >
> > Thanks for your help!
> >
> > Kind regards,
> > Andre Pereira
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
>
>
> --
> http://albert.rierol.net
> http://www.janelia.org/lab/cardona-lab
> http://www.ini.uzh.ch/~acardona/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html