Issue with OpenCASA settings -- max. displacement units

69 views
Skip to first unread message

Felipe Martínez Pastor

unread,
Oct 25, 2023, 6:48:28 AM10/25/23
to opencasa_mailinglist
Hi,

This is for Jesús and Carlos, but I believe it is also interesting for
the list (maybe already considered here?). In the motility settings, the
"Maximum displacement between frames" is apparently in µm, but according
to my calculations it does not fit. That is, I estimate some maximum
velocity, then calculate the displacement between frames, but if I use
this number, it is too low.

For instance, I capture at 200 frames/s and we assume that the species
max. VCL is 300 µm/s, we get 1.5 µm/frame, but I need to input at least
15-20 to get the tracks correctly analysed. I don't know where the error
is, because if I adjust by the scale and convert to pixels, this is
still too low (about 3 px/frame in my settings).

What is happening here, or maybe I am making a mistake somewhere?

Best wishes,

Felipe



jyaniz

unread,
Oct 26, 2023, 2:58:38 AM10/26/23
to Felipe Martínez Pastor, opencasa_mailinglist
Dear Felipe,

You're right, this doesn't make sense. I don't know what the cause of
the problem is, maybe Carlos has the answer because he wrote the code.
As you said, the parameter is Maximum displacement between frames in
microns, but I've also observed the same seemingly meaningless situation
in my previous analyses.

Best regards,

Jesús
--
Jesús Yániz Pérez de Albéniz
Catedrático de Universidad (Full Professor in Animal Science)
Dpto. Producción Animal y CC. de los Alimentos
Escuela Politécnica Superior de Huesca
Universidad de Zaragoza
Ctra. Cuarte s/n, 22071, Huesca
email: jya...@unizar.es
Phone: 34 974 239 312

Carlos Alquezar

unread,
Oct 26, 2023, 3:49:00 AM10/26/23
to OpenCASA Mailing List
Dear all,
the code seems to be ok. The parameter "Maximum displacement" is used for video recognition at lines 217 and 240 of this piece of code: https://github.com/calquezar/OpenCASA/blob/master/OpenCASA_/src/main/java/functions/VideoRecognition.java

As you will see, the distance is converted into pixels using the microns per pixel ratio. In order to find the cause of the phenomena, I would recommend you to find a track where this happens, download the Raw data of the track (option "Print X-Y coordinates") and manually compute the distance between points.

My guess is that it is due to the high sampling rate, where it is possible that you have the cell static for several frames, and later it moves one or two pixels at the same time. The average VCL could be 300 um/s, but it doesn't mean that the detection of movements is uniform in time.

It is just a hypothesis but it needs to be checked.

Best,
Carlos

jyaniz

unread,
Oct 26, 2023, 4:00:20 AM10/26/23
to Carlos Alquezar, OpenCASA Mailing List
Thanks Carlos, I initially thought the same about the average VCL, but
we are considering the maximum VCL, not the average, for calcultions.
Could you Felipe, or anyone else, test the proposal of Carlos please,
I've no time for this right now.

Regards,

Jesús

El 2023-10-26 09:48, Carlos Alquezar escribió:
> Dear all,
> the code seems to be ok. The parameter "Maximum displacement" is used
> for video recognition at lines 217 and 240 of this piece of code:
> https://github.com/calquezar/OpenCASA/blob/master/OpenCASA_/src/main/java/functions/VideoRecognition.java
> [1]
> --
> You received this message because you are subscribed to the Google
> Groups "OpenCASA Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opencasa_mailing...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/opencasa_mailinglist/d1a11423-2718-445b-a64c-5b36836ebcf4n%40googlegroups.com
> [2].
>
>
> Links:
> ------
> [1]
> https://urldefense.com/v3/__https://github.com/calquezar/OpenCASA/blob/master/OpenCASA_/src/main/java/functions/VideoRecognition.java__;!!D9dNQwwGXtA!WI70ZqPPNIzTBYYu6mffmSF8omwwX-Sjndpczna5YkB2uT2UwTPS1mlUjyJCH0hcHX9cCvW25ojcGOwJZT8i$
> [2]
> https://urldefense.com/v3/__https://groups.google.com/d/msgid/opencasa_mailinglist/d1a11423-2718-445b-a64c-5b36836ebcf4n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!D9dNQwwGXtA!WI70ZqPPNIzTBYYu6mffmSF8omwwX-Sjndpczna5YkB2uT2UwTPS1mlUjyJCH0hcHX9cCvW25ojcGNByCKVi$

