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
11
votes
4 answers

How to calculate dice coefficient for measuring accuracy of image segmentation in python

I have an image of land cover and I segmented it using K-means clustering. Now I want to calculate the accuracy of my segmentation algorithm. I read somewhere that dice co-efficient is the substantive evaluation measure. But I am not sure how to…
RachJain
  • 283
  • 1
  • 5
  • 14
11
votes
3 answers

Opencv import highgui in android studio is showing error.Cannot resolve(I added the library still the error remain)

I have the following code which is for image segmentation using grabcut opencv. I am using opencv for the first time. I added the opencv library. While others worked perfectly highgui is still showing cannot resolve symbol.Do i need to add something…
Anamika Agrwal
  • 145
  • 1
  • 1
  • 9
11
votes
0 answers

What is the algorithm behind photoshop's quick selection tool?

I work on image processing. I just saw the quick selection tool of photoshop and I was quite impressed to see that this tool was capable to segment images along real edges, most of the time. I could imagine two or more ways of doing what that tool…
Barney Szabolcs
  • 11,846
  • 12
  • 66
  • 91
10
votes
1 answer

TensorFlow 2 custom loss: "No gradients provided for any variable" error

I have an image segmentation problem I have to solve in TensorFlow 2. In particular I have a training set composed by aerial images paired with their respective masks. In a mask the terrain is colored in black and the buildings are colored in white.…
10
votes
2 answers

Correct way to use custom weight maps in unet architecture

There is a famous trick in u-net architecture to use custom weight maps to increase accuracy. Below are the details of it: Now, by asking here and at multiple other place, I get to know about 2 approaches. I want to know which one is correct or is…
Beginner
  • 721
  • 11
  • 27
10
votes
2 answers

How to leave only the largest blob in an image?

I have a binary image of a brain. I only want to leave the blob in the center and remove the surrounding "noise" that is in this circular looking shape. Here's an example image: I tried using OpenCV and getting countours, but that failed miserably.…
BorkoP
  • 332
  • 3
  • 14
10
votes
1 answer

Connect the nearest points in segment and label segment

I using Open CV and skimage for document analysis of datasheets. I am trying to segment out the shade region separately . I am currently able to segment out the part and number as different clusters. Using felzenszwalb() from skimage I segment…
10
votes
1 answer

Semantic Segmentation Loss functions

Does it make sense to combine cross-entropy loss and dice-score in a weighted fashion for a binary segmentation problem ? Optimizing the dice-score produces over segmented regions, while cross entropy loss produces under-segmented regions for my…
10
votes
1 answer

Gaussian Mixture Models of an Image's Histogram

I am attempting to do automatic image segmentation of the different regions of a 2D MR image based on pixel intensity values. The first step is implementing a Gaussian Mixture Model on the image's histogram. I need to plot the resulting gaussian…
10
votes
1 answer

image segmentation using graph cut with seed points

I'm working in medical image segmentation and I want to combine fuzzy connectedness algorithm with the graph cut, the idea is to segment the image with fuzzy connectedness the background and the foreground will be used as sink and source for the…
10
votes
1 answer

Detect all branches in a plant picture

I would like to know of something that will detect all the green branches from the following image Currently i am starting with applying the Frangi filter options=struct('FrangiScaleRange', [5 5], 'FrangiScaleRatio', 1, 'FrangiBetaOne', 1,... …
Harjatin
  • 1,313
  • 1
  • 12
  • 22
10
votes
1 answer

Counting the squama of lizards

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…
9
votes
2 answers

watershed algorithm in matlab

anyone knows how to write a function in matlab to segment the cells and compute the average cell area using the watershed algorithm? any help would be much appreciated. Thank you! Here is an image of yeast cells
Glove
  • 960
  • 6
  • 17
  • 30
9
votes
2 answers

Pairwise Distances Between Two "islands"/"connected components" in Numpy Array

Consider the following image, stored as a numpy array: a = [[0,0,0,0,0,1,1,0,0,0], [0,0,0,0,1,1,1,1,0,0], [0,0,0,0,0,1,1,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,2,2,0,0,0], …
r0f1
  • 2,717
  • 3
  • 26
  • 39
9
votes
2 answers

How to calculate nucleus amount of cell?

I am using Python 3.5 and OpenCV 3 to analyze pictures of cells in biology. My pictures look like this: I want to be able to calculate a ratio of the area of the cell's nucleus to the area of the cell as a whole. In my slides, the nucleus is dark…
john
  • 619
  • 9
  • 24