Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export undistorted images in a lossless format for texturing #748

Closed
pierotofy opened this issue Jan 21, 2018 · 3 comments
Closed

Export undistorted images in a lossless format for texturing #748

pierotofy opened this issue Jan 21, 2018 · 3 comments

Comments

@pierotofy
Copy link
Member

There's a bit of background about this problem here: nmoehrle/mvs-texturing#90

In short, when images are undistorted in jpg format, the border of images is not entirely black and regions that should be invalid might be classified as valid and used in the reconstruction.

This causes artifacts to appear in the orthophotos in form of small lines.

The proposed fix would involve exporting the images in PNG instead of JPG.

@juvinski
Copy link

Hi @pierotofy , how can I help ?

best regards

@pierotofy
Copy link
Member Author

pierotofy commented Jan 21, 2018

@juvinski if you know some Python I think the first step would be to add a flag to the opensfm's undistort command to select the type of file output (jpg or png): https://github.com/mapillary/OpenSfM/blob/59efee3a7043a441aa64c013dd7fff611d39194c/opensfm/dataset.py#L85
https://github.com/mapillary/OpenSfM/blob/684ebff2ecfc2017b64fcfc18fc1fdbe14811925/opensfm/commands/undistort.py#L95

https://docs.opencv.org/3.0-beta/modules/imgcodecs/doc/reading_and_writing_images.html

@pierotofy
Copy link
Member Author

This has been implemented some time ago. We now use PNGs for texturing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants