ValueError: Could not find a backend to open `50g.exr`` with iomode `wi`
See original GitHub issueGreetings! I would like to save a 16bit rgb array as .exr
file.
I use a camera, capturing multiple images for multi exposure fusion (hdr merge).
Iam in the Solarpower buisness. I will predict the hitting radiance with SkyCams.
I would like to continue my work with these 16 bit raw bayer array safed as .exr (.tga would also work)
def exposure_bracket():
picam2 = Picamera2()
config = picam2.create_still_configuration(raw={"format": "SRGGB12", "size": (2032, 1520)})
picam2.configure(config)
exposures = [50, 100, 150, 250, 400, 650, 1050, 1700, 2750] # in Microseconds
for exp in exposures:
picam2.set_controls({"ExposureTime": exp, "AnalogueGain": 1, "ColourGains": (1.0,1.0)})
picam2.start()
time.sleep(0.5)
array = picam2.capture_array("raw")
picam2.stop()
array16 = array.view(np.uint16)
array16 *= 16 # Bump 12-bit range up to 16
arrayX = array16.astype("float32")
imageio.imwrite(f'{exp}g.exr', arrayX)
rgb_array = np.zeros((760, 1016, 3), dtype=np.uint16)
rgb_array[:, :, 0] = array16[1::2, 1::2] # red
# Must avoid overflowing 16-bits in the addition here:
rgb_array[:, :, 1] = (array16[0::2, 1::2].astype(int) + array16[1::2, 0::2]) / 2 # green
rgb_array[:, :, 2] = array16[0::2, 0::2] # blue
rgb_arrayX = rgb_array.astype("float32")
imageio.imwrite(f'{exp}rgb.exr', rgb_arrayX)
imageio.plugins.freeimage.download() exposure_bracket()
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
ValueError: Could not find a backend to open '10.jpeg` with ...
I am new to MaskRCNN. I have added 15 images to the dataset/train folder however, while running the code I am getting error...
Read more >Improve error message when reading an EXR file ... - GitHub
It's just a minor thing, but if the EXR plugin is not installed, ... OSError: Could not find a backend to open `path`...
Read more >imageio读取.exr报错ValueError: Could not find a backend to ...
ValueError : Could not find a format to read the specified file in mode 'i' ... Could not find a backend to open...
Read more >problem with io.imread - Google Groups
but when I want to load my image: I get the error. In [5]: camera = io.imread(filename) ValueError: Could not load "./small.jpg"
Read more >Imageio Usage Examples — imageio 2.23.0 documentation
png' . The images are automatically downloaded if not already present on your system. Therefore most examples below should just work. Read an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Bra1nsen Did you perform the post-installation step of downloading the FreeImage binary (documentation here)?
Once installed, the following EXR round-trip of writing an image and reading it back works fine on my end:
hey firefox. I just tried you snippet: