registration of two channels with beads reference help please

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

registration of two channels with beads reference help please

Cammer, Michael
We are looking for a solution to a registration problem and would appreciate help.

At the beginning of each timelapse sequence, we take images of multicolor beads as a reference.  We would like to have the reference image registered and apply the parameters for the registration to about 20 other 2 channel timelapse files.  We expect that we would need five points to do the correction, one from each corner and one from the center.  The initial registration could involve the user clicking on coincident spots or could be automatic.  While we would prefer to keep the original 16 bit depth, we could make do with 8 bits.

An example beads picture is at http://microscopynotes.com/temp/AVG_20171214_beads.tif  (In the future we will try to use smaller beads.)

Any help appreciated.

Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016
C: 914-309-3270  [hidden email]<mailto:[hidden email]>  http://nyulmc.org/micros  http://microscopynotes.com/



------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: registration of two cha nnels with beads reference help please

Kenneth Sloan-2
What sort of transformation do you expect to need to get from the reference image to the others?

If just TRANSLATION, then you only need one pair of landmarks.

If TRANSLATION + ROTATION, then you need two pairs.

If TRANSLATION + ROTATION + UNIFORM SCALING, then you might still get away with 2

If you have differential scaling in X and Y, then you need 3

If you have local warping of the material being imaged, you need "many".

The traditional approach is to express the transformation as a 3x3 matrix.  You need a small collection of
primitive transforms, which you compose to get from one image to the others.  

There may be an existing plugin that will do this for you, but I suspect there is no exact fit, so you may have to roll your own.  My preference is always to write a custom Java plugin.

My current approach (using 3 pairs of landmarks) is to treat the 3 points (a,b,c) in each image as a "barycentric coordinate system".  In this scheme, any point in the image plane can be represented by three numbers:

u,v,w st. P = uA + vB + wC, u+v+w=1.0

To tranform a point in the "other" image to the reference image coordinate system, I generally iterate over all pixels in the reference image, tranform the [x,y] location to the "other" coordinate system, and sample the image there.  Anti-aliasing is optional.

I have a Java class called "Barycentric" which provides helper functions - if it would be helpful to you, just ask.

The top level code looks a little bit like:

Barycentric reference = new Barycentric(aReference,bReference,cReference);
Barycentric other = new Barycentric(aOther,bOther,cOther);
for(int y=0;y<heightReference;y++)
 for(int x=0;x<widthReference;x++)
        {
          double[]xyReference = {x,y};
          double[]uvw = reference.toUVW(x,y);
          double[]xyOther = other.toXY(uvw);
          Pixel pixel = Sample(OtherImage,xyOther);
          newOtherImage.put(x,y,pixel);
        }


You could package this up into a method such as:

   newOtherImage = Resample(referenceImage, otherImage,
                             aReference, bReference, cReference, aOther, bOther, cOther);

The traditional 3x3 matrix view of transformations allows you to enforce constraints on the type of transformation.  In my most recent implementation of this process, I gather only 1 pair of landmarks if I want to limit the transformation to TRANSLATION, and 2 landmarks if I want to limit it to TRANSLATION, ROTATION, and  UNIFORM SCALING.  [I invent the other 2 landmark pairs in the above 2 cases]


--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On 23 Jan 2018, at 13:42 , Cammer, Michael <[hidden email]> wrote:
>
> We are looking for a solution to a registration problem and would appreciate help.
>
> At the beginning of each timelapse sequence, we take images of multicolor beads as a reference.  We would like to have the reference image registered and apply the parameters for the registration to about 20 other 2 channel timelapse files.  We expect that we would need five points to do the correction, one from each corner and one from the center.  The initial registration could involve the user clicking on coincident spots or could be automatic.  While we would prefer to keep the original 16 bit depth, we could make do with 8 bits.
>
> An example beads picture is at http://microscopynotes.com/temp/AVG_20171214_beads.tif  (In the future we will try to use smaller beads.)
>
> Any help appreciated.
>
> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
> NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016
> C: 914-309-3270  [hidden email]<mailto:[hidden email]>  http://nyulmc.org/micros  http://microscopynotes.com/
>
>
>
> ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> =================================
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: registration of two cha nnels with beads reference help please

Cammer, Michael
Thank you for the detailed answer.

