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

New format proposal #1

Open
nobu-k opened this issue Jun 28, 2016 · 2 comments
Open

New format proposal #1

nobu-k opened this issue Jun 28, 2016 · 2 comments

Comments

@nobu-k
Copy link
Member

nobu-k commented Jun 28, 2016

{
  "format": "cvmat",
  "width": width,
  "height": height,
  "image": <blob>
}

The current tuples generated from video sources look ilke this. In raspivideo, it also wanted to output raw images and JPEGs. So, I defined the format like below:

{
  "format": "raw",
  "color_model": "rgb",
  "width": width,
  "height": height,
  "image": <blob>
}

Instead of "cvmat", I defined "raw" format containing raw pixel values in a layout specified by the "color_model" field. The "color_model" field is only provided when the format is "raw". "raw" + "bgr" is equivalent to the current "cvmat" format.

I think this is more general and flexible than using the term "cvmat". What do you think?

@disktnk
Copy link
Member

disktnk commented Jun 29, 2016

The "color_model" field is only provided when the format is "raw".

sounds great.

If an image format is "RAW" and "RGBA", then format is "raw" and color_model is "rgba" ? I agree when color_modelrepresents image binary style.

@nobu-k
Copy link
Member Author

nobu-k commented Jun 29, 2016

Yes. Even though not all plugins need to support wide variety of color models, having that field would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants