rjdmoore / fictrac

FicTrac: A webcam-based method for tracking spherical motion and generating fictive animal paths.
http://fictrac.rjdmoore.net/
Other
26 stars 29 forks source link

Data header documentation mentions a non-existing figure #26

Closed h-mayorquin closed 1 year ago

h-mayorquin commented 1 year ago

In the header documentation there is a reference to a figure called configImg.jpg:

https://github.com/rjdmoore/fictrac/blob/9ac055e52d89f49f492a8eb4e1f7c5b8cd6df40a/doc/data_header.txt#L9C1-L12C61

That said, I am unable to figure out where is the figure. Is that available on the repo? If so, could we add it as a link there?

(If you point out where is the file to me I can do the PR)

minseungchoi commented 1 year ago

I believe that configImg.jpg is generated when you run configGUI.

h-mayorquin commented 1 year ago

Is is the same for everyone?

If you have it, could you share it here? I have not installed the configGUI but I want to understand schematically the header data and this will be useful.

minseungchoi commented 1 year ago

Here's one of mine after I did the rectangular calibration. fictrac-configImg

h-mayorquin commented 1 year ago

@minseungchoi Thanks a lot.

I was expecting that it would be some sort of diagram indicating what the different elements of the header are.

What are the red coordinates there? Do they correspond to delta rotation vector? What about the green thing?

minseungchoi commented 1 year ago

The green square is the "ignore region" that you specify during config. The green squares indicate either the four corners of the square I selected or of the inferred square. The red coordinates indicate the animal's coordinate frame (x = forward, y = right, z = down). You can find the code in src/ConfigGUI.cpp for the coordinate selection here.

h-mayorquin commented 1 year ago

Thanks a lot, I understad the image. The green square are, if I understand well, the roi_ignr in the config.txt and the red squares are one of the c2a_cnrs{x} values. The pointer to the code was helpful.

That said, I still find the comment in the link that I posted a bit confusing. It is probably telling me to look at the red frame that will be generated in the *configImg.jpg but it is not clear how it relates to the explanation:

https://github.com/rjdmoore/fictrac/blob/9ac055e52d89f49f492a8eb4e1f7c5b8cd6df40a/doc/data_header.txt#L9C1-L12C61

That said, what I was looking for was for a diagram that will help me understand what each of the columns represent and for that I had to go and read the paper. Now things make sense.

Thanks a bunch for your help again, @minseungchoi .

rjdmoore commented 1 year ago

Hi @h-mayorquin sorry for the late response. The reference to configImg in the data_header is probably not necessary but is simply to point out that the orientation of the lab frame is illustrated by the red axes in the configImg. This is the projection of the lab coordinate frame on the camera image. It should appear to align with the actual lab coordinate frame (i.e. animal forward, right, down).

h-mayorquin commented 1 year ago

Thanks again guys. In case someone crashses here in the future I will share a figure from the paper that allowed me to understand at the end:

image

h-mayorquin commented 1 year ago

Btw guys, I am a contributor to neuroconv, a tool for transforming different data formats into the nwb format.

We recently added FicTrac to the list of supported ones: https://neuroconv.readthedocs.io/en/main/conversion_examples_gallery/behavior/fictrac.html

Just letting you know