Skip to content

Im-Rises/cells_segmentation

Repository files navigation

cells_segmentation

MatLabBadge

Description

Cells segmentation program made in MATLAB. This program is made for educational purpose. Analyse group of cells from pictures with image conversion, thresholding, filtering, regions separation and segmentation. The goal is to create video with the maximum of cells visible.

Images

Original image Image processed
t000_original t000_processed
Image regions Image segmentation
t000_processed_regions t000_processed_segmentation

Videos

A set of videos are available in the video folder. They show the different main step of the image processing.

video_images_processed.mp4
video_images_segmented.mp4

Quick start

First thing to do is to have MATLAB, you can find it below:
https://fr.mathworks.com/products/matlab.html

To run the project, you need to install the MATLAB packages:

Once you have installed everything, you can start the project opening the root folder as a project and starting the main.m script in MATLAB.

Project architecture

The project is composed of one main script main.m that will call all the others script.

The other important scripts are :

  • create_video_from_images.m to create video from a set of images
  • image_processing.m to process images
  • image_regions.m to display regions in a image
  • image_segmentation.m to segment cells in a image

The three other following files are a set of functions for different way to convert an image to black and white (BW):

  • im2bw_mean image to BW by using mean
  • im2bw_median image to BW by using median
  • im2bw_my_version image by manually changing threshold

Note

You can also use the Otsu's method to convert an image from grayscale to BW.

The pipe.m file is to use several functions on one variable For example, a conversion from grayscale to BW, processing and segmenting image. To use it there is four example in the code:

create_video_from_images(fps, inputFolder, imagesExtension, outputFolder, 'cells-4-bw-processed-segmented.avi', {im2bwSelectedFunc, @image_processing,@image_segmentation});

Usage:

variable = pipe(variable, {@func1,@func2,@func3});

Documentation

MATLAB:
https://fr.mathworks.com/help/matlab/

Datacorner image processing course:
https://www.datacorner.fr/image-processing/

Authors

Quentin MOREL :

GitHub contributors