linear algebra - Can somebody explain to me what 'void postConcat' in Android does? -
so have 2 matrices.
colormatrix , threshold. colormatrix initially,
c = [ 0.213 0.715 0.072 0 0; 0.213 0.715 0.072 0 0; 0.213 0.715 0.072 0 0; 0 0 0 1 0;]
and threshold is:
t = [ 255 0 0 1 -306; 0 255 0 1 -306; 0 0 255 1 -306; 0 0 0 1 -306;]
now line of code in android colormatrix.postconcat(threshold);
returns this:
c = [ 54.315 182.325 18.36 1 -306; 54.315 182.325 18.36 1 -306; 54.315 182.325 18.36 1 -306; 0 0 0 1 0; ]
why? steps follows come result?
if same thing in matlab, c*t'
this:
c = [ 54.315 182.325 18.36 0; 54.315 182.325 18.36 0; 54.315 182.325 18.36 0; 0 0 0 0; ]
a different dimension array different values. can explain me postconcat does? can't find online function, in android documentation, , says this:
concat colormatrix specified postmatrix.
. android thing?
why? steps follows come result?
the source code colormatrix can viewed here: https://android.googlesource.com/platform/frameworks/base/+/master/graphics/java/android/graphics/colormatrix.java
is android thing?
i believe kinda is, more colormatrix thing. in android, believe colormatrix provided way construct special colorfilter
(colormatrixcolorfilter
) used applied bitmap
objects.
from colormatrix.postconcat
description:
this logically same calling setconcat(postmatrix, this)
and description setconcat
:
set colormatrix concatenation of 2 specified colormatrices, such resulting colormatrix has same effect applying matb , applying mata.
so, if understand correctly, believe colormatrix.postconcat
can used combine 2 colormatrix objects 1 can apply once bitmap of choice instead of doing twice.
in short, if want have same behavior in matlab, might need implement yourself.
Comments
Post a Comment