image-segmentation

MatLab - Segmentation to separate touching objects in an image

帅比萌擦擦* 提交于 2019-11-28 11:40:23
I'm using the function regionprops to detect the number of trees on a image taked by drone. First I removed the ground using Blue NDVI: Image with threshold: Then I used the function regionprops to detect the number of trees on image: But there are a problem on region 15, because all trees on that region are connected and it detects as one tree. I tried to separate the trees on that region using Watershed Segmentation , but its not working: Am I doing this the wrong way? Is there a better method to separate the trees? If anyone can help me with this problem I will appreciate. Here is the

How to use OpenCV to remove non text areas from a business card? [closed]

烂漫一生 提交于 2019-11-28 07:53:59
my target is to remove any non text area from a scanned business card image but i don't know the steps to perform that using OpenCV , i have followed this steps but don't know this is the right one or not also i don't notice any change in the image (non text areas remains) any idea will be very helpful,thanks. 1) convert the image to grayscale 2) binaries the image 3) invert the colors (cv::bitwise_not) in order to have a white pixels text 4) Erode the image(cv::erode) 5) detect edges using canny 6) detect text lines using hough transform (not yet) code: cv::Mat greyMat = [self.imageView.image

Counting the squama of lizards

社会主义新天地 提交于 2019-11-28 03:09:16
问题 A biologist friend of mine asked me if I could help him make a program to count the squama (is this the right translation?) of lizards. He sent me some images and I tried some things on Matlab. For some images it's much harder than other, for example when there are darker(black) regions. At least with my method. I'm sure I can get some useful help here. How should I improve this? Have I taken the right approach? These are some of the images. I got the best results by following Image

What is “semantic segmentation” compared to “segmentation” and “scene labeling”?

旧巷老猫 提交于 2019-11-28 02:33:24
Is semantic segmentation just a Pleonasm or is there a difference between "semantic segmentation" and "segmentation"? Is there a difference to "scene labeling" or "scene parsing"? What is the difference between pixel-level and pixelwise segmentation? (Side-question: When you have this kind of pixel-wise annotation, do you get object detection for free or is there still something to do?) Please give a source for your definitions. Sources which use "semantic segmentation" Jonathan Long, Evan Shelhamer, Trevor Darrell: Fully Convolutional Networks for Semantic Segmentation . CVPR, 2015 and PAMI,

Segment the image into blocks

只愿长相守 提交于 2019-11-28 02:17:21
Let us consider an image Y of size 512x512. The code below serves to segment the image Y into blocks where each block take the size 8x8. Matlab Code: for m = 1:64 for n = 1:64 subX = Y(8*(m-1)+1:8*m,8*(n-1)+1:8*n); end end What i need in this question is to resolve my two problems below: 1) to segment the image X into 8 x 8 number of blocks (not the size is 8x8 but the number of blocks must be 8x8). In this case the image will become segmented into 64 blocks where each block being contain 512/64 pixels =8 pixels. 2) it is the same concept of 1), but in this case, i want to segment the image

How to identify incomplete rectangles in openCV

走远了吗. 提交于 2019-11-28 01:04:05
问题 How would I go around identifying and extracting rectangles from an image such as the one shown below. Note that my rectangles might be incomplete and have some missing edges and some sides might be partial lines. Thanks ! 回答1: This can be solved using morphological operations such as eroding and dilating. This two operations will help creating closed rectangles. After that you can use the tutorial from this page to detect simple shapes such as rectangles. I implemented a quick demo which

TensorFlow: How to handle void labeled data in image segmentation?

廉价感情. 提交于 2019-11-27 23:31:47
I was wondering how to handle not labeled parts of an image in image segmentation using TensorFlow. For example, my input is an image of height * width * channels. The labels are too of the size height * width, with one label for every pixel. Some parts of the image are annotated, other parts are not. I would wish that those parts have no influence on the gradient computation whatsoever. Furthermore, I am not interested in the network predicting this “void” label. Is there a label or a function for this? At the moment I am using tf.nn.sparse_softmax_cross_entropy_with_logits . I'm not 100%

Overlapping sliding window over an image using blockproc or im2col?

主宰稳场 提交于 2019-11-27 14:52:48
I have to apply dct2 to small windows of my image, preferably by using an overlapping window. I have found out that there are two functions in Matlab that can make this possible blockproc and im2col . I am having trouble understanding either and would appreciate some clarification. blockproc can be used to implement my function on a sliding window using the BorderSize and TrimBorder arguments. B = blockproc(A,[64,64],fun,'BorderSize',[5,5], 'TrimBorder', 'false'); I realize that this creates a block of [64 + 2*5, 64 + 2*5] and applies the function @fun on each block. But since I cannot go into

Finding people silhouette in OpenCV C++

核能气质少年 提交于 2019-11-27 14:08:40
问题 I would like to extract the silhouette of a human in a photo and remove the background. The photo could be taken of the full body, only the upper body or only the lower body. What I have done so far is track the face using Haar Cascades, but the algorithm I use does a rectangle over the face and I would need the shape of all the body. I have tried HOG as well, but as well it gives me a rectangle and it doesn't work with all photos. It would be great if somebody could help me. I'm using OpenCV

How can I detect the dimensions of an object under an angle in this picture in MATLAB? [closed]

南楼画角 提交于 2019-11-27 13:50:23
I have this image of a battery: I would like to determine the dimensions of the battery (in pixels). The problem I have is that the battery is rotated by an unknown angle. How can I detect the dimensions of this rotated battery? I was thinking of these algorithmic steps: First, I would have to convert this image to a black and white image (thresholding). After that, I would have to find a center point and draw a rectangle in the white pixels. Then, I have to turn the rectangle 360 degrees and locate the position of the rectangle (and so the dimensions). I am somewhat inexperienced, and I would