# Difference between otbcli\_pansharpening and otbcli\_BundleToPerfectSensor?

**URL:** <https://forum.orfeo-toolbox.org/t/difference-between-otbcli-pansharpening-and-otbcli-bundletoperfectsensor/77>\
**Category:** OTB Usage\
**Created:** [January 17, 2019, 9:41am UTC](https://forum.orfeo-toolbox.org/t/difference-between-otbcli-pansharpening-and-otbcli-bundletoperfectsensor/77 "2019-01-17T09:41:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldi](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/oldi/32/32_2.png) [@oldi](https://forum.orfeo-toolbox.org/u/oldi)\
**Post date:** [January 17, 2019, 9:41am UTC](https://forum.orfeo-toolbox.org/t/difference-between-otbcli-pansharpening-and-otbcli-bundletoperfectsensor/77/1 "2019-01-17T09:41:52Z")

</div>

I want to use the Bayesian Fusion algorithm for pansharpening my WorldView 4 imagery. Using **otbcli\_pansharpening** does not work, it throws up the following error:

> inputs do not occupy the same physical space

The origin is the same, but of course the pixel sizes for PAN and MS (=XS?) are different.

However, when using **otbcli\_BundleToPerfectSensor** I can also choose the Bayesian fusion algorithm and it works nicely.

So my question: What is the difference between these two functions?

---

<div class="post-metadata">

**Author:** ![Cedric](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Cedric](https://forum.orfeo-toolbox.org/u/Cedric)\
**Post date:** [January 17, 2019, 10:31am UTC](https://forum.orfeo-toolbox.org/t/difference-between-otbcli-pansharpening-and-otbcli-bundletoperfectsensor/77/2 "2019-01-17T10:31:31Z")

</div>

**otbcli\_BundleToPerfectSensor** is what we call in OTB a _composite_ application, it chains two smaller application :

- Superimpose : reproject the XS image in the PAN geometry
- Pansharpening : performs the pansharpening operation, assuming the XS image has already been projected in the PAN geometry

So the Pansharpening application is only a subpart of the whole Pansharpening process. I agree the doc of the application isn’t very clear …

---

<div class="post-metadata">

**Author:** ![poughov](https://forum.orfeo-toolbox.org/user_avatar/forum.orfeo-toolbox.org/poughov/32/22_2.png) [@poughov](https://forum.orfeo-toolbox.org/u/poughov)\
**Post date:** [January 17, 2019, 10:33am UTC](https://forum.orfeo-toolbox.org/t/difference-between-otbcli-pansharpening-and-otbcli-bundletoperfectsensor/77/3 "2019-01-17T10:33:56Z")

</div>

Also see this CookBook recipe for more info:  
[https://www.orfeo-toolbox.org/CookBook/recipes/optpreproc.html#pan-sharpening](https://www.orfeo-toolbox.org/CookBook/recipes/optpreproc.html#pan-sharpening)
