image-segmentation

Extracting specific objects from an image

牧云@^-^@ 提交于 2019-12-11 19:03:47
问题 Given the dataset of the object, I would like to extract that object from an image. The object is leaf in my case. It is easy in these kind of situation where there is only one big leaf in front of the camera. This can be done using the edge detected version of this picture as suggested in this answer as we are getting somewhat clear edge of what we want as output. for reference : But how can I extract all the leaves from an image in which there are a lot of such leaves. for example : for

Keras/TF error: Incompatible shapes

会有一股神秘感。 提交于 2019-12-11 17:55:55
问题 I've got an error: InvalidArgumentError (see above for traceback): Incompatible shapes: [12192768] vs. [4064256] [[Node: mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](Reshape, Reshape_1)]] Here is my code: import numpy as np import os from skimage.io import imread, imsave from keras.models import load_model, Model from keras.layers import Conv2D, MaxPooling2D, Input, concatenate, Conv2DTranspose from keras.optimizers import Adam from keras.callbacks import TensorBoard

Image segmentations with gradient filled regions

流过昼夜 提交于 2019-12-11 17:27:17
问题 I have to work on image segmentation. The idea is to divide an image into regions which have pixels either of the similar color or the ones which can be represented by a gradient equation (linear or radial). I have found many algorithms which do the separation based on colors but could not find anyone which handles gradients. Does someone know any such algorithm or suggestions on how to go for it. 回答1: Mean-Shift Segmentation might be what you are looking for. It is implemented in OpenCV. It

Convert image array to original svs format

冷暖自知 提交于 2019-12-11 16:55:02
问题 I'm trying to apply a foreground extraction to a SVS image (Whole Slide Image) usign OpenSlide library. First, I converted my image to an array to work on my foreground extraction: image = np.asarray(oslIm.read_region((0, 0), level, oslIm.level_dimensions[level]), dtype=np.uint8)[:, :, 0:3] After that I generated my mask, which I applied to my converted image: plt.imshow(image * final_mask[:, :, np.newaxis]) plt.xticks([]) plt.yticks([]) plt.savefig("./masks/ResultingImage.png", format='png',

segment each character from noisy number plate

ぐ巨炮叔叔 提交于 2019-12-11 15:54:10
问题 I am doing a project on Nepali Number Plate Detection where I have detected my number plate from the vehicle ani skewed the number plate but the result is a noisy image of number plate. I want to know how to segment every character out of it so it could be sent for detection part. I tried doing this but it just segmented the characters from second line. def segment(image): H = 100. height, width, depth = image.shape imgScale = H/height newX,newY = image.shape[1]*imgScale, image.shape[0]

Morphological operation to improve the shape of segmented image

空扰寡人 提交于 2019-12-11 12:56:10
问题 I have an ellipse in the image.After segmentation i got a broken ellipse as shown .which morphological operation is used to get the perfect ellipse Actual input file is output obtained is i tried imopen ,but i will lose lower ellipse like structure .how to close the upper ellipse like structure without losing lower ones Mask i created is i want to segment the ellipse like structure.but some of these structures are connected with rectangular like bodies.how to separate it. erode will eliminate

How to blur the image according to segmentation map

落花浮王杯 提交于 2019-12-11 12:09:26
问题 Forgive me if I am unable to explain well because I am not native speaker. I am working on blurring the part of image according to the white part of segmentation map. For example here is my segmentation image ( bmp image ). . Now what I want is to blur the part of original image where the pixels are white in the segmentation map. I just wrote the following code to so. mask = mask >= 0.5 mask = np.reshape(mask, (512, 512)) mh, mw = 512, 512 mask_n = np.ones((mh, mw, 3)) mask_n[:,:,0] *= mask

segment object(leaf) which is on the white paper using image processing

这一生的挚爱 提交于 2019-12-11 08:19:09
问题 I want to get only leaf from an image. The background is a normal white paper(A4) and there is some shadow. I apply some method (structure element,edge detection using filter) but I cannot find the general way which can apply all the image. these are examples. Are there better methods for this problem?? thank you another example. and the result I got is By using hsv_I = rgb2hsv(I); Is = hsv_I(:,:,2); Is_d = imdilate(Is,strel('diamond',4)); Is_e = imerode(Is,strel('diamond',2)); Is_de =

Jgraph: General Traversal & Forest Traversal

我的未来我决定 提交于 2019-12-11 06:02:23
问题 Good morning/afternoon/evening. So our data structures course gave us an assignment to segment a grayscale image in java using the following algorithm: Input: A gray-scale image with P pixels and number R Output: An image segmented into R regions 1. Map the image onto a primal weighted graph. 2. Find an MST of the graph. 3. Cut the MST at the R – 1 most costly edges. 4. Assign the average tree vertex weight to each vertex in each tree in the forest 5. Map the partition onto a segmentation

How to overlay segmented image on top of main image in python

只愿长相守 提交于 2019-12-11 05:13:23
问题 I have an image in RGB and another segmented image in which the pixels have 3 values(segmented image). I want to overlay the segmented image on top of the main image as the segmented areas make contours over the main image such as image below. Here the value of the segmented image pixels are 0, 1 and 2. The red contour shows the contour of pixels with value1 , the yellow contour shows the contour of pixels with 2 value and the background pixel value is 0. the image is from the paper "Dilated