Skip to content
Snippets Groups Projects
Commit 644aa9ec authored by Thomas Müller's avatar Thomas Müller
Browse files

Fix image conversion

parent c950265f
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,7 @@ instant-ngp$ ./build/testbed --scene data/image/albert.exr
<img src="docs/assets_readme/albert.png"/>
To reproduce the gigapixel results, download, for example, [the Tokyo image](https://www.flickr.com/photos/trevor_dobson_inefekt69/29314390837) and convert it to `.bin` using the `scripts/image2bin.py` script. This custom format improves compatibility and loading speed when resolution is high. Now you can run:
To reproduce the gigapixel results, download, for example, [the Tokyo image](https://www.flickr.com/photos/trevor_dobson_inefekt69/29314390837) and convert it to `.bin` using the `scripts/convert_image.py` script. This custom format improves compatibility and loading speed when resolution is high. Now you can run:
```sh
instant-ngp$ ./build/testbed --scene data/image/tokyo.bin
......
......@@ -12,6 +12,7 @@ import argparse
import common
import numpy as np
import os
import PIL
def parse_args():
parser = argparse.ArgumentParser(description="Convert image into a different format. By default, converts to our binary fp16 '.bin' format, which helps quickly load large images.")
......@@ -22,7 +23,7 @@ def parse_args():
if __name__ == "__main__":
args = parse_args()
Image.MAX_IMAGE_PIXELS = 10000000000
PIL.Image.MAX_IMAGE_PIXELS = 10000000000
print(f"Loading {args.input}")
img = common.read_image(args.input)
print(f"{img.shape[1]}x{img.shape[0]} pixels, {img.shape[2]} channels")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment