2Bdecided
19th October 2007, 17:33
I want to create a mask that represents the difference between two clips (x and y), and then uses that mask to replace the different parts with another clip (z), e.g.
diff=mt_lutxy(x.converttoYV12(),y.ConvertToYV12(),"x y - abs")
diff=diff.Levels(5,1,40,0,255)
mt_merge(y.converttoYV12(),z.ConvertToYV12(),diff,U=3,V=3)
The problem is this: I want to pick up all differences - luma and chroma - and then I want to combine all three into a single plane, and then use that single plane as the mask for all three planes.
So, for example, even if in some part of some frame there's only a difference in U or V, I want the mask to let me replace that part's Y, U and V.
I think I just need some appropriate colour plane merging, but I don't know how to do it.
Can anyone help please?
Cheers,
David.
diff=mt_lutxy(x.converttoYV12(),y.ConvertToYV12(),"x y - abs")
diff=diff.Levels(5,1,40,0,255)
mt_merge(y.converttoYV12(),z.ConvertToYV12(),diff,U=3,V=3)
The problem is this: I want to pick up all differences - luma and chroma - and then I want to combine all three into a single plane, and then use that single plane as the mask for all three planes.
So, for example, even if in some part of some frame there's only a difference in U or V, I want the mask to let me replace that part's Y, U and V.
I think I just need some appropriate colour plane merging, but I don't know how to do it.
Can anyone help please?
Cheers,
David.