-
Notifications
You must be signed in to change notification settings - Fork 373
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
Separate concepts of image file format / compression vs encoding #3804
Comments
I took some notes in parallel, before reading those. Dumping them below. N-D tensors vs. N-D ragged tensors vs. encoded blobsContextTypesSome definitions first so we're on the same page:
ViewsWe provide a generic tensor view that allows user to visualize any homogeneous N-D tensor as raw data (i.e. no particular semantics assumed). Our 2D view provides an alternative visualization for regular tensors: they can be rendered as textured rectangles, provided they have a "renderable shape" (e.g. HxWxG, HxWxRGB, etc). Finally, our 3D view knows how to turn What's new#3541 introduces NV12-encoded images, which are essentially ragged tensors, but other than that can still be accessed and interpreted directly (i.e. no compression or other complex encoding). Our 2D view should expose contextual settings that vary depending on the media type of the encoded data.
Proposal
Questions
|
@jleibs We can't compress gray data, is it expected? Just do the following with an
|
@SeaOtocinclus thanks for reporting. That doesn't seem expected. I'll take a look. |
@jleibs Found out that the compress options does not seems accessible from the C++ API, ideally it should if we want the different API to be on par |
This has now been split into multiple other issues: |
Status: Draft Being Written
Context
Our Images currently exist as a thin wrapper over TensorData.
As we started to add support for compressed images, we introduced a special-case for JPEG data inside the TensorData type. This should be cleaned up in:
TensorBuffer::JPEG
withImageEncoded
archetype #3803However, support for new image encodings, added in:
Because multi-plane / multi-resolution images are not well represented by dense tensors, we followed the pattern established for jpegs. We can continue to do this even through the cleanup of #3803, but ultimately this is not really a semantically correct representation.
Semantically:
Proposal
The data representation of images and tensors ultimately needs to be split into 3 separate things:
Ideally we should be able to view an image as a tensor, but even then that view should feature a choice of decoder. For example, converting to 3 planes of RGB vs leaving as up-sampled YCrCb.
The text was updated successfully, but these errors were encountered: