使用ScriptIntrinsicConvolve5x5在and

使用ScriptIntrinsicConvolve5x5在and

本文介绍了如何使用ScriptIntrinsicConvolve5x5在android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解卷积矩阵如何在Android中,我想用ScriptIntrinsicConvolve5x5类来改变我的形象的反差。

I'm trying to understand how convolution matrix works in android and I want to use ScriptIntrinsicConvolve5x5 class to change contrast of my image.

我有这个矩阵的多种变化:

I've multiple variations of this matrix:

        R G B A W

   R  [c 0 0 0 0]
   G  [0 c 0 0 0]
   B  [0 0 c 0 0]
   A  [0 0 0 1 0]
   W  [t t t 0 1]

C =对比
T =(1.0 - C)/ 2.0

c = contrastt = (1.0 - c) / 2.0

不过,这并不在ScriptIntrinsicConvolve5x5工作,所有我看到的是一个黑色的屏幕。我想用,因为我的表现已经能够更改与ColorMatrix类对比RenderScript,但实在是太慢了。

But it doesn't work in ScriptIntrinsicConvolve5x5, all i see is a black screen. I want to use a RenderScript because of performance I've been able to change contrast with ColorMatrix class, but it is too slow.

所以,我的问题是:我应该在ScriptIntrinsicConvolve5x5为了改变图像的对比度用什么矩阵?或者是否有可能与ScriptIntrinsicColorMatrix办呢?

So, my question is: what matrix should I use in ScriptIntrinsicConvolve5x5 in order to change image contrast? or if it's possible to do it with ScriptIntrinsicColorMatrix?

感谢您。

推荐答案

Convolve5x5是根本不同的操作,不支持每个通道不同的常数。嘉洛斯真的是你想要的操作,应禁食。我建议注重与嘉洛斯解决性能问题。

Convolve5x5 is a fundamentally different operation that doesn't support different constants per channel. ColorMatrix is really the operation you want and should be fast. I'd suggest focusing on solving the performance issue with ColorMatrix.

这篇关于如何使用ScriptIntrinsicConvolve5x5在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 15:28