benzio
17th March 2020, 21:22
Hi everyone! I'm struggling with a little problem here.
I have a clip A at a certain frame:
A:
https://forum.doom9.org/attachment.php?attachmentid=17237&stc=1&d=1584476196
I simply take an adiacent frame:
B = A.Trim(1,0)
https://forum.doom9.org/attachment.php?attachmentid=17238&stc=1&d=1584476196
And I want the absolute difference between the two, but I want to adjust levels to spot only the pixels where the two clips are EQUAL.
So i write (using MaskTools2):
uu_mt_blend(interleaved, interleaved2, mode="absdiff").levels(0,1,1,0,255)
Result:
https://forum.doom9.org/attachment.php?attachmentid=17239&stc=1&d=1584476196
But the result is not right!
There is evident noise everywhere, in particular in the right side of the frame, so the result should be white almost everywhere except for some few spots.
I thought that maybe was a problem of MaskTools2... so I did:
subtraction1 = overlay(A, B, mode="subtract")
subtraction2 = overlay(B, A, mode="subtract")
overlay(subtraction1, subtraction2, mode="Lighten").levels(0,1,1,0,255)
but the result is the same...
What's going on there?
Thanks to anyone who will answer :thanks:
EDIT: If I convert A with A.convertToRGB32 or A.convertToRGB it works
What's wrong with YV12?
I have a clip A at a certain frame:
A:
https://forum.doom9.org/attachment.php?attachmentid=17237&stc=1&d=1584476196
I simply take an adiacent frame:
B = A.Trim(1,0)
https://forum.doom9.org/attachment.php?attachmentid=17238&stc=1&d=1584476196
And I want the absolute difference between the two, but I want to adjust levels to spot only the pixels where the two clips are EQUAL.
So i write (using MaskTools2):
uu_mt_blend(interleaved, interleaved2, mode="absdiff").levels(0,1,1,0,255)
Result:
https://forum.doom9.org/attachment.php?attachmentid=17239&stc=1&d=1584476196
But the result is not right!
There is evident noise everywhere, in particular in the right side of the frame, so the result should be white almost everywhere except for some few spots.
I thought that maybe was a problem of MaskTools2... so I did:
subtraction1 = overlay(A, B, mode="subtract")
subtraction2 = overlay(B, A, mode="subtract")
overlay(subtraction1, subtraction2, mode="Lighten").levels(0,1,1,0,255)
but the result is the same...
What's going on there?
Thanks to anyone who will answer :thanks:
EDIT: If I convert A with A.convertToRGB32 or A.convertToRGB it works
What's wrong with YV12?