Discussion:
[Gwyddion-users] How to do affine correction for images with irregular patterns?
Shi Choong
2016-06-29 13:48:52 UTC
Permalink
Hello,

I have some AFM images and I am suspecting some form of distortion, most likely skew. I know there is a Affine function to correct such distortion but my images have irregular pattern and I do not know what could I do to correct this distortion. I have collected two images (continuously scanned) of the same area, if this info is helpful. Please advise. Thanks.

Shi
David Nečas (Yeti)
2016-06-29 15:05:52 UTC
Permalink
On Wed, Jun 29, 2016 at 01:48:52PM +0000, Shi Choong wrote:
> I have some AFM images and I am suspecting some form of distortion,
> most likely skew. I know there is a Affine function to correct such
> distortion but my images have irregular pattern and I do not know what
> could I do to correct this distortion. I have collected two images
> (continuously scanned) of the same area, if this info is helpful.

The drift correction based on correlation of points in subsequent
scans is not yet available in Gwyddion, sorry. A third-party module was
implemented AFAIK by people at University of Kiel, but I do not know if
it is publicly available – it does not seem so.

Regards,

Yeti
Shi Choong
2016-06-29 15:33:37 UTC
Permalink
Thank you Yeti. That's a bummer. So if I'm understanding this correctly, Affine is only suitable for surface with regular patterns. And for my case with irregular pattern, I cannot use this data processing technique, whether if it is based on a single image or two subsequent images. Right?

Shi

Sent from my iPhone

> On Jun 29, 2016, at 11:06 AM, David Nečas (Yeti) <***@gwyddion.net> wrote:
>
>> On Wed, Jun 29, 2016 at 01:48:52PM +0000, Shi Choong wrote:
>> I have some AFM images and I am suspecting some form of distortion,
>> most likely skew. I know there is a Affine function to correct such
>> distortion but my images have irregular pattern and I do not know what
>> could I do to correct this distortion. I have collected two images
>> (continuously scanned) of the same area, if this info is helpful.
>
> The drift correction based on correlation of points in subsequent
> scans is not yet available in Gwyddion, sorry. A third-party module was
> implemented AFAIK by people at University of Kiel, but I do not know if
> it is publicly available – it does not seem so.
>
> Regards,
>
> Yeti
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Gwyddion-users mailing list
> Gwyddion-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gwyddion-users
David Nečas (Yeti)
2016-06-29 18:19:33 UTC
Permalink
On Wed, Jun 29, 2016 at 03:33:37PM +0000, Shi Choong wrote:
> So if I'm understanding this correctly, Affine is only suitable for
> surface with regular patterns. And for my case with irregular
> pattern, I cannot use this data processing technique, whether if it is
> based on a single image or two subsequent images. Right?

There is the single-image Drift correction function which only attempts
to correct drift along the fast scan axis. But otherwise you are right.

Regards,

Yeti
Mathias Müller
2016-07-24 12:31:37 UTC
Permalink
On 0, "David Nečas (Yeti)" <***@gwyddion.net> wrote:
> On Wed, Jun 29, 2016 at 01:48:52PM +0000, Shi Choong wrote:
> > I have some AFM images and I am suspecting some form of distortion,
> > most likely skew. I know there is a Affine function to correct such
> > distortion but my images have irregular pattern and I do not know what
> > could I do to correct this distortion. I have collected two images
> > (continuously scanned) of the same area, if this info is helpful.
>
> The drift correction based on correlation of points in subsequent
> scans is not yet available in Gwyddion, sorry. A third-party module was
> implemented AFAIK by people at University of Kiel, but I do not know if
> it is publicly available – it does not seem so.
>
> Regards,
>
> Yeti

Hello Yeti and Shi Choong,

even though I left science, I still read from time to time the gwyddion mailing-list.
I am still curious how this project develops.

Yeti, before I left my lab/office in 2015 I send the sources of this drift correction module to you via e-mail.
Maybe you still store it somewhere. As far as I remember you had no time or energy to implement/adopt the code.
We also had a discussion in terms of different coding styles or unknown potential issues when implementing.

However, it seems that this module is really worth implementing. It runs out of the box and so far it did not
show any memory leaks. Not only me but many students and collegues of mine worked efficiently with this software.


Maybe you should give it a try to implement it as a permanent module. Since AFM images often deal with irregular
patterns this might be a useful tool.


Cheers

--
Dr. Mathias Müller
David Nečas (Yeti)
2016-07-24 17:52:18 UTC
Permalink
On Sun, Jul 24, 2016 at 02:31:37PM +0200, Mathias Müller wrote:
> Yeti, before I left my lab/office in 2015 I send the sources of this
> drift correction module to you via e-mail.
> Maybe you still store it somewhere. As far as I remember you had no
> time or energy to implement/adopt the code.

Yes, of course I still have it and also have it in my TODO.

> We also had a discussion in terms of different coding styles or
> unknown potential issues when implementing.

I am not able (or willing) to maintain and support the module in its
current state. But then, who will?

If your [former] lab maked the module publicly available I could point
people to it. That would be the best solution for the moment. Everyone
who is happy with the module could use it while I was figuring out a
better way to provide the same functionality (without the need for
manual selection for start).

> However, it seems that this module is really worth implementing. It
> runs out of the box and so far it did not show any memory leaks. Not
> only me but many students and collegues of mine worked efficiently
> with this software.

I agree completely the functionality is worth implementing.

It is not useful to repeat here all the technical points about the use
of GtkBuild, functional code inside assertions, the GUI, ... I would
simply have to rewrite it substantially as the first step in any case.
Please accept as a fact there is no ‘just add driftcorrection.c to the
modules directory’ option.

Regards,

Yeti
Loading...