It appears that UnWarpJ does an excellent job with the beads.  We don't see, however, how to apply the coefficients file to other images except by command line.  Perhaps all we need is a tip how to do this from the macro language so we can apply this file to a stack or thousands of images we can have in a directory that we could reassemble as a stack after processing.
Since then we see that Fiji comes bundled with BUnwarpJ which may have a way of applying the matrix to a series of images.
Has anyone successfully done this?


Michael C




-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Kenneth Sloan
Sent: Tuesday, January 23, 2018 3:53 PM
To: [hidden email]
Subject: Re: registration of two cha nnels with beads reference help please

What sort of transformation do you expect to need to get from the reference image to the others?

If just TRANSLATION, then you only need one pair of landmarks.

If TRANSLATION + ROTATION, then you need two pairs.

If TRANSLATION + ROTATION + UNIFORM SCALING, then you might still get away with 2

If you have differential scaling in X and Y, then you need 3

If you have local warping of the material being imaged, you need "many".

The traditional approach is to express the transformation as a 3x3 matrix.  You need a small collection of primitive transforms, which you compose to get from one image to the others.  

There may be an existing plugin that will do this for you, but I suspect there is no exact fit, so you may have to roll your own.  My preference is always to write a custom Java plugin.

My current approach (using 3 pairs of landmarks) is to treat the 3 points (a,b,c) in each image as a "barycentric coordinate system".  In this scheme, any point in the image plane can be represented by three numbers:

u,v,w st. P = uA + vB + wC, u+v+w=1.0

To tranform a point in the "other" image to the reference image coordinate system, I generally iterate over all pixels in the reference image, tranform the [x,y] location to the "other" coordinate system, and sample the image there.  Anti-aliasing is optional.

I have a Java class called "Barycentric" which provides helper functions - if it would be helpful to you, just ask.

The top level code looks a little bit like:

Barycentric reference = new Barycentric(aReference,bReference,cReference);
Barycentric other = new Barycentric(aOther,bOther,cOther);
for(int y=0;y<heightReference;y++)
 for(int x=0;x<widthReference;x++)
        {
          double[]xyReference = {x,y};
          double[]uvw = reference.toUVW(x,y);
          double[]xyOther = other.toXY(uvw);
          Pixel pixel = Sample(OtherImage,xyOther);
          newOtherImage.put(x,y,pixel);
        }


You could package this up into a method such as:

   newOtherImage = Resample(referenceImage, otherImage,
                             aReference, bReference, cReference, aOther, bOther, cOther);

The traditional 3x3 matrix view of transformations allows you to enforce constraints on the type of transformation.  In my most recent implementation of this process, I gather only 1 pair of landmarks if I want to limit the transformation to TRANSLATION, and 2 landmarks if I want to limit it to TRANSLATION, ROTATION, and  UNIFORM SCALING.  [I invent the other 2 landmark pairs in the above 2 cases]


--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On 23 Jan 2018, at 13:42 , Cammer, Michael <[hidden email]> wrote:
>
> We are looking for a solution to a registration problem and would appreciate help.
>
> At the beginning of each timelapse sequence, we take images of multicolor beads as a reference.  We would like to have the reference image registered and apply the parameters for the registration to about 20 other 2 channel timelapse files.  We expect that we would need five points to do the correction, one from each corner and one from the center.  The initial registration could involve the user clicking on coincident spots or could be automatic.  While we would prefer to keep the original 16 bit depth, we could make do with 8 bits.
>
> An example beads picture is at
> https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.co
> m_temp_AVG-5F20171214-5Fbeads.tif&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBG
> muw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg
> 9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNBt0v9QI&s=slOJXNa9JzMmgGtKVPI4lIaDYkr
> FBS_nAiQF-zmdwQc&e=  (In the future we will try to use smaller beads.)
>
> Any help appreciated.
>
> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory NYU
> Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  
> 10016
> C: 914-309-3270  
> [hidden email]<mailto:[hidden email]>  
> https://urldefense.proofpoint.com/v2/url?u=http-3A__nyulmc.org_micros&
> d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAy
> dlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNB
> t0v9QI&s=bav6su2yZAzjIsqcqm60FYsyjoZhxCoyZ6Rd3P9fU8g&e=  
> https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.co
> m_&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNs
> tAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOc
> MNBt0v9QI&s=umMtdgsIKLMLgnm1e-toqst08z1nQI9sUp0IkwPaaXw&e=
>
>
>
> ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> =================================
>
> --
> ImageJ mailing list:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_
> list.html&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_
> 05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw
> 4idQbOcMNBt0v9QI&s=IfXgnP7IB1wljqQ98AiT0sQf3IXzb3XqbDECbocoh5k&e=

