scikit-image

What is a .pyci file when compiling executables using pyinstaller?

What is a .pyci file when compiling executables using pyinstaller? Question: I am trying to package a python application using PyInstaller. I used the following command: pyinstaller –noconfirm –onedir –windowed –icon "D:/Development/nikke-assistant/images/nikke_icon.ico" –add-data "C:/Program Files/Tesseract-OCR;Tesseract-OCR/" –hidden-import "skimage" –paths "C:/Windows/System32/downlevel" –hidden-import "easyocr" –collect-all "easyocr" –collect-all "scikit-image" –runtime-hook "D:/Development/nikke-assistant/hook.py" "D:/Development/nikke-assistant/nikke_interface.py" When running the executable, I run into …

Total answers: 2

skimage/imageio fails to read grayscale images

skimage/imageio fails to read grayscale images Question: I have been reading images using (Python) skimage.imread (or imageio.imread) for months successfully, but now, without changing the code, I get failures when reading grayscale images. My collaborators can read the files. The image properties are: identify test/resources/biosynth1_cropped/text_removed.png test/resources/biosynth1_cropped/text_removed.png PNG 1512×315 1512×315+0+0 8-bit sRGB 48c 10094B 0.000u 0:00.005 …

Total answers: 1

Creating an image mask using polygon points coordinates

Creating an image mask using polygon points coordinates Question: I have a grayscale image with size (1920,1080) that I”m trying to create a mask for. I used an external software to manually get the points of interest (polygon). There are now 27 coordinates points representing a polygon in the middle of the image. I created …

Total answers: 1

How to calculate corect way the entropy on image?

How to calculate corect way the entropy on image? Question: When I want to calculate the entropy on an image I got only blank white image. How can I do it in the correct way? def entropy_of_image(image): image_gray = rgb2gray(image) f_size = 20 radi = list(range(1,10)) entropy_tmp = entropy(image_gray, disk(radi[8])) plt.savefig(‘images/tmpentropy.jpg’) return entropy_tmp and I …

Total answers: 1

Resizing binary mask stored in numpy array

Resizing binary mask stored in numpy array Question: I have got numpy arrays consisting of only 0s and 1s. They are supposed to be the target for an Image Segmentation Model, so I am trying to resize them all so they have the same dimensions. The problem is that when resizing with the code below, …

Total answers: 1

circular import in official skimage libraries?

circular import in official skimage libraries? Question: I want to run some basic circle detection with skimage, but I’ve got circular import. What can be the problem here? I’ve tried the code from here: https://stackoverflow.com/a/58124466/7973735 This code needs import cv2 import numpy as np from skimage.feature import peak_local_max from skimage.segmentation import watershed from scipy import …

Total answers: 1

how to change the particuler elements of an array

how to change the particuler elements of an array Question: I have an array for an example: import numpy as np data=np.array([[4,4,4,0,1,1,1,1,1,1,0,0,0,0,1], [3,0,1,0,1,1,1,1,1,1,1,1,1,1,0], [6,0,0,0,1,1,1,1,1,1,1,1,1,1,0], [2,0,0,0,1,1,1,0,1,0,1,1,1,0,0], [2,0,1,0,1,1,1,0,1,0,1,0,1,0,0]]) Requirement : In the data array, if element 1’s are consecutive as the square size of ((3,3)) and more than square size no changes. Otherwise, replace element value 1 …

Total answers: 2

How to use image from PIL ImageGrab without saving it to a file?

How to use image from PIL ImageGrab without saving it to a file? Question: I’m trying to compare the structural similarity of two images with the skimage package but it only works if use two images saved on my pc and not when I use an image created by ImageGrab from PIL even it’s basically …

Total answers: 1

Select area (square) with specific measure from an image using skimage python

Select area (square) with specific measure from an image using skimage python Question: I’m trying to extract 3 areas from the image (lungs image) these areas are indicated in the soft tissues, each area will be a square of specific height and width e.g. 10mm for width and height, as shown in the image below, …

Total answers: 1

Setting a list of (x,y) cooordinates into an array so polygons are drawn

Setting a list of (x,y) cooordinates into an array so polygons are drawn Question: I have some code that prints out a list of coordinates (stored in points f=open(‘139cm_2000_frame27.json’) data=json.load(f) shapes=data["shapes"] for i in shapes: print(i[‘label’]) # prints the label first for c in i[‘points’]: d=np.array(c) print(d) # an array containing coordinates in the form …

Total answers: 1