Problem selecting videos in fixerrors and behavioralmicroarray

64 views
Skip to first unread message

Anna Phan

unread,
Oct 29, 2021, 5:48:03 PM10/29/21
to ctrax
Hello,

After analyzing my video in Ctrax, I have my video in .sbfmf, my .mat and .ann file ready. However, when prompted to select the video file when I try running fixerrors (or other script in behavioralmicroarray), all file options (including movie files that are .sbfmf or .avi) are greyed out and it does not let me select the video file. 

I have tried also using the example videos available for download from the Ctrax Usage website (videos in .sbfmf format, with accompanying .ann and .mat files). Again these open and play fine in the Ctrax program, but if I try to run fixerrors (or showtrx) in Matlab, I have the same problem in that I cannot select a video file (all options greyed out, and this doesn't change when I try different file types under the options tab).

Any help would be appreciated,

Thanks,
Anna

Anna Phan

unread,
Oct 29, 2021, 6:30:03 PM10/29/21
to ctrax
Hi All,

Of course, I have figured out the problem after I had posted.  This is apparently a Matlab x Mac OS problem (https://www.mathworks.com/matlabcentral/answers/484281-why-am-i-unable-to-select-a-file-when-i-use-uigetfile-function-on-the-newest-mac-operation-system).  I got around this by altering the Matlab code for fixerrors where they prompt the user to select the video file (and will have to edit similarly the scripts in behavioralmicroarray).

in the file: fixerrors.m
original line 27 - [moviename,moviepath] = uigetfilehelp(movieexts, 'Choose movie file',moviename,'helpmsg',helpmsg);

I edited to: [moviename,moviepath] = uigetfilehelp('*', 'Choose movie file',moviename,'helpmsg',helpmsg);

In order to force uigetfilehelp to accept any file format.  This seems to work.  For some reason, the uigetfilehelp command to obtain the .mat file and .ann file did not need editing, it was just the video input command.

Anna

John Bender

unread,
Oct 29, 2021, 6:32:31 PM10/29/21
to ct...@googlegroups.com
Thanks Anna, for contributing the fix back to the community. 

JB

On Oct 29, 2021, at 15:30, Anna Phan <aph...@ualberta.ca> wrote:


--
You received this message because you are subscribed to the Google Groups "ctrax" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ctrax+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ctrax/3d899af4-3449-484f-bcf4-3d75db95cf5fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages