ROI sellection for Miniscope Capture?

150 views
Skip to first unread message

Kenneth Dyson

unread,
Dec 10, 2020, 3:01:23 PM12/10/20
to Miniscope

Hi Daniel,
I am wondering if there is a way in the config file to select an ROI for the miniscope recording, similar to what is available in the behaviour recording?
Using the latest Miniscope-QT software and DAQ firmware with v4 and v3 scope.
Thanks,
Ken

Daniel Aharoni

unread,
Dec 10, 2020, 5:08:20 PM12/10/20
to Miniscope
Hi Ken,
This is a good suggestion. I'll try to add this to the next release of the software.

Kenneth Dyson

unread,
Dec 10, 2020, 6:55:39 PM12/10/20
to mini...@googlegroups.com

Thanks Daniel!!!!

--
You received this message because you are subscribed to the Google Groups "Miniscope" group.
To unsubscribe from this group and stop receiving emails from it, send an email to miniscope+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/miniscope/fb4bf155-e1c7-4d89-a863-eb1ed3d8ad0cn%40googlegroups.com.

Daniel Aharoni

unread,
Dec 11, 2020, 11:08:46 PM12/11/20
to Miniscope
Hi Ken,
you had good timing for your suggestion as I just started working on the next release of our software a day ago. I have now added in ROI control to the code in our "dev" branch of the Software repo and it will be included in the next release. Will aim to have everything done and released by the end of the year.

Martin Jendryka

unread,
May 18, 2022, 7:11:19 AM5/18/22
to Miniscope
Hi,
 I realized that the avi files, where the ROI selection window was used during the recording, cannot be read correctly using the MATLAB 'read' function. You get a distorted image similar to the one you see below.  I suppose that neither ImageJ nor MATLAB can handle the non-standard aspect ratio (in this example it is 398x332).  I used ffmpeg to pad black frames on the borders to get an even aspect ratio (400x400). Then MATLAB was able to handel it. However, these files are compressed (from grey to fmp4), so I am not sure what I am losing here. Traces look fine after extraction using PCAICA.    
Still, I would be very careful using the ROI selection tool since it can prevent loading the videos correctly in MATLAB.

Best,
Martin 
Capture.PNG

Daniel Aharoni

unread,
Jun 17, 2022, 12:06:05 AM6/17/22
to Miniscope
Hi Martin,
I haven't seen this issue before and I think cropped Miniscope and behavior videos have loaded up fine for me in imageJ. Would it be possible for you to share a .AVI file that has this issue?

Martin Jendryka

unread,
Aug 24, 2022, 5:25:58 AM8/24/22
to Miniscope
Hi Daniel,
follow the link to find the file. https://cloud.physio.uni-ulm.de/s/ANmbzQDwLfrSr2Q

sry for the late response.
Best regards
Martin

Martin Jendryka

unread,
Sep 28, 2022, 5:04:43 AM9/28/22
to Miniscope
Hi Daniel,
were you able to get the file? Any update on the situation?

Best regards,

Martin

Daniel Aharoni

unread,
Oct 12, 2022, 1:48:00 PM10/12/22
to Miniscope
Hi Martin,
Just checking this now and it seems like the cloud.physio.uni-ulm.de link isn't loading.

Martin Jendryka

unread,
Oct 12, 2022, 2:01:02 PM10/12/22
to mini...@googlegroups.com

Thanks alot, Daniel.

Ja, I cant get access either. it seems the server is down or something. Perfect timing ;). Ill check and send you an updated link by tmrw.

Best

Martin

Am 12.10.2022 um 19:48 schrieb Daniel Aharoni
You received this message because you are subscribed to a topic in the Google Groups "Miniscope" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/miniscope/mOCyAa50728/unsubscribe.
To unsubscribe from this group and all its topics, send an email to miniscope+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/miniscope/21d5e47b-5484-44a4-b225-e07d8c011346n%40googlegroups.com.

Martin Jendryka

unread,
Oct 18, 2022, 2:46:00 AM10/18/22
to Miniscope
Hi Daniel,
unfort our cloud is still down. I uploaded the video on google drive.  https://drive.google.com/drive/folders/14k20RMPVMbe4XZ3QXDZEhZGFBF56xa7H?usp=sharing
As mentioned in my first email, I changed the ROI using the ROI selection window manually before recording. Opening it in ImageJ gives the following distorted image  

Capture.JPG
Best Martin

Daniel Aharoni

unread,
Oct 18, 2022, 1:19:48 PM10/18/22
to Miniscope
Thanks for re-uploading the video. This is pretty interesting and haven't seen it happen before. The good news is it looks like all the data is there (and your imaging looks pretty beautiful!).

Below is a screen grab from the same video loaded up in VLC and ImageJ. VLC displays it properly while ImageJ does not. My guess is if you try loading up the video in whatever processing pipeline you use it should load up ok.

Capture.PNG




Martin Jendryka

unread,
Oct 19, 2022, 12:33:59 PM10/19/22
to Miniscope
It's interesting that VLC didnt created black borders when you loaded up the video. For me its look like that.

Capture.PNG


Unfort the video cannot be read correctly using MATLAB. You get the same distorted image you posted in your email above.  I suppose that neither ImageJ nor MATLAB can handle the non-standard aspect ratio.  I used ffmpeg to pad black frames on the borders to get an even aspect ratio (400x400). Then MATLAB was able to handle it. 
However, these files are compressed (from grey to fmp4 using the xvid codec), so I am not sure what I am losing here. Traces look fine after extraction using PCAICA.    

Feel free to take a look at  the 'framed' video where I added the black borders  https://drive.google.com/drive/folders/14k20RMPVMbe4XZ3QXDZEhZGFBF56xa7H?usp=sharing

Best 
Martin
Reply all
Reply to author
Forward
0 new messages