# Knowledge Base: RealityCapture XMP Camera Math

**URL:** <https://forums.unrealengine.com/t/knowledge-base-realitycapture-xmp-camera-math/682564>\
**Category:** Pipeline & Plugins\
**Tags:** realityscan\
**Created:** [November 2, 2022, 2:22pm UTC](https://forums.unrealengine.com/t/knowledge-base-realitycapture-xmp-camera-math/682564 "2022-11-02T14:22:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rudy.Triplett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rudy.Triplett](https://forums.unrealengine.com/u/Rudy.Triplett)\
**Post date:** [November 2, 2022, 2:22pm UTC](https://forums.unrealengine.com/t/knowledge-base-realitycapture-xmp-camera-math/682564/1 "2022-11-02T14:22:44Z")

</div>

RealityCapture XMP Camera Math

Background  
There are different camera models in RealityCapture, but you can specify, which you want to use after all cameras are registered (aligned). This should be called as a final mod…  
  
[https://dev.epicgames.com/community/learning/knowledge-base/vzwB/realityscan-realitycapture-xmp-camera-math](https://dev.epicgames.com/community/learning/knowledge-base/vzwB/realityscan-realitycapture-xmp-camera-math)

---

<div class="post-metadata">

**Author:** ![JesseJiang010](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jessejiang010/32/936132_2.png) [@JesseJiang010](https://forums.unrealengine.com/u/JesseJiang010)\
**Post date:** [September 10, 2024, 10:23am UTC](https://forums.unrealengine.com/t/knowledge-base-realitycapture-xmp-camera-math/682564/2 "2024-09-10T10:23:12Z")

</div>

In the Pixel Coordinates section, the method you mentioned:

```auto
scale = max( image width, image height )
px = scale*m[0] + image width / 2
py = scale*m[1] + image height / 2

```

seems like it should instead be:

```auto
scale = min( image width, image height )
px = scale*m[0] + image width / 2
py = scale*m[1] + image height / 2

```

Using minimization worked really well in my case.