--
ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNBt0v9QI&s=IfXgnP7IB1wljqQ98AiT0sQf3IXzb3XqbDECbocoh5k&e=

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: registration of two cha nnels with beads reference help please

Jacob Keller-2
In reply to this post by Kenneth Sloan-2
The plugin "descriptor-based series registration" works well for me, and
was designed for what I think you are doing. I think it also has a way just
to apply the transform after having derived it.

All the best,

Jacob Keller

On Tue, Jan 23, 2018 at 3:53 PM, Kenneth Sloan <[hidden email]>
wrote:

> What sort of transformation do you expect to need to get from the
> reference image to the others?
>
> If just TRANSLATION, then you only need one pair of landmarks.
>
> If TRANSLATION + ROTATION, then you need two pairs.
>
> If TRANSLATION + ROTATION + UNIFORM SCALING, then you might still get away
> with 2
>
> If you have differential scaling in X and Y, then you need 3
>
> If you have local warping of the material being imaged, you need "many".
>
> The traditional approach is to express the transformation as a 3x3
> matrix.  You need a small collection of
> primitive transforms, which you compose to get from one image to the
> others.
>
> There may be an existing plugin that will do this for you, but I suspect
> there is no exact fit, so you may have to roll your own.  My preference is
> always to write a custom Java plugin.
>
> My current approach (using 3 pairs of landmarks) is to treat the 3 points
> (a,b,c) in each image as a "barycentric coordinate system".  In this
> scheme, any point in the image plane can be represented by three numbers:
>
> u,v,w st. P = uA + vB + wC, u+v+w=1.0
>
> To tranform a point in the "other" image to the reference image coordinate
> system, I generally iterate over all pixels in the reference image,
> tranform the [x,y] location to the "other" coordinate system, and sample
> the image there.  Anti-aliasing is optional.
>
> I have a Java class called "Barycentric" which provides helper functions -
> if it would be helpful to you, just ask.
>
> The top level code looks a little bit like:
>
> Barycentric reference = new Barycentric(aReference,bReference,cReference);
> Barycentric other = new Barycentric(aOther,bOther,cOther);
> for(int y=0;y<heightReference;y++)
>  for(int x=0;x<widthReference;x++)
>         {
>           double[]xyReference = {x,y};
>           double[]uvw = reference.toUVW(x,y);
>           double[]xyOther = other.toXY(uvw);
>           Pixel pixel = Sample(OtherImage,xyOther);
>           newOtherImage.put(x,y,pixel);
>         }
>
>
> You could package this up into a method such as:
>
>    newOtherImage = Resample(referenceImage, otherImage,
>                              aReference, bReference, cReference, aOther,
> bOther, cOther);
>
> The traditional 3x3 matrix view of transformations allows you to enforce
> constraints on the type of transformation.  In my most recent
> implementation of this process, I gather only 1 pair of landmarks if I want
> to limit the transformation to TRANSLATION, and 2 landmarks if I want to
> limit it to TRANSLATION, ROTATION, and  UNIFORM SCALING.  [I invent the
> other 2 landmark pairs in the above 2 cases]
>
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
>
>
>
>
> > On 23 Jan 2018, at 13:42 , Cammer, Michael <[hidden email]>
> wrote:
> >
> > We are looking for a solution to a registration problem and would
> appreciate help.
> >
> > At the beginning of each timelapse sequence, we take images of
> multicolor beads as a reference.  We would like to have the reference image
> registered and apply the parameters for the registration to about 20 other
> 2 channel timelapse files.  We expect that we would need five points to do
> the correction, one from each corner and one from the center.  The initial
> registration could involve the user clicking on coincident spots or could
> be automatic.  While we would prefer to keep the original 16 bit depth, we
> could make do with 8 bits.
> >
> > An example beads picture is at http://microscopynotes.com/
> temp/AVG_20171214_beads.tif  (In the future we will try to use smaller
> beads.)
> >
> > Any help appreciated.
> >
> > Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
> > NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York,
> NY  10016
> > C: 914-309-3270  [hidden email]<mailto:
> [hidden email]>  http://nyulmc.org/micros
> http://microscopynotes.com/
> >
> >
> >
> > ------------------------------------------------------------
> > This email message, including any attachments, is for the sole use of
> the intended recipient(s) and may contain information that is proprietary,
> confidential, and exempt from disclosure under applicable law. Any
> unauthorized review, use, disclosure, or distribution is prohibited. If you
> have received this email in error please notify the sender by return email
> and delete the original message. Please note, the recipient should check
> this email and any attachments for the presence of viruses. The
> organization accepts no liability for any damage caused by any virus
> transmitted by this email.
> > =================================
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: registration of two cha nnels with beads reference help please

CARL Philippe (LBP)
In reply to this post by Cammer, Michael
Dear Michael,
Maybe you should have a look at the discussion I had on a similar topic more than one year ago and that can find under the following link:
http://forum.imagej.net/t/unwarpj-scripting-documentation/2939/3
My best regards,
Philippe

Le Mardi 23 Janvier 2018 21:59 CET, "Cammer, Michael" <[hidden email]> a écrit:

> Thank you for the detailed answer.
>
> It appears that UnWarpJ does an excellent job with the beads.  We don't see, however, how to apply the coefficients file to other images except by command line.  Perhaps all we need is a tip how to do this from the macro language so we can apply this file to a stack or thousands of images we can have in a directory that we could reassemble as a stack after processing.
> Since then we see that Fiji comes bundled with BUnwarpJ which may have a way of applying the matrix to a series of images.
> Has anyone successfully done this?
>
>
> Michael C
>
>
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Kenneth Sloan
> Sent: Tuesday, January 23, 2018 3:53 PM
> To: [hidden email]
> Subject: Re: registration of two cha nnels with beads reference help please
>
> What sort of transformation do you expect to need to get from the reference image to the others?
>
> If just TRANSLATION, then you only need one pair of landmarks.
>
> If TRANSLATION + ROTATION, then you need two pairs.
>
> If TRANSLATION + ROTATION + UNIFORM SCALING, then you might still get away with 2
>
> If you have differential scaling in X and Y, then you need 3
>
> If you have local warping of the material being imaged, you need "many".
> The traditional approach is to express the transformation as a 3x3 matrix.  You need a small collection of primitive transforms, which you compose to get from one image to the others.
> There may be an existing plugin that will do this for you, but I suspect there is no exact fit, so you may have to roll your own.  My preference is always to write a custom Java plugin.
>
> My current approach (using 3 pairs of landmarks) is to treat the 3 points (a,b,c) in each image as a "barycentric coordinate system".  In this scheme, any point in the image plane can be represented by three numbers:
>
> u,v,w st. P = uA + vB + wC, u+v+w=1.0
>
> To tranform a point in the "other" image to the reference image coordinate system, I generally iterate over all pixels in the reference image, tranform the [x,y] location to the "other" coordinate system, and sample the image there.  Anti-aliasing is optional.
>
> I have a Java class called "Barycentric" which provides helper functions - if it would be helpful to you, just ask.
>
> The top level code looks a little bit like:
>
> Barycentric reference = new Barycentric(aReference,bReference,cReference);
> Barycentric other = new Barycentric(aOther,bOther,cOther);
> for(int y=0;y<heightReference;y++)
>  for(int x=0;x<widthReference;x++)
> {
>           double[]xyReference = {x,y};  double[]uvw = reference.toUVW(x,y);          double[]xyOther = other.toXY(uvw);
>           Pixel pixel = Sample(OtherImage,xyOther);
>           newOtherImage.put(x,y,pixel);
> }
>
> You could package this up into a method such as:
>
>    newOtherImage = Resample(referenceImage, otherImage,                              aReference, bReference, cReference, aOther, bOther, cOther);
>
> The traditional 3x3 matrix view of transformations allows you to enforce constraints on the type of transformation.  In my most recent implementation of this process, I gather only 1 pair of landmarks if I want to limit the transformation to TRANSLATION, and 2 landmarks if I want to limit it to TRANSLATION, ROTATION, and  UNIFORM SCALING.  [I invent the other 2 landmark pairs in the above 2 cases]
>
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
>
>
>
>
> > On 23 Jan 2018, at 13:42 , Cammer, Michael <[hidden email]> wrote:
> > > We are looking for a solution to a registration problem and would appreciate help.
> > > At the beginning of each timelapse sequence, we take images of multicolor beads as a reference.  We would like to have the reference image registered and apply the parameters for the registration to about 20 other 2 channel timelapse files.  We expect that we would need five points to do the correction, one from each corner and one from the center.  The initial registration could involve the user clicking on coincident spots or could be automatic.  While we would prefer to keep the original 16 bit depth, we could make do with 8 bits.
> > > An example beads picture is at > https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.co
> > m_temp_AVG-5F20171214-5Fbeads.tif&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBG
> > muw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg
> > 9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNBt0v9QI&s=slOJXNa9JzMmgGtKVPI4lIaDYkr
> > FBS_nAiQF-zmdwQc&e=  (In the future we will try to use smaller beads.)
> > > Any help appreciated.
> > > Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory NYU > Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  > 10016
> > C: 914-309-3270  > [hidden email]<mailto:[hidden email]>  > https://urldefense.proofpoint.com/v2/url?u=http-3A__nyulmc.org_micros&
> > d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAy
> > dlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNB
> > t0v9QI&s=bav6su2yZAzjIsqcqm60FYsyjoZhxCoyZ6Rd3P9fU8g&e=  > https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.co
> > m_&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNs
> > tAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOc
> > MNBt0v9QI&s=umMtdgsIKLMLgnm1e-toqst08z1nQI9sUp0IkwPaaXw&e=
> > > > > ------------------------------------------------------------

