Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

Question list filters

Filter by
Sorted by
Tagged with
Filter by Employee ID
Score of 2
1 answer
80 views

I have a small Python code to read and save an image: import numpy as np # from scipy.misc import imread, imsave # Not working from imread import imread, imsave img = imread('tst-image.jpg') # print(...
Score of 0
1 answer
167 views

I am trying to read and show a photo, it works when I use plt.imshow(..) and I know for sure that the photo and the path are ok. when I try using cv2 it says the photo is a nonetype import numpy as np ...
Score of -1
1 answer
137 views

I am new to this image detection thing and I've been following a youtube video and trying to make a program that detects an image so I can automate some fishing in a game. But I keep getting this ...
Score of 0
0 answers
139 views

I have a folder with ~800 tiff images. i wrote the following code to save these as multiple tiff stacks of 220 images each. In a later section of this code, i try to open the tiff stacks that I've ...
Score of 1
1 answer
993 views

so, I have a few png files that are saved following the pattern name_number1_section_number2 The two fields number1 and number 2 are taken up by integers, so a file would be named name_1_section_23 ...
Score of 0
0 answers
165 views

(First time user) I want to read tif files from a folder. N=22 (the number of tif files in the folder) The name of the folder is: tif_files The file names start at E_0 and ends at E_21 I'm reading the ...
Score of 0
1 answer
508 views

This is my robot class file content *** Settings *** Library ./robotautogui.py *** Test Cases *** move it move_mouse_to 600 200 and my custom python library file import pyautogui class ...
Score of 0
1 answer
218 views

After imread into a variable and sending it to the function, it returns an error "Dot indexing is not supported for variables of this type." Not sure why, it seemed to work with jpg, but ...
Score of 0
1 answer
197 views

I want to import a gray scale .png image into matlab. 2) I want it represented as a scalar field such that each pixel has a corresponding matrix element, and matrix operations can be done on it. 3) ...
Score of 0
1 answer
1818 views

I am working on app where react-native as a frontend and django-rest-framework as a backend. From frontend I am sending Image using formdata in backend. But I am getting this error Can't convert ...
Score of 3
2 answers
2614 views

I'm reading an jp2 file using openCV's imread(). The image loads, but it's always grayscale. I saw in the documentation that some IMREAD_FLAGS could cause this and I also know that cv2 may change the ...
Score of 1
0 answers
188 views

The image in question is a uint16 pgm image with a bit depth of 10 but saved as 16-bit. When reading the image using Matlab's imread, the pixel values are 2^6 times larger than those obtained using ...
Score of 1
1 answer
353 views

picture_4000*4000: the python code is: import cv2 pic_data = cv2.imread(path_to_picture) the pic_data is: pic_data Out[21]: array([[[125, 189, 204], [125, 189, 204], [125, 189, 204],...
Score of 0
0 answers
176 views

Im using matplotlib and numpy to turn a png file (link to image: https://imgpile.com/i/boANTE) into a 2d array using this code: import numpy as np from matplotlib import pyplot as mat_plot mapimage =...
Score of 0
0 answers
341 views

I need to do use bitAnd operation with img1 and each image of the directory. I read each image as img2. img1 = np.zeros((600, 400, 3), np.uint8) center_coordinates = (320, 200) axesLength = (300, 80) ...
Score of 0
1 answer
295 views

I am using this code for conversion of JPGs to GIF animation. It works but produces strange colors (first and second picture in animation have incorrect colors and third is OK). I would like to ask ...
Score of 1
1 answer
822 views

Imread is not working anymore with ".tif" (48 bits) file after updating the OpenCvSharp wrapper version from OpenCvSharp3Any-Cpu (wrapper 4.X) to OpenCvSharp4.Windows and .Extensions. The ...
Score of 1
1 answer
581 views

Openvino throws "RuntimeError: Cannot get dims for non static shape" when an image is passed as numpy array to openvino Core().compile_model(). But the same image when passed after doing a ...
Score of 2
3 answers
2409 views

So I have a variable that holds the image path as a string. but I get the below error while trying to read the image using the path variable. The path variable is coming from another function that ...
Score of 0
1 answer
2703 views

I want to resize an image but it turns blue when I use the method. My venv has: Python 3.9 opencv-python==4.5.5.64 I'm working on a .ipynb file through Pycharm. Have this cell after imports: sns....
Score of 0
0 answers
330 views

images = glob.glob('../catkin_ws/src/project1/images/*.jpg') print(images) When I print the variable images I get all the image file like this in an array. ['../catkin_ws/src/project1/images/img1.jpg'...
Score of -1
1 answer
1117 views

While working with OpenCV, I found a curious behavior and my knoledge couldn't explain it. Maybe someone will have the answer. image= cv.imread("image.jpg", 0) __, thre = cv.threshold(image, ...
Score of 0
1 answer
1960 views

With the following code, plt.gray() is not working and showing a colour image instead of grayscale. Even I put cmap="gray" separately in plt.imshow, still it is showing the image in colour. ...
Score of 1
0 answers
49 views

I'm using opencv 3.1.0, tried to read an image by imread, just like Mat image = cv::imread("1.jpg"); but it stunked without any error message (performs like in an endless loop) I changed ...
Score of 1
3 answers
1105 views

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]...
Score of 0
1 answer
145 views

I want to loop through a list of images in Matlab by unsing a loop. I want to get one Image at a time and turn it into a Matrix by using the imread function. Then I want to save each Matrix in a ...
Score of 0
1 answer
298 views

I have some photos taken by UAV, and I find that the view of some photos read by cv2.imread and plt.imread are different, one of them is upside down (180° rotation), but most photos are the same. Why?
Score of -1
1 answer
413 views

I am working with a dataset of 72 images and 72 masks. I appended the images into a numpy ndarrayI want the cv2 to read the files from the path corresponding to the files in the numpy ndarray. this is ...
Score of 2
1 answer
2139 views

I am using skimage.io.imread (which uses tifffile) to read a QPTIFF file. Multiple channels are successfully read as multiple dimensions. Is it possible to extract the channel names and other metadata?...
Score of 0
2 answers
853 views

I try to import several images to opencv with cv.imread() function. I think there is a problem with the way I give the path to imread(). With one file it's ok with: cv.imread('data/img.png') But ...
Score of -1
2 answers
1269 views

There are several ways in python to generate a greyscale image from an RGB version. One of those is just to read an image as greyscale using OpenCV. im = cv.imread(path, cv.IMREAD_GRAYSCALE) Another ...
Score of 2
2 answers
260 views

How can I render images sequentially in Spyder? At the moment, it turns out to display only the last image from skimage.io import imread, imshow img_5 = imread('C:/abc1.png') imshow(img_5) img_6 = ...
user avatar
Score of 0
1 answer
4000 views

import skimage image = skimage.data.imread("my_image.png") I used this code to read an image, but I got an error as "skimage.data" has no attribute "imread". My skimage ...
Score of 0
2 answers
611 views

I have a 16-bit tiff image with no color profile (camera profile embedded) and I am trying to read its RGB values in OpenCV. However, comparing the output values to the values given when the image is ...
Score of 0
1 answer
236 views

I tried to use a plot as image for my further code. I load an image in my pretrained model and my output is a tensor variable. In the next step I plot it with Image(img_hr).show(figsize=(18,15)). And ...
Score of 1
1 answer
641 views

I am trying to get pixel intensity values from regions of interest in RGB images. I segmented the image and saved the regions of interest (ROI) using regionprops 'PixelList' in MATLAB, as shown below: ...
Score of 0
2 answers
904 views

I have a function that is something like this: void OpenPattern(std::string filename, bool type){ Mat img = cv::imread(filename, cv::IMREAD_COLOR); if(img.empty()){ printf("CANNOT ...
Score of 0
2 answers
2511 views

I am using cv2.imwrite to save my new edited image. Now I want to call that in cv.imread. I want to write my new image to variable so I can call that variable in cv.imread but it looks like cv.imread ...
Score of 0
1 answer
1584 views

I am really new to OpenCV and I was wondering why my debug string for empty matrix is running when I check if I have a png in my directory. I can confirm that I do indeed have an image by given name ...
Score of 1
1 answer
2846 views

Here, I use opencv imread read the all the image without any problem while it raise out Corrupt Data: xxx extraeous bytes before marker 0xd9 when training with neural networks. How could I get out ...
Score of 0
0 answers
99 views

I am working with a large dataset of videos preprocessed and converted in frames. So I have the following folder tree: data training_set class1 video1 Frame0.png, ..., FrameN.png videoN Frame0....
Score of 0
1 answer
413 views

I have a folder with 225 pictures of maps. So, I compiled it to an mp4 file using imageio. Whether it's compiling 10 maps, 150, or all 225, the last picture is always not included in the video. import ...
Score of 0
1 answer
322 views

I am following this tutorial with my custom data and my custom S3 buckets where train and validation data are. I am getting the following error: Customer Error: imread read blank (None) image for file:...
Score of 1
1 answer
832 views

I observed some strange behavior when saving and loading data using matplotlibs imsave() and imread() functions. The RGB values I save are different to the ones I get when loading the picture back in ...
Score of 0
2 answers
279 views

import os train_dir = "/Images/train/" data = [] for i in os.listdir(train_dir): path = os.path.join(train_dir, i) img = cv2.imread(path) print(i) data.append(img) My train ...
Score of 0
0 answers
501 views

I am new to OpenCV. I am trying to apply a Gaussian filter to the images. The below java code is working fine for one image but for all other images in the same or other location in my machine, it is ...
Score of 0
0 answers
118 views

I am using python to learn open CV and while I was trying to image process I came up with a problem. My code is like this: import numpy as np import cv2 img = cv2.imread("Pictures/sun.jpg"...
Score of 0
3 answers
2280 views

I was making a simple program to take an image from the camera but a strange error has occurred: Traceback (most recent call last): File "the path was deleted for stackoverflow", line 3, in &...
Score of 2
0 answers
128 views

I'm trying to get an image from buffer memory into Matlab. For example in C++ and openCV I can get image from memory with; fn_export double ImgFromMem(char* address,double width, double height) { ...
Score of 0
1 answer
681 views

import numpy as np import matplotlib.pyplot as plt import os import cv2 DATADIR = "C:\\Users\\Timmi K. Rysgaard\\OneDrive\\Desktop\\Sculptures\\" CATEGORIES = ["Beetle", "...

1
2 3 4 5 6