Carlos Alquezar

unread,
Oct 26, 2023, 4:09:23 AM10/26/23
to OpenCASA Mailing List
Hi Jesus,
What do you mean by VCL max?  You mean that you select the track with maximum VCL?

The phenomena I am mentioning is done inside a single track, between frames. This is not possible to be seen just analysing the VCL of the whole track. Sorry if I didn't explain it properly, but in my previous post, when I mentioned "average VCL" I was talking about the computation of the VCL for the whole track, but what I am pointing, is that there are irregularities in the displacement along the time in the trajectory of the cells (due to the sampling rate, but also due to the change of the center of mass of the detected cell because of the noise in the image processing steps, ....).

I think that there could be your answers.
Tell me if you check it.

Best,
Carlos

jyaniz

unread,
Oct 26, 2023, 4:09:25 AM10/26/23
to jyaniz, Carlos Alquezar, OpenCASA Mailing List
But even considering the maximum VCL, this is calculated for the entire
trajectory of a given sperm. You are right Carlos that the cause may be
the absence of uniform movement of the sperm along its trajectory,
something that must be checked.

El 2023-10-26 10:01, 'jyaniz' via OpenCASA Mailing List escribió:
> Thanks Carlos, I initially thought the same about the average VCL, but
> we are considering the maximum VCL, not the average, for calcultions.
> Could you Felipe, or anyone else, test the proposal of Carlos please,
> I've no time for this right now.
>
> Regards,
>
> Jesús
>
> El 2023-10-26 09:48, Carlos Alquezar escribió:
>> Dear all,
>> the code seems to be ok. The parameter "Maximum displacement" is used
>> for video recognition at lines 217 and 240 of this piece of code:
>> https://urldefense.com/v3/__https://github.com/calquezar/OpenCASA/blob/master/OpenCASA_/src/main/java/functions/VideoRecognition.java__;!!D9dNQwwGXtA!XBRIyarKNKb0Rk7qX9REVVBLlYGhTbd3_oAu5Tw9KKEZZ95txKZyy63Lij6CybaHEvlQxz7IdcV09cdZ3Z1mh7FQEAwpqMxY$
>> https://urldefense.com/v3/__https://groups.google.com/d/msgid/opencasa_mailinglist/d1a11423-2718-445b-a64c-5b36836ebcf4n*40googlegroups.com__;JQ!!D9dNQwwGXtA!XBRIyarKNKb0Rk7qX9REVVBLlYGhTbd3_oAu5Tw9KKEZZ95txKZyy63Lij6CybaHEvlQxz7IdcV09cdZ3Z1mh7FQEMCKXun-$

Felipe Martínez Pastor

unread,
Oct 26, 2023, 4:15:28 AM10/26/23
to opencasa_m...@googlegroups.com
Thank you Carlos. I was also planning to explore the code (no idea of
Java, but I believe I can understand what it does), so I tossed the
question and you have been much helpful directing us to the specific
part of the code. Quite busy right now, but I'm marking your response as
"to do" and I hope I could explore it in the near future.
Best wishes,
Felipe


El 26/10/23 a las 10:10, 'jyaniz' via OpenCASA Mailing List escribió:
----------------------------oOo----------------------------
Felipe Martínez Pastor
Research in Biology of Reproduction
Biología Celular
Facultad de CC. Biológicas y Ambientales
Universidad de León
Campus de Vegazana
24071-León
Tfno.: +34 987 291 491
Móvil: +34 687 365 362
e-mail: felipe....@unileon.es
web: http://reprobio.unileon.es
profiles:
https://www.researchgate.net/profile/Felipe_Martinez-Pastor
http://orcid.org/0000-0001-9184-8581
http://www.researcherid.com/rid/B-4277-2008
------------------------------------------------------------

Aviso de confidencialidad https://www.unileon.es/mail-disclaimer/20180525
Confidentiality Notice https://www.unileon.es/mail-disclaimer/20180525

Reply all
Reply to author
Forward
0 new messages