Open Sanheiii opened 1 year ago
Indeed, this can happen. This would be quite easy to fix. Pls contribute if you have time.
I've made some attempts, without changing the MVS format, I think it's possible to give preference to views where the faces are projected closer to the center of the photo or to remove views based on color, but I don't think these are good solutions, they may reduce the quality of the textures and are not very accurate. I think I need to introduce distortion parameters for the MVS format. But you mentioned it's would be quite easy to fix, my programming and math skills are average, so I hope I can ask you for some ideas.
Hi! I'll give a shot to solving this issue. I'll try to create a mask that would match the image distortion so that TextureMesh would only use pixels from within the mask.
Thanks for the suggestion, I misunderstood mask and thought it would only be used in dense restruction, I will try it.
967 would require users to create masks to utilize the fix. Creating masks from distortion parameters is not a terrible idea. Using threshold might clip some of the image without detection of image border.
I filled a white picture and undistorted it, using it as a mask into TextureMesh, there was no significant improvement to the problem, I made the black part of the mask inflate a few pixels later, the black spots were completely gone.
PR #968 is automatically generating valid image masks by removing black regions around the undistorted image
Undistorted images sometimes have black pixels at the edges, but OpenMVS still uses these parts to generate the texture. After seam leveling as if they were smeared, a large black spot is formed on the texture image.