computer vision - Opencv Inpaint for CV_32FC1? -
seems inpaint in opencv can accept 8uc1 images.
is there exist inpaint cv_32fc1 images in opencv? or there workaround how can used cv_32fc1 images? or there analogue of function?
inpaint still don't support float32 data. issue open state (https://github.com/itseez/opencv/issues/4542).
you can use code below alternative.
src32f.convertto(src8b, cv_8u, 255.0f/max, min); inpaint(src8b, mask, dst8b, inpaintradius, flags); dst8b.convertto(dst32f, cv_32f, max/255.0f, -min); //optional, copy inpainted data mask.convertto(mask, cv_32f, 1 / 255.0f); dst32f = src32 + (dst32f - src32).mul(mask);
Comments
Post a Comment