scikit-image

Filter 2D array and return co-ordinates from intermediate

你。 提交于 2020-05-15 02:26:35
问题 I have a 2D array of zeros with some positive integers at (1,6) and (2,7): [[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 2. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 2. 0. 0. 0. 0. 0. 0. 0. 0. 0.] [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]] And I want to filter the array by a custom kernel: [[1 0 1] [0 1 0] [0 1 0]] I want to filter the array with this kernel and when 2 or 3 of the ones in this kernel are multiplied by a positive integer, I want

CIELAB color range for Scikit-image?

与世无争的帅哥 提交于 2020-05-14 22:30:41
问题 I am working on CIELAB colour space but cannot find any information about the range of each channel produced by skimage.color.rgb2lab . Thanks. 回答1: Just would like to post the answer from @Stefan L: 0 to 100, a: -127 to 128, b: -128 to 127. 回答2: Quote from wiki, https://en.wikipedia.org/wiki/CIELAB_color_space The scaling and limits of the a* and b* axes will depend on the specific implementation, as described below, but they often run in the range of ±100 or −128 to +127 (signed 8-bit

CIELAB color range for Scikit-image?

假装没事ソ 提交于 2020-05-14 22:29:10
问题 I am working on CIELAB colour space but cannot find any information about the range of each channel produced by skimage.color.rgb2lab . Thanks. 回答1: Just would like to post the answer from @Stefan L: 0 to 100, a: -127 to 128, b: -128 to 127. 回答2: Quote from wiki, https://en.wikipedia.org/wiki/CIELAB_color_space The scaling and limits of the a* and b* axes will depend on the specific implementation, as described below, but they often run in the range of ±100 or −128 to +127 (signed 8-bit

Alternative to scipy.misc.imresize()

≡放荡痞女 提交于 2020-05-10 08:48:14
问题 I want to use an old script which still uses scipy.misc.imresize() which is not only deprevated but removed entirely from scipy. Instead the devs recommend to use either numpy.array(Image.fromarray(arr).resize()) or skimage.transform.resize() . The exact code line that is no longer working is this: new_image = scipy.misc.imresize(old_image, 0.99999, interp = 'cubic') Unfortunately I am not exactly sure anymore what it does exactly. I'm afraid that if I start playing with older scipy versions,

Alternative to scipy.misc.imresize()

99封情书 提交于 2020-05-10 08:46:07
问题 I want to use an old script which still uses scipy.misc.imresize() which is not only deprevated but removed entirely from scipy. Instead the devs recommend to use either numpy.array(Image.fromarray(arr).resize()) or skimage.transform.resize() . The exact code line that is no longer working is this: new_image = scipy.misc.imresize(old_image, 0.99999, interp = 'cubic') Unfortunately I am not exactly sure anymore what it does exactly. I'm afraid that if I start playing with older scipy versions,

how to convert bayerrg8 format image to rgb image

主宰稳场 提交于 2020-05-09 15:55:50
问题 I've got a camera that provides images in Bayer RG8 format. I'm using skimage for processing images, but I could not find away to convert the Bayer RG8 format to standard RGB (to display on screen). Is there any way to do this with skimage? I did find a reference to opencv conversion, but I'm trying to avoid including opencv in my app (unless it is absolutely necessary). 回答1: As you have not provided any input data, I took the greyscale image from here and made it into a raw Bayer8 file with

Wrong predicted images size from predict_generator for multi label Unet

北城以北 提交于 2020-04-17 21:13:34
问题 Im using aerial images to segment road and centerline using multi label u-net, my test generator is look like this def testGenerator(test_path= "data\\membrane\\test\\image",num_image = 1584,target_size = (224,224),flag_multi_class = False,as_gray = False): for i in range(num_image): img = io.imread(os.path.join(test_path,"%d.jpg"%i),as_gray = as_gray) img = img / 255. img = trans.resize(img,target_size) img = np.reshape(img,img.shape) if (not flag_multi_class) else img img = np.reshape(img,

Wrong predicted images size from predict_generator for multi label Unet

拜拜、爱过 提交于 2020-04-17 21:12:01
问题 Im using aerial images to segment road and centerline using multi label u-net, my test generator is look like this def testGenerator(test_path= "data\\membrane\\test\\image",num_image = 1584,target_size = (224,224),flag_multi_class = False,as_gray = False): for i in range(num_image): img = io.imread(os.path.join(test_path,"%d.jpg"%i),as_gray = as_gray) img = img / 255. img = trans.resize(img,target_size) img = np.reshape(img,img.shape) if (not flag_multi_class) else img img = np.reshape(img,

Point Cloud triangulation using marching-cubes in Python 3

浪尽此生 提交于 2020-03-22 03:08:22
问题 I'm working on a 3D reconstruction system and want to generate a triangular mesh from the registered point cloud data using Python 3. My objects are not convex, so the marching cubes algorithm seems to be the solution. I prefer to use an existing implementation of such method, so I tried scikit-image and Open3d but both the APIs do not accept raw point clouds as input (note that I'm not expert of those libraries). My attempts to convert my data failed and I'm running out of ideas since the

Detecting Malaria Cell in scan image

こ雲淡風輕ζ 提交于 2020-03-03 07:46:13
问题 I use the malaria scan image to classify the image has malaria or not. The data set is downloaded from kaggle. I achieve above 96% of accuracy. Now, I wonder how to detect the cell in the scan image. I need to point out the malaria cell in the image or draw the outline for the malaria cell. Sample Image which contains malaria cell How can I achieve the detection in this problem, Any help Thanks 回答1: If I assume you want to locate the dark purple in the image, then this is one way to do it