Skip to content

LShining/GMMImgSegmentation

Repository files navigation

GMMImgSegmentation

A tiny project using GMM to segment imgs. This is done by:

  1. First convert the image from RGB color space into RG color space
  2. Then assume the pixels to be points from K different multiple dimentional Gaussians
  3. Apply EM methods to obtain the fitted data points

Example picture

example

K=3 Case

Picture converted into rg space

k=3

Greyscale pictures reflect how likely(the possibility) that a pixel may lay in one Gaussian component.

  • White: More likely
  • Black: Less likely

K=3 K=3 K=3

Color distribution and Gaussians fitted

K=3

K=4 Case

Greyscale pictures

K=4 K=4 K=4 K=4

Color distribution and Gaussians fitted

K=4

K=5 Case(notice the over-fit)

Greyscale pictures

K=5 K=5 K=5 K=5 K=5

Color distribution and Gaussians fitted

+Notice the tiny green located in blue area K=5

About

A tiny project using GMM to segment imgs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages