Meshroom icon indicating copy to clipboard operation
Meshroom copied to clipboard

[bug] Lens Distortion ST map artifacts

Open Shrinks99 opened this issue 2 years ago • 6 comments

Describe the bug When using exported undistortion maps I have noticed that they seem to produce some blocky artifacts. I suspect that this may be due to the fact that it is exported with 16 bit half float precision? Usually (in my experience anyways) data passes should be processed and exported with 32 bit precision. Example ST Map that is used in the following screenshots is provided here: Distortion_UVMap_3725456799.zip

As a hacky solution for anyone who is trying to use this program in production right now and can't wait for a fix, this can be worked around by applying a 3-5px blur to the exported ST map.

To Reproduce

  1. Export an ST undistortion Map from Meshroom
  2. Apply it to an image of the same resolution (I used Nuke here)
  3. Zoom in and check for artifacts, typically they will be easiest to spot in the middle of the frame/

Expected behavior The lens distortion is applied without creating artifacts and pixels remain square.

Screenshots

Source image: Source Image

Warped image: Warped Example

Desktop:

  • OS: Windows 10
  • Python: 3.7.4
  • Meshroom version: 2021.1.0 Release

Shrinks99 avatar Mar 12 '22 23:03 Shrinks99

Is it possible for you to send the original images, or at least the content of the structurefrommotion node ? (.abc or .sfm).

servantftechnicolor avatar Mar 18 '22 07:03 servantftechnicolor

I can't send the original images (NDA) and I deleted the original cache because I finished this shot but I can recompute and send you that data if it's helpful. Should be able to get around to it this weekend.

Shrinks99 avatar Mar 19 '22 18:03 Shrinks99

Recomputed the sequence, can confirm that the undistorted JPEG files Meshroom spits out do not exhibit this issue.

Screenshot 2022-03-19 221306

Unfortunately the point cloud generated by the StructureFromMotion node contains sensitive data that I cannot post publicly. Fortunately, this issue should be replicable with any other image sequence.

Shrinks99 avatar Mar 20 '22 02:03 Shrinks99

Thanks for the details. This issue is solved in a development branch. This should be merged with the next release.

servantftechnicolor avatar Mar 21 '22 15:03 servantftechnicolor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 31 '22 17:07 stale[bot]

This issue is still present, is still a bug, and should be closed once the next version comes out. I dislike bots that perform these actions but also this isn't my repo or project so do with these thoughts what you will. :P

Shrinks99 avatar Aug 01 '22 00:08 Shrinks99

Pretty sure this has been fixed now?

Shrinks99 avatar Mar 11 '24 02:03 Shrinks99

Seeing the issue in Meshroom 2023.3.0 with ExportDistortion node.

But looks like addressed month ago here https://github.com/alicevision/AliceVision/pull/1677

stmapmeshroom

earlywill avatar Apr 27 '24 16:04 earlywill

Yes exactly. I missed to link it with this issue.

fabiencastan avatar Apr 27 '24 16:04 fabiencastan

Sorry @Shrinks99 for the huge delay to fix that.

fabiencastan avatar Apr 27 '24 16:04 fabiencastan

@fabiencastan No worries, glad to see this put to bed! Blur hack was good enough at the time, shots got finaled! :)

Shrinks99 avatar Apr 28 '24 02:04 Shrinks99