Giter Site home page Giter Site logo

fire_ant's Introduction

Image segmentation for red fire ant

Original Method

This method try to extract potato chips from image by traditional image processing method.

GUI

Steps

  1. Convert to gray
  2. Normalization
  3. Image binarization by Otsu's threshold
  4. Erode 30 times to filter the noise.
  5. Dilate 30 time to compensate area eroded
  6. Extract the contours, keep the largest area
  7. Fill in the area by convex hull
  8. Extract the area inside the polygon.
  9. Crop the polygon out.

Usage

GUI

python src/main.py

Process all images in Image directory

python src/segmentation.py

Result

Alt text

Alt text

Conclusion

  • Advantage

    • Simple
    • Fast
  • Shortage

    • Unable to handle the cracked chips
    • Performance is bad once the photo was not taken properly.

Level Set Method

Try to extract potato chips by level set method.(Ref)

Steps

python src/level_set.py IMAGE_PATH

Result

Alt text

Alt text

Conclusion

  • Shortage
    • Very very slow....

Convex Shape Prior for Multi-Object Segmentation Using a Single Level

Try to reproduce the result(Ref), but failed. I sent an email to the first author asking for help, but receiving no reply.

Experiment

另外有試過嘗試先轉成HSV後,再根據H值濾出,避免因為取灰階而造成把灰階一樣但顏色明顯不同的部分採納進去(如下圖)

fire_ant's People

Contributors

lkm543 avatar

Watchers

James Cloos avatar

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.