inpainting vector

#1 what I’m trying to do
I have a 2d motion vector field (.exr file with negative and positive float values describing x and y coordinates of the vectors in R and G.B is black)
I have a .png mask describing the consistency of the flow (255 : certain to 0:uncertain)
what I would like to do is to replace the uncertain values of the field with an interpolated value of the good values.
for the moment I’m using inpainting to do that … and it seems to work.
gmic -i mvflow.exr reliable.png -le[1] 250 --inpaint[0] [1],0

my question is :
-is this the right method to do that ?
-is inpaint design to work with “infinite” float values
-should I separate orientation/norm of my vectors and inpaint these instead of the raw vector values ?

any insight welcome…

(G'MIC staff) #2

Hello luc,
Yes that sounds like a good method. The inpainting command has no pre-requisites on the image value and can work with anything you want.
Separating orientation/norm doesn’t seem to be necessary in this case, except if you know all your vectors must be normalized (and even with that, you can force the renormalization after the vector inpainting you did).


thank you david.