简体   繁体   English

可以用Java绘制YCbCr吗?

[英]Possible to draw in YCbCr in Java?

I've a project at the moment, in Java, which uses a filetype which is inherently in the YCbCr colorspace. 我目前在Java中有一个项目,它使用的文件类型本身就在YCbCr颜色空间中。 Within this, there is a lot of number crunching happening behind the scenes (which I've had to code) to convert to RGB from the YCbCr values. 在这种情况下,幕后发生了很多数字运算(我必须编码),以便从YCbCr值转换为RGB。 This is done per-pixel, per-frame, at 25 frames per second... 这是按每像素每帧完成的,每秒25帧......

The project must be entirely written in software, and must be platform independant. 该项目必须完全用软件编写,并且必须与平台无关。

If I could skip this step, and still create an image from an array, but in a YCbCr format, I could save a lot of work... 如果我可以跳过这一步,仍然从数组创建一个图像,但是采用YCbCr格式,我可以节省大量的工作......

Thanks in advance. 提前致谢。

You can probably do this with the ColorSpace class. 您可以使用ColorSpace类执行此操作。 I would be surprised if you needed to convert each YCbCr value individually. 如果您需要单独转换每个YCbCr值,我会感到惊讶。 I'm sure the java.awt.image package will provide classes for handling this. 我确定java.awt.image包将提供用于处理它的类。 You may find something in Chapter 5 of Java Advanced Imaging . 您可以在Java Advanced Imaging的第5章中找到一些内容。

基于McDowell的回答, 似乎很有意义,它解释了如何进行色彩空间转换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM