Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们如何使用 java 编程计算图像中的亮度、收缩、色调和饱和度数。任何公式,代码片段赞赏。
您可以使用 HSV 模型来计算值,其中 H 是色调,S 是饱和度,V 是值(或亮度)
这里 RGB 是像素的红色、绿色和蓝色值,我假设您可以借助一些图像处理库来读取它们。
这可能很难仅使用本机 Java 库来实现,但是您可能对某些 3rd 方库感兴趣,例如ImageJ,它使您能够控制对比度、亮度等。在上述页面上也有几个例子。