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
0
votes
4 answers

RuntimeError: imageio.ffmpeg.download() has been deprecated. Use 'pip install imageio-ffmpeg' instead.'

I'm trying to run the Lane-detection Project from here with the Jupiter notebook. I get this Runtime-Error: Picture of the Error When I try to run this code: # Import everything needed to edit/save/watch video clips from moviepy.editor import…
Dan Beri
  • 53
  • 1
  • 1
  • 4
0
votes
1 answer

Function imwrite on imageio (Python) seems to be rescaling image data

The function imwrite() on imageio (Python) seems to be rescaling image data prior to saving. My image data has values in the range [30, 255] but when I save it, it stretches the data so the final image spreads from [0, 255], hence creating "holes"…
Guillermo Luijk
  • 199
  • 1
  • 7
0
votes
1 answer

Handling HTTPError from imageio.imread

I'm using imageio.imread and have a list of image URLs that can give 404 errors. import imageio as io try: imag = io.imread("http://static.booking.com/images/hotel/org/591/59160587.jpg") except HTTPError as e: print("whatever") Neither this…
andandandand
  • 21,946
  • 60
  • 170
  • 271
0
votes
1 answer

Iterate Images through Folder

i have a folder of gray-scale images from 0 to 9 and they are around 2400, i need to load them in python so as to have all Zeors together as an array , then Ones together as an array, etc... i used below code to load one image as an array but i…
Abdo
  • 9
  • 2
0
votes
1 answer

Imageio cannot find Pillow

I try to run the example on http://ndres.me/post/matplotlib-animated-gifs-easily/: import matplotlib import matplotlib.pyplot as plt import numpy as np import imageio def plot_for_offset(power, y_max): # Data for plotting t = np.arange(0.0,…
0
votes
1 answer

images order while making gif using imageio

I am making a gif by imageio module using generated .png files. Although the .png files are sorted and in an order of numbers, the generated .gif animation does not follow this order. What is the reason? Here is my code so…
Behnam
  • 501
  • 1
  • 5
  • 21
0
votes
1 answer

imageio: AttributeError: 'module' object has no attribute 'imread'

I come up with the error AttributeError: 'module' object has no attribute 'imread' while using the imageio module with the following code. I searched the community a lot but all of the errors about imread command are discussed under scipy, but…
Behnam
  • 501
  • 1
  • 5
  • 21
0
votes
1 answer

Put a custom palette and custom framerate in animated gif using python

I'm trying to write a series of numpy array as an animated gif. I need to control strictly the colormap or palette (which color is associated with each integer value in the array), so that it matches the indices in the arrays I found the…
0
votes
1 answer

Imageio flips black and white

I have a binary black and white image as a .tif file. I do this image = imageio.imread(path) print ' Min and max ', image.min(), image.max(), image.shape, type(image[0,0]) imageio.imsave(path, image) Which prints Min and max 0 255 (1024, 1024)…
Baron Yugovich
  • 3,843
  • 12
  • 48
  • 76
0
votes
1 answer

Imageio unable to read webcam at correct framerate

I'm trying to read frames from a webcam and analyze them in realtime, but since my function AnalyzeFrame() is faster than the framerate, it ends up pulling the same frame 1-4 times in a row, messing up my data. Here's basically what I'm…
Nick Porter
  • 163
  • 8
0
votes
1 answer

Why does GIF pixel values change when saved in python?

I'm trying to write a steganography applcation using the LSB method and it works so far well enough for a few image formats . However it doesn't work for GIF images since i have noticed that the saved gif has a few different pixel values (usually +-…
0
votes
0 answers

optimize the 128mb EXR image

in initializeGL in QGLWidget: I'm loading a .exr image (128mb) 4000x2000 with imageio.imread from imageio import imread img_array = imread("c:/sample.exr") self.textureID = glGenTextures(1) in paintGL in QGLWidget: I draw my single quad with…
Bear
  • 550
  • 9
  • 25
0
votes
2 answers

increase paper size of postscript for animation

I'm trying to create an animation out of multiple postscript figures but the resulting animation is very small. When I check the properties of the figures I see that the paper size is small. If I manually increase the size (e.g. using GIMP) the…
user605364
  • 11
  • 2
0
votes
1 answer

Encode part image in python

Now I want to encode part image in base64 and I did do it. For example, here is an image 1080x1920, but part of this image is needed. Top:160, left:340, right:1024, bottom:650. # first crop im = Image.open(original) region = im.crop((160, 340,…
CoXier
  • 2,523
  • 8
  • 33
  • 60
0
votes
1 answer

Imageio python converts GIF to MP4 incorrectly

I am writing a function to speed up/down a given GIF (or .gifv) file, and save the resulting animation as an .mp4 file. I'm using the python imageio package (and its ffmpeg plugin) to do this - download the raw binary data from the gif, write each…
1 2 3
12
13