> > This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> > =================================
> > > --
> > ImageJ mailing list: > https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_
> > list.html&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_
> > 05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw
> > 4idQbOcMNBt0v9QI&s=IfXgnP7IB1wljqQ98AiT0sQf3IXzb3XqbDECbocoh5k&e=
>
> --
> ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNBt0v9QI&s=IfXgnP7IB1wljqQ98AiT0sQf3IXzb3XqbDECbocoh5k&e=
>
> ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> =================================
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html





--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: registration of two cha nnels with beads reference help please

Stephan.Preibisch@mdc-berlin.de
Hi, my Descriptor-based registration (Plugins > Registration) should be perfect and straight forward. If not, feel free to send me a sample and I’ll share the right parameters to use.

Cheers,
Stephan


---

Dr. Stephan Preibisch
Group Leader

Berlin Institute for Medical Systems Biology (BIMSB), Max Delbrück Center for Molecular Medicine (MDC)
Building 89, 1.08b
Robert-Rössle-Str. 10
13125 Berlin

email: [hidden email]<mailto:[hidden email]>
web: http://preibischlab.mdc-berlin.de
twitter: http://twitter.com/preibischs

On Jan 23, 2018, at 11:38 PM, CARL Philippe (PHA) <[hidden email]<mailto:[hidden email]>> wrote:

Dear Michael,
Maybe you should have a look at the discussion I had on a similar topic more than one year ago and that can find under the following link:
http://forum.imagej.net/t/unwarpj-scripting-documentation/2939/3
My best regards,
Philippe

Le Mardi 23 Janvier 2018 21:59 CET, "Cammer, Michael" <[hidden email]> a écrit:

Thank you for the detailed answer.

It appears that UnWarpJ does an excellent job with the beads.  We don't see, however, how to apply the coefficients file to other images except by command line.  Perhaps all we need is a tip how to do this from the macro language so we can apply this file to a stack or thousands of images we can have in a directory that we could reassemble as a stack after processing.
Since then we see that Fiji comes bundled with BUnwarpJ which may have a way of applying the matrix to a series of images.
Has anyone successfully done this?


Michael C




-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Kenneth Sloan
Sent: Tuesday, January 23, 2018 3:53 PM
To: [hidden email]
Subject: Re: registration of two cha nnels with beads reference help please

What sort of transformation do you expect to need to get from the reference image to the others?

If just TRANSLATION, then you only need one pair of landmarks.

If TRANSLATION + ROTATION, then you need two pairs.

