Linking dataset and videos

27 views
Skip to first unread message

jacques....@gmail.com

unread,
Dec 20, 2018, 5:00:48 AM12/20/18
to Glue users
Hi everyone,

Is it possible to link a dataset to a series of images (like a video) so that selecting a datapoint in one graph would highlight the corresponding image in the series?

For a bit of context: I have a video feed and on each frame of the video I measure some parameters. Therefore I have the time dependence of these parameters and I would like to be able to visualize the frames corresponding to interesting breakpoints in the data.

Thanks.

Jacques
ps: I don't know the amount of details needed to answer,I can elaborate if needed.
I also didn't include data example because there quite heavy, but I can create a reduce example.

Thomas Robitaille

unread,
Jan 8, 2019, 5:35:15 AM1/8/19
to glue...@googlegroups.com, jacques....@gmail.com
Hi Jacques,

Yes in principle that should be possible - if you could provide a reduced example of datasets you want to link, I can show you how to do it.

Cheers,
Tom


--
You received this message because you are subscribed to the Google Groups "Glue users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glue-viz+u...@googlegroups.com.
To post to this group, send email to glue...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glue-viz/d247ded3-2bf8-4e15-bb62-33e39f49d5dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jacques....@gmail.com

unread,
Jan 8, 2019, 6:16:53 AM1/8/19
to Glue users

Hi Tom,
Linked here https://drive.google.com/open?id=1L9yB47LTyEdWnZAt3p0uXhUzsgetnr6Z is a compressed archive containing two excel files and a folder:
- "images" folder contains 61 images
- "Test_data_profiles" contains the fitted profile of the red line in the images. 61 columns, one for each image.
- "Test_data_measurements" contains three columns. Each line referring to one of the images.

In the best case scenario, I would like to visualize the Test_data_measurements in standard 2D graphs (displacement/fwhm as a function of time) and when selecting one of the point be able to visualize the corresponding frame and/or fit profile.

Total unzipped size: 30 MB.

Thanks,

Jacques

jacques....@gmail.com

unread,
Feb 20, 2019, 11:54:03 AM2/20/19
to Glue users
Hi Tom,

Did you have the time to take a look at the linking of videos and dataset?
If you don't, any suggestion on the way to go would help.
Thanks,

Jacques

Thomas Robitaille

unread,
Feb 22, 2019, 7:38:38 AM2/22/19
to glue...@googlegroups.com, jacques....@gmail.com
Hi Jacques,

My apologies for not replying sooner. To get the functionality you describe, we need to set up a session manually from a Python script - I've placed an example here:


Just put the script in the same folder as the Excel files and run it as you would a normal Python script.

What this does is loads up all the data, opens the necessary visualizations, and it creates a small event listener that will update the current image shown in the image viewer and profile viewer based on the current selection. One caveat is that it will only show the first image/profile of a selection, so this is something to be aware of if you select multiple points. In addition, the way it's written currently it will only use the first selection (normally this is the red one). But you can continuously update the red selection and it should update the displayed image and profile.

Loading the data from JPG frames is currently quite slow (0.3s per image on my laptop). If performance becomes an issue, let me know and we can do something smarter with the data loading, i.e. reading in the images only as they are needed.

Hopefully this gives you a feel for how to customize the behavior, but don't hesitate to let me know if you run into any issues!

Cheers,
Tom


--
You received this message because you are subscribed to the Google Groups "Glue users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glue-viz+u...@googlegroups.com.
To post to this group, send email to glue...@googlegroups.com.

jacques....@gmail.com

unread,
Feb 22, 2019, 3:01:11 PM2/22/19
to Glue users
Thanks!
It works really well. I will play around based on your script, if something comes up I'll let you know.

Again, thanks a lot.

Jacques

Reply all
Reply to author
Forward
0 new messages