Next: 3.5 Other nip2 features Up: 3.4 Balancing the mosaic Previous: 3.4 Balancing the mosaic Contents

## 3.4.1 Balancing troubleshooting

Like assembly, mosaic balancing is normally automatic and painless. You may sometimes have problems if the image is very large, or needs dramatic corrections:

- Each VIPS image file has an associated history, recording the operations on that image since it was loaded from a file. You can view an image's history by clicking on `View` / `Image header` in an image view window.

  The automatic balancer uses the history to work out how you built your mosaic. The balancer knows about left-right and top-bottom joins, but not anything else! If the history has other stuff recorded in there, you'll see unhelpful error messages like `unable to open tmp/xxx.v`, or `more than one root`.

  If you need to perform corrections to any of your sub-images, do them, save the image, load it again, and then build the mosaic. This will make sure the history of the image you are trying to balance only contains mosaic operations.

- On some systems the balancer can run out of memory or out of file descriptors on very large mosaics. If your mosaic is made up of more than a few hundred images, and you are having balancing problems you may have hit one of these limits.

  The solution (as with mosaic assembly) is to assemble and balance your mosaic in smaller pieces.

- The balancer outputs 32-bit float images. If you save these directly you may have problems viewing them in other programs. You can solve this problem by converting them to more standard 8-bit images using `Image` / `Number Format` / `8 bit unsigned` at the end before you save.

- If your grey-card correction is not accurate, you will find that the balancer will magnify any problems you have.

  Suppose your lighting and camera set-up always produces images which are brighter on the right than the left, and suppose, due to some problem with your grey-card correction, this effect is not completely removed. You will find that when you balance a mosaic, the small differences between left and right edges of your sub-images will have been smoothed out, but they will have caused a large difference in brightness between the extreme left edge of your final image and the extreme right.

  `nip2` includes several functions which can help to fix this problem, the most commonly used being: `Tasks` / `Mosaic` / `Tilt Brightness` / `Left to Right` and `Tasks` / `Mosaic` / `Tilt Brightness` / `Top to Bottom`.

Next: 3.5 Other nip2 features Up: 3.4 Balancing the mosaic Previous: 3.4 Balancing the mosaic Contents