Image-sequencer: blob/region detection and extraction for particle analysis

Created on 16 Feb 2018  ·  14Comments  ·  Source: publiclab/image-sequencer

Most helpful comment

@jywarren totally, because we already have some of the steps which are needed, this would be better implemented with a set of chained modules
Also, I have an idea from this, we can have an ability to add macros so that users can save a set of most used modules, in browser that can be implemented with the url and in cli we can have a macros.json file and our first macro can be region extraction😁
what say?

All 14 comments

@jywarren i am now taking up this issue can you please elaborate a little what data do we need as output. We can edge detect the image for the particles, do we we need some data about each of the particles like area etc?

Yes, after the several image filtering steps as in this post:

https://publiclab.org/notes/amirberAgain/01-12-2018/python-and-opencv-to-analyze-microscope-slide-images-of-airborne-particles

We'd then want to add to the metadata (and to display in the interface) a count of particles by size - ask AmirberAgain in the above post for some help!

Excited! Thank you!

But let's solve this in a set of chained modules if possible!

@jywarren totally, because we already have some of the steps which are needed, this would be better implemented with a set of chained modules
Also, I have an idea from this, we can have an ability to add macros so that users can save a set of most used modules, in browser that can be implemented with the url and in cli we can have a macros.json file and our first macro can be region extraction😁
what say?

@jywarren also can you please have a look at the proposal for this project since the gsoc deadline is coming and the submission is already started, i have made changes according to what you and ccpandhare suggested, i have dropped the pwa and incorporated the modularization issue, please do have a look

@jywarren I have made some progress on this one, So I have decided to follow these steps, please guide me if this seems correct

  • First we apply edge-detect to the image to binarize it, We can have a foreground pixel and background pixel associated with the output(Since we decided that image can be on black background as well)
  • We can then apply connected component labelling on the edge-detected image(I'll write a new module for this which will take in foreground pixel values and background pixel values and a binary image)
  • We can then count the number of pixels in each of the components and that will give us the perimeter in pixels
  • For area I have devised a method (but it will not be exact if particles are concave), we can run that for each component and it'll fill each component and then again we can count the number of foreground pixels in each component and get the area in pixels^2 (squared)
  • Area and perimeter can be converted using a given scale to actual dimensions.

Algorithm:
img_0347

Hi! Very cool! I wonder if you could post on the thread with Amir where he
laid out his steps, and check with him if this matches the process he's
described?

On Mon, Apr 23, 2018 at 1:00 AM, Varun Gupta notifications@github.com
wrote:

@jywarren https://github.com/jywarren I have made some progress on this
one, So I have decided to follow these steps, please guide me if this seems
correct

  • First we apply edge-detect to the image to binarize it, We can have
    a foreground pixel and background pixel associated with the output(Since we
    decided that image can be on black background as well)
  • We can then apply connected component labelling on the edge-detected
    image(I'll write a new module for this which will take in foreground pixel
    values and background pixel values and a binary image)
  • We can then count the number of pixels in each of the components and
    that will give us the perimeter in pixels
  • For area I have devised a method (but it will not be exact if
    particles are concave), we can run that for each component and it'll fill
    each component and then again we can count the number of foreground pixels
    in each component and get the area in pixels^2 (squared)
  • Area and perimeter can be converted using a given scale to actual
    dimensions.

Algorithm:
[image: img_0347]
https://user-images.githubusercontent.com/25617855/39107641-37119ea2-46e1-11e8-9974-adb68ff4c7b3.jpg


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/172#issuecomment-383454546,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ6MSld5VLfoDA1Kak0YYN34N-H9tks5trV_SgaJpZM4SJAjq
.

@jywarren Done!! Can you also please have a look at the meta modules issue #200 , I have consolidated ideas and made a checklist, Thanks :)

Found a nice reference for this!!! https://blog.acipo.com/blob-detection-js/

image

@jywarren I have made progress to this and I would like further guidance on it! The results that I am getting using opencv in our project are

resblob

blobres2

Really excited to share these please let me know what you think!!

Wow!!!! Amazing!!!!!

I think this is great. My thoughts are:

  1. the overall workflow is many steps, as in the documentation in the original issue at top. But we should as much as possible break it into different modules. Let's make a demo sequencer to demonstrate these steps with images from a microscope (at top)
  2. let's think about what the final desired output format is, by reading those docs at top. Is it a histogram of the particle size, is it about how round the particles are, how concentrated they are? All the above?

Thanks @aashna27 ! This is so exciting! Eventually we want people to be able to upload their microscope images (from https://publiclab.org/micro kits) and do an analysis, so let's build from distinct modules in that direction!

So I ll make a pr of the code uptill now, wherein we have markers to detect particles in microscopic images.

Great, can you lay out how this initial PR fits into the overall workflow from the posts above?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harshkhandeparkar picture harshkhandeparkar  ·  4Comments

jywarren picture jywarren  ·  4Comments

kindanduseful picture kindanduseful  ·  5Comments

jywarren picture jywarren  ·  3Comments

Divy123 picture Divy123  ·  5Comments