Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extraction of rrd file content into folders/images/json #6011

Open
rgolovanov opened this issue Apr 17, 2024 · 5 comments
Open

Support extraction of rrd file content into folders/images/json #6011

rgolovanov opened this issue Apr 17, 2024 · 5 comments
Labels
enhancement New feature or request user-request This is a pressing issue for one of our users

Comments

@rgolovanov
Copy link
Contributor

Currently the only one way to see data stored in rrd file is to open it in Visualizer.
It might be useful to be able to extract content into raw individual files.

@rgolovanov rgolovanov added enhancement New feature or request 👀 needs triage This issue needs to be triaged by the Rerun team labels Apr 17, 2024
@rgolovanov rgolovanov changed the title Unpack rrd file into folders/images/json Support extraction of rrd file content into folders/images/json Apr 17, 2024
@abey79 abey79 added user-request This is a pressing issue for one of our users and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Apr 25, 2024
@nbkn865
Copy link

nbkn865 commented Sep 27, 2024

Hello, I also am trying to extract data from an .rrd file, specifically RGB and other images. Is it true that the SDK API doesn't have this functionality yet? If so, what is the status of this user request?

@Wumpf
Copy link
Member

Wumpf commented Sep 28, 2024

@nbkn865 There's ongoing work to expose APIs to access the datastore/loaded-rrd files which will land in the next release!

Specifically for anything logged as images or a blob the viewer already has an option to save those when selected (look for "save blob").

@Wumpf
Copy link
Member

Wumpf commented Oct 22, 2024

0.19 supports now reading out the data store which allows to extract the data in code and store it into different files as needed.
What's now missing is to offer this out of the box

  • without code
  • with more utilities on the dataframe, e.g. something that extracts image files from an rrd for you

that said, it's a bit open ended at this point since there's ofc no clear definition of "generate files from this rrd".
@rgolovanov can you describe concrete usecases you had in mind?

I'd like to split this up into concrete files that should be either extractble from ui or code (:

@nbkn865
Copy link

nbkn865 commented Nov 5, 2024

@Wumpf, thanks for replying. I indeed am using version 0.19 now with the Data API to extract data from Rerun files, and it works great.

I do have a follow-up question about that, though, where I'm trying to extract images, for example:

import rerun as rr

# load the recording
recording = rr.dataframe.load_recording(my_rrd_file)

image_view = recording.view(
    index="capture_time", contents="/rgb_data"
)
images = image_view.select().read_all()

I see that the images are stored like so in table images:

/rgb_data:Blob: [[[[255,216,255,224,0,...,164,191,35,255,217]]],[[[255,216,255,224,0,...,212,157,143,255,217]]],...,[[[255,216,255,224,0,...,162,226,177,255,217]]],[[[255,216,255,224,0,...,81,112,71,255,217]]]]
/rgb_data:MediaType: [[["image/jpeg"]],[["image/jpeg"]],...,[["image/jpeg"]],[["image/jpeg"]]]

They're all 1-D lists, and there don't seem to be any image dimensions in the data, so how does the Rerun viewer process those 1-D lists back into an RGB array for display?

I tried searching the documentation and couldn't find anything related to the above question.

@Wumpf
Copy link
Member

Wumpf commented Nov 6, 2024

@nbkn865 since those are EncodedImage, i.e. jpeg blobs in your case, size information is part of the jpeg definition
It's a different story with Image which is actual "raw" pixel data which always has to be accompanied by an ImageFormat which contains size among other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user-request This is a pressing issue for one of our users
Projects
None yet
Development

No branches or pull requests

4 participants