Questions tagged [python-imageio]

Imageio is a Python library that provides an easy interface to read and write a wide range of image data including animated images, volumetric data, and scientific formats. Make to use this tag for question related to it.

191 questions
1
vote
1 answer

"float" object cannot be interpreted as an integer while reading the frame

I am trying to read the frames using imageio API. I have a reader as an object which I have received using imageio.get_reader(video_path,"ffmpeg"). I have the following frame reader function def read_frames(reader, frame_q, use_webcam): if…
Sam
  • 352
  • 2
  • 4
  • 22
1
vote
1 answer

Reading all images(jpg) from a folder by using imageio.readvol()

I can read all the *.dcm files from "imgs" with this command vol = imageio.volread("imgs") but I can't read jpg files. My image files has *.bmp.jpg extension (e.g. C001_IMG00023.bmp.jpg) and histology = imageio.volread("imgs", "jpg") command gave…
Yunus YILDIRIM
  • 91
  • 1
  • 13
1
vote
0 answers

Reading image files

I have a directory containing 4 folder (1,2,3,4). Each folder has jpg images in them. I used the code below to read the images. The problem is all images are in different shapes. So, now I have a list of images each with different shape. 1) Is…
Abid Orucov
  • 93
  • 1
  • 4
1
vote
2 answers

How to ignore root warnings?

I generate monochromatic images and save them using imageio.imwrite. Every time I save a file I get a following warning: WARNING:root:Lossy conversion from float64 to uint8. Range [-0.24890179009891278, 2.35786261304524]. Convert image to uint8…
Fallen Apart
  • 723
  • 8
  • 20
1
vote
2 answers

JPEG-Decompression on RAW image in python

When I try to JPEG-Decompress (old-style JPEG compression, not JPEG-LS and not JPEG2000) the RAW data, I get following error: Traceback (most recent call last): File "raw-reader.py", line 766, in raw_image_data =…
Ian Rehwinkel
  • 2,486
  • 5
  • 22
  • 56
1
vote
3 answers

Read multiple images from same directory with imageio

I have a directory test/ with images 0.jpg, and 1.jpg. How can I use imageio's mimread function to specify the directory test and read both 0 and 1? Or is this not what it's meant for? I tried imageio.mimread(uri="/path/to/test/", format=".jpg") but…
jjjjjj
  • 1,152
  • 1
  • 14
  • 30
1
vote
1 answer

install imageio Python 2.7.14

I am trying to install the imageio module using pip: pip install imageio as this is what https://media.readthedocs.org/pdf/imageio/latest/imageio.pdf recommends. However, I am getting an error every time saying that install is invalid syntax. I…
Dave Miyamoto
  • 11
  • 1
  • 3
1
vote
2 answers

How to remove normalization from scipy imsave function

I have a simple task to accomplish, but the current save functions I am finding are not helping me at all. What I have to do is simply convert a gray-scale image to another one which has intensities belonging to a smaller interval (specifically…
1
vote
0 answers

Read an image using url imageio python

Can anyone tell how to read an image using an URL given, with the help of imageio python3? I have already looked at this stackoverflow question but is it possible to use imageio instead of PIL.
Akash Chandra
  • 375
  • 1
  • 4
  • 13
1
vote
1 answer

(imageio or celery) Error closing: 'Image' object has no attribute 'fp'

I am using imageio to write png images to file. import numpy as np import matplotlib.cm as cm import imageio # for saving the image import matplotlib as mpl hm_colors = ['blue', 'white','red'] cmap =…
Liis Kolberg
  • 153
  • 12
1
vote
1 answer

Using FreeImage convert hdr to jpg

How can I use ImageIO's FreeImage to convert and hdr to a jpeg image? I've written a function that takes and EXR and converts it to a jpg and the results looks like this: So I'm stumped on how to take an HDR and convert it to a jpg with similar…
JokerMartini
  • 5,674
  • 9
  • 83
  • 193
1
vote
1 answer

Why does Python crash when my PyQt window becomes inactive/is resized?

While playing around with different ways to show a webcam feed (obtained using imageio/ffmpeg) in a PyQt4 window, I stumbled upon this answer. After implementing this in Python 2.7 as an ImageDisplayWidget class (as summarized below), everything…
djvg
  • 11,722
  • 5
  • 72
  • 103
1
vote
1 answer

How to quickly iterate over and modify pixel arrays with numpy?

First off, i am relatively new to Python and its libraries. The purpose of the following code is to convert a HDR image to RGBM as detailed in WebGL Insights Chapter 16. import argparse import numpy import imageio import math # Parse…
tomfulghum
  • 13
  • 1
  • 5
1
vote
1 answer

Python's imageio module doesn't return more than one frame

I've the following code about the imageio Python library, which loads 2 images I have from the current folder, replaces all the colors > 200 with 0 (making it darker), and then printing the result to a new .gif image: import imageio import numpy as…
Madno
  • 910
  • 2
  • 12
  • 27
1
vote
1 answer

Speed up existing Gif with Imageio Python

I am looking to speed up the gif I made with Imageio in python. I do not have the images that i used to make gif but I do have the gif. I cannot find suitable source for this in imageio documentation or anywhere online. Can you suggest me…
jkhadka
  • 2,443
  • 8
  • 34
  • 56