Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
130 views

I have a 3D numpy array with density values. I would like to rotate this array around the origin to uniformly sample the sphere as closely as possible. I found some answers here that allow me to get ...
0 votes
1 answer
150 views

I have a boolean array to indicate dry days: dry_bool 0 False 1 False 2 False 3 False 4 False ... 15336 False 15337 False 15338 False 15339 False ...
4 votes
1 answer
318 views

I apologise in advance, I may just not understand convolution. I'm struggling to reconcile the results using scipy.ndimage.convolve with what I get attempting to do it by hand. For the example in the ...
1 vote
2 answers
159 views

Below I give an example in 2D, but my real question would be regarding 3D (with or without periodic boundaries). Find all unique neighbors for each segment id using 8 neighbors (2d) or 26 neighbors (...
1 vote
1 answer
359 views

I have some high dimensional boolean data, in this example an array with 4 dimensions, but this is arbitrary: X.shape (3, 2, 66, 241) I want to group the dataset into connected regions of True ...
0 votes
1 answer
716 views

I need to perform a convolution on an image in-place, and by in-place I mean such that as the structuring element gets applied to different pixels, I want the result of the previous steps to overwrite ...
4 votes
2 answers
3k views

Has someone found/understood how works scipy.ndimage.median_filter for even sizes? Because I tested a lot of theories and tried to read the source code, but I haven't an explanation (Of course it's ...
0 votes
2 answers
245 views

While trying to do ndimage.convolve on big numpy.memmap, exception occurs: Exception has occurred: _ArrayMemoryError Unable to allocate 56.0 GiB for an array with shape (3710, 1056, 3838) and data ...
4 votes
1 answer
72 views

Starting with a 2d array of 0s and 1s, I need to identify which 1s form a united fence completely enclosing one or more adjacent 0s. Those 0s are considered adjacent if they touch on their sides or ...
Jim's user avatar
  • 175
0 votes
2 answers
2k views

Is there a way to perform a process similar to erosion in OpenCV that retains a given pixel if ANY of its neighbors are non-zero, instead of requiring all of its neighbors to be non-zero? Here, by ...
1 vote
1 answer
394 views

I first binarized an image and then filtered it in python. Now how can I add every pixel> 0 to a numpy array? img = Image.open('native.png').convert('RGB') binarised = img.convert('LA') # binarised....
user avatar
2 votes
2 answers
673 views

I have a 2D array, where I label clusters using the ndimage.label() function like this: import numpy as np from scipy.ndimage import label input_array = np.array([[0, 1, 1, 0], ...
0 votes
1 answer
742 views

I'm working on rotating the image. However, when I'm using the scipy.ndimage.rotate() function I can rotate the full image (reshape=True), but the shape of array will be changed. For instance, as the ...
0 votes
1 answer
238 views

I'm trying to map pixels values from one image to another on the gpu with Python cupyx.scipy.ndimage map_coordinates function. The output cupy-array is all zeros. When I'm using scipy.ndimage to run ...
rotemp's user avatar
  • 31
1 vote
0 answers
37 views

I try to label a huge image (69940, 70935) using ndimage.label. Label thus try to allocate a int64 ndarray (37 GiB) which is too big for my computer. import rasterio as rio import ndimage as ndi ...

15 30 50 per page
1
2 3 4 5
...
8

AltStyle によって変換されたページ (->オリジナル) /