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
2 answers

Python pillow put text in center/middle

I am trying to put the text always in middle from very side. and i found this solution, but it doesnt work when i make the font size bigger. I found this solution, it doesnt work too: Center-/middle-align text with PIL? This is my snippets: from PIL…
anamul
  • 13
  • 4
1
vote
0 answers

Open images in .cine file with Python module imageio

Using a Phantom high speed camera, the software saves an array of images in the '.cine' file format. This format is supported by imageio in python according to the docs. So, I installed the FreeImage backend as described elsewhere and tried to load…
Adriaan
  • 189
  • 1
  • 8
1
vote
1 answer

List to numpy array to write with imageio as video

I have a list as all_frames. I want to write this as a video with imageio but I got the error that you can find in below. How can I change all_frame from list to np.array? You can find imageio code in below: all_frames = [] for j, image in…
Atakan
  • 45
  • 4
1
vote
1 answer

How to get the last frame of a video with imageio in python?

I wanna grab 5 frames of a video distributed evenly including first and last frame. The answer to this helped me to loop over the video and get frames. However I didn't find out how to know when it's gonna be the last frame. Also looping over the…
JasonTS
  • 2,479
  • 4
  • 32
  • 48
1
vote
1 answer

Set webcam grabbing resolution with ImageIO in Python

Using simple Windows/Python to read from Webcam: camera = iio.get_reader("") screenshot = camera.get_data(0) camera.close() I'm getting a default resolution of 1980x1920. The webcam had different, larger resolutions available. How do I set…
Gabe
  • 630
  • 1
  • 9
  • 25
1
vote
1 answer

gif generating using imageio.mimwrite

I have the following code to generate GIFs from images, the code works fine and the gif is saved locally, what I want to do rather the saving the GIF locally, I want for example data URI that I could return to my project using a request. How can I…
M-Rb3
  • 21
  • 1
  • 5
1
vote
2 answers

How to convert a float32 img to uint8 where range is(-1 to -0.85)?

I want to convert a float32 image into uint8 image in Python. I tried using the following code, but the output image only has values like 2 and 3 so the image is practically black. gen_samples[0] * 255).round().astype(np.uint8) When I try…
Matblanket
  • 55
  • 4
1
vote
1 answer

Pyinstaller .exe fails in image reading

I have a gui ocr application in python. Script runs successfully. However when I build it via pyinstaller with the command below, python -m PyInstaller --upx-dir='D:\upx-3.96-win64' --paths=Baris --add-data './images;images' --collect-all easyocr…
1
vote
1 answer

Combination of RawPy and imageio result in red image

I want to do some image processing using .dng files. I am using rawpy to convert the file into a numpy array. Then imageio to save the image. It is a very simple code, given on the rawpy webpage. The resulting .png image is not as I expect it to be.…
Jop de Boo
  • 11
  • 1
1
vote
0 answers

pkg_resources.ContextualVersionConflict: (numpy 1.19.5), Requirement.parse('numpy>=1.20.0'),

I find some version conflict. pkg_resources.ContextualVersionConflict: (numpy 1.19.5 (/home/mehnaz/environments/nnUnet_ve/lib/python3.6/site-packages), Requirement.parse('numpy>=1.20.0'), {'imageio'}) it means I need to install numpy >=1.20.0…
1
vote
3 answers

How set white color background when concatenating images via python?

import numpy as np from imageio import imread, imwrite im1 = imread('https://api.sofascore.app/api/v1/team/2697/image')[...,:3] im2 = imread('https://api.sofascore.app/api/v1/team/2692/image')[...,:3] result =…
Digital Farmer
  • 1,705
  • 5
  • 17
  • 67
1
vote
0 answers

imagio throws an error when i try to extract text

I am trying to package a computer vision software using pyinstaller. But python-imagio from easyocr seems to have a problem with something I suspect is handling formats. The Gui runs fine. I am able to capture images. But after capturing, when it…
1
vote
1 answer

Pyinstaller Codec Error on Executable When Using No Console And No Debug Option

I'm making this program that uses imageio and imageio-ffmpeg, I want to turn it into an executable, so I entered the virtualenv environment I'm using for the project, generated the .spec with pyi-makespec, and after trying for a long time, I got it…
1
vote
0 answers

Audio is not merging with video during conversion in Python

I have used a function in python to convert video formats using Imageio and it is working, but the audio in the output video is removed during conversion, is there any way to put the audio back in the output video? import Imageio import os …
Akascape
  • 219
  • 2
  • 11
1
vote
5 answers

Combine all tiff images into one single image

I have 15 tiles or tiff files a folder and I would like combine it as a single file with all the images as one tiff image. All the tiles should be stitched as a single tiff image. How do I do that? What I tried so far? import imageio import os path…