Giter Site home page Giter Site logo

zznidar / colony-counter Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1000 KB

Automatically count colonies from a photo of your Petri dish

Home Page: https://zznidar.github.io/colony-counter/

HTML 24.24% JavaScript 74.65% CSS 1.11%
biotechnology microbiology

colony-counter's People

Contributors

zznidar avatar

Watchers

 avatar

colony-counter's Issues

Filter matches by height/width ratio

Colonies are usually not linear, but rather circular. By getting the "colony" width/height ratio, we can discard lines, letters and some other noise.

Make this an offline PWA

But include a sharing link somewhere โ€“ because from a standalone app the browser chrome is not visible.

Alternatively, use a different webapp type (but make sure it still works offline).

Uncaught TypeError: a[(sredina + i)] is undefined

Should a colony centre (I guess) be found near the image edges, this line gets index out of range.

a[sredina + i][y + j] = -1; // already checked

example image: 271035948_679357069896602_9078540942867362065_n.jpg
sredina = 766, i = 2, sredina+i = 768, but resized image size is only 768x1024, thus indices 0:767 and 0:1023

Instead of hard-coded -3:5, we should do something that takes image size into account.

Analysis of large images takes tremendously long time

A picture taken directly with phone camera is usually quite big. There are mindestens three possible speed-up options:

  • Use webworkers and split the canvas among multiple threads for analysis
  • Resize the image to make it smaller (bacteria collonies are supposedly larger than camera pixels)
  • Skip loops outside of circle-bounding square altogether for(let x = centre - r; x < centre + r; x++)

Avoid counting Petri dish edges

Instead of setting neighbouring pixels to 0 when reaching the centre of a colony, set them to 2 (or them+1) if they > 0.
When reaching the next centre, only count it if the value == 1. Should the value be > 1, do not count the centre, but still set the neighbours to 2.

This should avoid counting continuous small crossings that appear at circle edges.

Black square is always black on iOS

Apparently iOS does not support changing the colour of the medium black square (โ—ผ). Thus, the detected/selected background colour always appears black.

Gradient over agar

Depending on the lightning when capturing a photo of your petri dish, a (usually linear) gradient of brightness may appear over the agar. Bacteria on one side might be darker than agar on the other side (or vice-versa).

In such cases, it would be useful to be able to define a gradient of the background, against which the colour should be checked.

Maybe this will be more user-friendly once auto-dish-detection and auto-agar-colour detection are implemented.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.