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.
Questions tagged [python-imageio]
191 questions
1
vote
1 answer
How to I change a specific range of pixels with respect to a condition given in numpy?
Libraries Imported:
%matplotlib inline
import numpy as np
from scipy import misc
import imageio
import matplotlib.pyplot as plt
from skimage import data
Like I created a:
low_value_filter= dogs2 < 80
and did:
…

Ayush Phukan
- 11
- 2
1
vote
1 answer
Save 3D plot with imageio
I want to save a 3D plot as a gif. However, for reasons I cannot explain, the following code does not work. I get the error message: Image must be 2D (grayscale, RGB, or RGBA), when I use imageio.mimsave(...), but I saved my image as RGB:
import…

Physics
- 113
- 3
1
vote
1 answer
ImageIO PSD to PyQt QImage
I am trying to display a photoshop image in PyQt. I have been using the python imageio module to load images and through a series of steps convert them to a QImage as below. This works for many different things such as .exr, .hdr, etc. However when…

Spencer
- 1,931
- 1
- 21
- 44
1
vote
0 answers
Chess board to list
So I have a picture of a chess board and I have pictures of pieces and tiles, and now I need to figure out how to translate the data from an image into a board list (8x8 list where pieces that are on the image would be correctly positioned). I…

Marko Maksimovic
- 67
- 14
1
vote
1 answer
Using python and selenium to download an image using the image's "src" attribute
I'm new to Python and Selenium. My goal here is to download an image from the Google Image Search results page and save it as a file in a local directory, but I have been unable to initially download the image.
I'm aware there are other options…

mgermaine93
- 47
- 4
1
vote
0 answers
Imageio and cv2 Read Image - jpeg
I am working on augmenting some images and I have run not necessary into a problem, but something that struck me as odd. For most of my augmentation methods I am using the Imgaug library and using imageio.imread to read my files. Though for my…

Binx
- 382
- 7
- 22
1
vote
1 answer
Creating a gif from pngs: looping through images seems too fast and only works in debug mode
I'm trying to create a gif image from several (in this case only 5) png files. I can create the gif if I debug the code at the point the looping through the images occurs. Otherwise the execution appears to be too fast. Here is my code:
img, *imgs =…

pymat
- 1,090
- 1
- 23
- 45
1
vote
1 answer
ImageIO.imwrite "ValueError: Could not find a format to write the specified file in single-image mode" for
I'm trying to save images that were processed (started as Raw Image, want to save it back to Raw/dng/nef)
This given ndarray is just -1,0,1 where certain pixels exceeded a threshold
I'm having trouble grasping what the issue is here…

E Wils
- 21
- 2
1
vote
1 answer
imageio individual frame rates
It's easy to do a gif with the imageio module like this:
import imageio
imageio.mimsave(path_gif_out, paths_pngs_in, fps=2)
But is it possible to change the frame rate of the individual frames? For example I would like the last frame rate to appear…

tommy.carstensen
- 8,962
- 15
- 65
- 108
1
vote
0 answers
How to get full frames correctly for difference-based GIFs using Python Imageio?
GIFs are images that can be animated, i.e. consist of a sequence of frames. There are two types of GIFs in the world: Type A stores each frame separately, and type B instead stores the differences between subsequent GIFs.
I am loading GIFs using…

xjcl
- 12,848
- 6
- 67
- 89
1
vote
1 answer
imageio generates black image sequence
I am trying to write an image sequence into gif file with imageio, but I am getting just a black image.
The code I am using:
import imageio
import numpy as np
m=np.zeros((5,5))
for i in range(5):
m[i,3]=1
with…

MStikh
- 368
- 4
- 21
1
vote
0 answers
python imageio low resolution high frequency video - imagio can not read video correctly
I try to load a low res, high frequency video into and extract and edit some frames and save them as a gif.
checking the length of the loaded video gives me "inf" which can not be true, can it?
filename = 'eye0.mp4'
vid =…

Peter
- 51
- 5
1
vote
0 answers
Imageio or OpenCv saves black blank image after altering image array
Okay, I am trying to do sort of simple image encryption for my college project, all I need to do is open an image as a numpy array and increment the pixel values by an integer key, then save it as 16 bit image, then open that Image and. But whenever…

Sattwik Roy
- 11
- 1
1
vote
1 answer
Change gif characteristics
I have written a python code which creates a gif from a list of images. In order to do this, I used the python library: imageio. Here is my code :
def create_gif(files, gif_path):
"""Creates an animated gif from a list of figures
Args:
files…

Ko.Pe
- 15
- 1
- 5
1
vote
1 answer
Import image as RGB pixels of "imageio.core.util.Image" type in Python
I want to import some images with its split RGB values, For some images it works and for some others, the output gives just one value for RGB of a pixel.
Here's the image for which the code works:
if os.path.isfile(location1):
image =…

Fatemeh Asgarinejad
- 649
- 9
- 15