Questions tagged [image-segmentation]

Segmentation is a basic operation in image processing: its purpose is to group similar pixels into coherent regions = segments.

In image processing, image segmentation is the process of partitioning an image into multiple segments (sets of pixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain visual characteristics.

The result of image segmentation is a set of segments that collectively cover the entire image. Each of the pixels in a region are similar with respect to some characteristic or computed property, such as color, intensity, or texture. Adjacent regions are significantly different with respect to the same characteristic(s).

Image segmentation is somewhat related to perceptual grouping: the spatial organization of visual stimuli. Some image segmentation algorithms attempt to employ Gestalt Laws of perceptual grouping to produce visually meaningful image segments.

Some popular image segmentation algorithms are Normalized cuts (by Shi and malik) and Mean-shift (by Comaniciu and Meer).

2542 questions
9
votes
2 answers

Per pixel softmax for fully convolutional network

I'm trying to implement something like a fully convolutional network, where the last convolution layer uses filter size 1x1 and outputs a 'score' tensor. The score tensor has shape [Batch, height, width, num_classes]. My question is, what function…
Wei Liu
  • 1,004
  • 1
  • 10
  • 17
9
votes
0 answers

Implementing graph cut on image using Energy function

I was trying to extract the hair from a given image as described in the research paper, using the concept of energy minimisation, The energy function is dependent on both Prior probability and YCrCb colour likelihood histogram. The energy function…
ZdaR
  • 22,343
  • 7
  • 66
  • 87
9
votes
2 answers

Can Caffe classify pixels of an image directly?

I would like to classify pixels of an image to "is street" or "is not street". I have some training data from the KITTI dataset and I have seen that Caffe has an IMAGE_DATA layer type. The labels are there in form of images of the same size as the…
9
votes
1 answer

Finding the local maxima/peaks and minima/valleys of histograms

Ok, so I have a histogram (represented by an array of ints), and I'm looking for the best way to find local maxima and minima. Each histogram should have 3 peaks, one of them (the first one) probably much higher than the others. I want to do several…
9
votes
1 answer

word segmentation using opencv

I am working on some scanned text images and I need to highlight all the words in that image.I know the problem is equivalent to finding subimages with extra whitespaces around them. OCR cannot be used and I just need to outline each word with a…
code4fun
  • 2,661
  • 9
  • 25
  • 39
8
votes
2 answers

Segmenting circle-like shapes out of Binary Image

I have several binary images and my task is to segment circle-like shape. The circles are not perfect rounded circle, but all of them will look like circle. Here are some example images and what I need: As you can see from above, the left images…
Karl
  • 5,613
  • 13
  • 73
  • 107
8
votes
2 answers

How to Extract part of Image inside specified boundary in MATLAB

I am new to MATLAB, i wanted to know that can i extract a part of image from inside of a specified boundary,based on distinguishing color(red boundary in my case),The function,first traces the boundary of the image,then it extracts that part of…
Rizwan606
  • 667
  • 2
  • 8
  • 22
8
votes
2 answers

Identify text areas on a Talmud page

I have a Talmud page like these: And I want to find the text areas with opencv to get such a result, that each text will be on its own like this: In the attached image, each area is marked in a different color, and text has a number, what is…
codeDom
  • 1,623
  • 18
  • 54
8
votes
1 answer

Dice coef greater than 1

As I was training UNET, the dice coef and iou sometimes become greater than 1 and iou > dice, then after several batches they would become normal again. As shown in the picture. I have defined them as following: def dice_coef(y_true, y_pred,…
naomity
  • 83
  • 1
  • 5
8
votes
3 answers

Optimizing algorithm for segmentation through image substraction

for a project in OpenCV I would like to segment moving objects as good as possible with of course minimal noise. For this I would like to use an image substraction algorithm. I already have a running program but didn't find a way today to get fair…
8
votes
1 answer

How to add text to an image segment

I have the following Python code, which adds a bounding box around the detected segments %matplotlib qt fig, ax = plt.subplots(figsize=(10, 6)) ax.imshow(image_label_overlay) for region in regions: # take regions with large enough areas if…
Nour
  • 197
  • 1
  • 3
  • 13
8
votes
2 answers

How to find IoU from segmentation masks?

I am doing an image segmentation task and I am using a dataset that only has ground truths but no bounding boxes or polygons. I have 2 classes( ignoring 0 for background) and the outputs and ground truth labels are in an array like…
Farshid Rayhan
  • 1,134
  • 4
  • 17
  • 31
8
votes
2 answers

loss function design to incorporate different weight for false positive and false negative

I am trying to solve a semantic segmentation problem. In accordance with the real constraints, the criteria for false positive and the criteria for false negative is different. For instance, if a pixel is miscorrected as foreground is less desirable…
8
votes
2 answers

Image not segmenting properly using DBSCAN

I am trying to use DBSCAN from scikitlearn to segment an image based on color. The results I'm getting are . As you can see there are 3 clusters. My goal is to separate the buoys in the picture into different clusters. But obviously they are…
Ryan Fatt
  • 91
  • 1
  • 1
  • 6
8
votes
2 answers

Image (color?) segmentation with opencv C++

As the graph showed, I'd like to input image and get several segments as a result like that. It's just like cluster the closest color segment, so I think it's close to the concept of "meanshift"? I've searched relevant questions here but still…
Oasis
  • 81
  • 1
  • 2
  • 4