If TRANSLATION + ROTATION + UNIFORM SCALING, then you might still get away with 2

If you have differential scaling in X and Y, then you need 3

If you have local warping of the material being imaged, you need "many".
The traditional approach is to express the transformation as a 3x3 matrix.  You need a small collection of primitive transforms, which you compose to get from one image to the others.
There may be an existing plugin that will do this for you, but I suspect there is no exact fit, so you may have to roll your own.  My preference is always to write a custom Java plugin.

My current approach (using 3 pairs of landmarks) is to treat the 3 points (a,b,c) in each image as a "barycentric coordinate system".  In this scheme, any point in the image plane can be represented by three numbers:

u,v,w st. P = uA + vB + wC, u+v+w=1.0

To tranform a point in the "other" image to the reference image coordinate system, I generally iterate over all pixels in the reference image, tranform the [x,y] location to the "other" coordinate system, and sample the image there.  Anti-aliasing is optional.

I have a Java class called "Barycentric" which provides helper functions - if it would be helpful to you, just ask.

The top level code looks a little bit like:

Barycentric reference = new Barycentric(aReference,bReference,cReference);
Barycentric other = new Barycentric(aOther,bOther,cOther);
for(int y=0;y<heightReference;y++)
for(int x=0;x<widthReference;x++)
{
         double[]xyReference = {x,y};  double[]uvw = reference.toUVW(x,y);          double[]xyOther = other.toXY(uvw);
         Pixel pixel = Sample(OtherImage,xyOther);
         newOtherImage.put(x,y,pixel);
}

You could package this up into a method such as:

  newOtherImage = Resample(referenceImage, otherImage,                              aReference, bReference, cReference, aOther, bOther, cOther);

The traditional 3x3 matrix view of transformations allows you to enforce constraints on the type of transformation.  In my most recent implementation of this process, I gather only 1 pair of landmarks if I want to limit the transformation to TRANSLATION, and 2 landmarks if I want to limit it to TRANSLATION, ROTATION, and  UNIFORM SCALING.  [I invent the other 2 landmark pairs in the above 2 cases]


--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





On 23 Jan 2018, at 13:42 , Cammer, Michael <[hidden email]> wrote:
We are looking for a solution to a registration problem and would appreciate help.
At the beginning of each timelapse sequence, we take images of multicolor beads as a reference.  We would like to have the reference image registered and apply the parameters for the registration to about 20 other 2 channel timelapse files.  We expect that we would need five points to do the correction, one from each corner and one from the center.  The initial registration could involve the user clicking on coincident spots or could be automatic.  While we would prefer to keep the original 16 bit depth, we could make do with 8 bits.
An example beads picture is at > https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.co
m_temp_AVG-5F20171214-5Fbeads.tif&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBG
muw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg
9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNBt0v9QI&s=slOJXNa9JzMmgGtKVPI4lIaDYkr
FBS_nAiQF-zmdwQc&e=  (In the future we will try to use smaller beads.)
Any help appreciated.
Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory NYU > Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  > 10016
C: 914-309-3270  > [hidden email]<mailto:[hidden email]>  > https://urldefense.proofpoint.com/v2/url?u=http-3A__nyulmc.org_micros&
d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAy
dlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNB
t0v9QI&s=bav6su2yZAzjIsqcqm60FYsyjoZhxCoyZ6Rd3P9fU8g&e=  > https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.co
m_&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNs
tAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOc
MNBt0v9QI&s=umMtdgsIKLMLgnm1e-toqst08z1nQI9sUp0IkwPaaXw&e=
------------------------------------------------------------

This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================
--
ImageJ mailing list: > https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_
list.html&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_
05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw
4idQbOcMNBt0v9QI&s=IfXgnP7IB1wljqQ98AiT0sQf3IXzb3XqbDECbocoh5k&e=

--
ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwIFAg&c=j5oPpO0eBH1iio48DtsedbOBGmuw5jHLjgvtN2r4ehE&r=oU_05LztNstAydlbm5L5GDu_vAdjXk3frDLx_CqKkuo&m=gXg9J2_UuZ3xRKA4lEpKD2q7erw4idQbOcMNBt0v9QI&s=IfXgnP7IB1wljqQ98AiT0sQf3IXzb3XqbDECbocoh5k&e=

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

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





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


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