Issue detecting a white mouse on a bright background

1,078 views
Skip to first unread message

Lora Martucci

unread,
Apr 16, 2019, 11:26:30 AM4/16/19
to Icy imaging
Hello, 

I am performing analysis of social tasks with mice profiler with two mice freely interacting together. 
There is very low contrast with my white mice and the background so mice profiler can't manage the tracking at all... Is there a parameter allowing a better mouse detection I can use ? 

Thank you in advance

Bob

unread,
Apr 16, 2019, 8:50:27 PM4/16/19
to Icy imaging
Hi Lora Martucci,
What format are the images in, if I may ask. There is a possible way to show the interaction of the mice but not the background.
Let me know so I may explain better if it is possible.
Bob

Lora Martucci

unread,
Apr 17, 2019, 4:08:33 AM4/17/19
to Icy imaging
Hi Bob, 

Thank you for your answer. 

I am using a video file in .AVI format. I send in attached a screenshot with two videos : on top, the analyzis video with the mice profiler trackers on the mice and bellow, the video without the trackers to have a better look on mice. 

The quality is low (320 x 240) because with a higher quality (640 x 480), mice profiler can't run the video properly. I wonder if I can "help" mice profiler with a quick treatment on videos to better detect the mice to enable a better tracking because for now, I need to replace the tracking axis frame by frame... 

Thank you for your help

Lora 
Image mice profiler.PNG

Robert Smith

unread,
Apr 17, 2019, 8:18:42 AM4/17/19
to icy-so...@googlegroups.com
Hi Lora,
O.K. all looks good. I am not very good at explaining so please follow along with patience.
ICY and ImageJ use two different processing formats so you may have to convert back and forth for this procedure. I know that they are both packaged together, but it could be worse situation.
Use the ImageJ tool to open your video file. It should load as a stack. Using the ImageJ tool go to Image > Stacks > Tools > Slice Keeper.  Choose a Frame of the video without the mice at all or not moving at all and keep it using perimeters of Frame number as both the start and stop images with a step of 2.
Then (still using ImageJ tool) go to Process > Image Calculator > use the frame shot you kept from above in Image 1 and the ENTIRE video stack in Image 2 and use the 'Difference' as the operation setting and run it.
That will give you a video with the only thing that should be visible is the mice themselves as they move about. Then switch back to ICY for any further processing you deem necessary.
You may have to try a couple of times but keep at it. Do not be surprised if you can even tell whiskers twitching or a breeze moving some of the bedding because this procedure is very sensitive.
I truly hope you understand this, but if not keep asking me until we get it right.
Good Luck,
Bob



From: icy-so...@googlegroups.com <icy-so...@googlegroups.com> on behalf of Lora Martucci <martuc...@gmail.com>
Sent: Wednesday, April 17, 2019 4:08 AM
To: Icy imaging
Subject: [icy] Re: Issue detecting a white mouse on a bright background
 
--
You received this message because you are subscribed to the Google Groups "Icy imaging" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icy-software...@googlegroups.com.
To post to this group, send email to icy-so...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/icy-software/cd551ef3-1d95-464c-8a94-ee751eb0bccb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lora Martucci

unread,
Apr 19, 2019, 5:25:16 AM4/19/19
to Icy imaging
Hi Bob, 

Thank you for your advices, this is a very good idea. 

I didn't manage to test it because ImageJ doesn't read the AVI files... I spend a lot of time in forum to find a solution but nothing works for now... I tried to install the AVI READER plugin but it didn't work. I also tried to use the "ffmpeg" suggested in many forum but it can't convert video to AVI (wich seems to be the only format supported by MiceProfiler). 

Did you already have this kind of issue ? 

Best wishes 

Lora
To unsubscribe from this group and stop receiving emails from it, send an email to icy-so...@googlegroups.com.
To post to this group, send email to icy-s...@googlegroups.com.

Robert Smith

unread,
Apr 19, 2019, 9:27:50 AM4/19/19
to icy-so...@googlegroups.com
Hi Lora,
I'm sorry that I did not make myself understandable, but this is one of the effects of the processing differences between ICY and ImageJ. It would be best if you opened the image file with ICY first and convert (and save) it to AVI so as to be able to open it in ImageJ. It seems that AVI formats vary quite often between camera manufacturers also. The ICY program makes this conversion simple because of this difference.  I just keep each program (ICY-ImageJ) open as independent tools because of the numerous back and forth converting necessary to utilize both software to their fullness. Also you can obtain a plugin in ICY named Video Importer (deprecated, but extreamly useful and still available).
Also do not be surprised if you notice a bit of flickering in the image. It is caused by the fact that the camera obtains images at 30 frames per second, while the lighting in the lab changes at 60 cycles/second. Out eyes normally cannot see the difference but it sometimes does show up when using this process. As I noted, it is vey sensitive to very small changes and as yet has not interfered with this type of tracking.
If this were easy everyone would be doing it. But it is also fun so keep playing with it and if you encounter any other problems do not hesitate to type at me as often as necessary.
Bob



Sent: Friday, April 19, 2019 5:25 AM
To: Icy imaging
Subject: Re: [icy] Re: Issue detecting a white mouse on a bright background
 
To unsubscribe from this group and stop receiving emails from it, send an email to icy-software...@googlegroups.com.
To post to this group, send email to icy-so...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/icy-software/9904dbd8-b1be-4e1a-a008-f2c3ecc9f2c0%40googlegroups.com.

Lora Martucci

unread,
Apr 23, 2019, 7:11:11 AM4/23/19
to Icy imaging
Hi Bob, 

Thank you for your help, I will try it as soon as possible ! 
I also saw your reply in the image sc forum: I posted on the both forum simultaneously so I didn't attempted the video test you sent to me here yet.

Thank you again

Lora

Fabrice de Chaumont

unread,
Apr 23, 2019, 12:41:28 PM4/23/19
to Icy imaging
Dear Lora,

I am the author of Mice Profiler, I created a new tracker which is more reliable and 100% automatic. The documentation is here: http://www.livemousetracker.org

You will also see some films to understand how it works, and also analysis tools.

I hope you will like it.

Best

Fabrice de Chaumont

Lora Martucci

unread,
Apr 24, 2019, 7:58:33 AM4/24/19
to Icy imaging
Dear Fabrice, 

Thank you for your documentation. I already heard about it during a talk with T. Bourgeron. I hope we can put it in place as soon as possible. 

Best
Reply all
Reply to author
Forward
0 new messages