Giter Site home page Giter Site logo

imagethresholding's Introduction

imageThresholding

Types

Simple Thresholding
Adaptive Thresholding
Otsu's Thresholding

Simple Thresholding

if pixelValue > thresholdValue:
  assign one value (may be white)
else:
  assign another value (may be black)

Types

  • cv2.THRESH_BINARY
  • cv2.THRESH_BINARY_INV
  • cv2.THRESH_TRUNC
  • cv2.THRESH_TOZERO
  • cv2.THRESH_TOZERO_INV

Adaptive Thresholding

Calculates the threshold for a small regions of the image. So we get different thresholds for different regions of the same image and it gives us better results for images with varying illumination.

Types

  1. Adaptive Method - It decides how thresholding value is calculated.

cv2.ADAPTIVE_THRESH_MEAN_C : threshold value is the mean of neighbourhood area.

cv2.ADAPTIVE_THRESH_GAUSSIAN_C : threshold value is the weighted sum of neighbourhood values where weights are a gaussian window.

  1. Block Size - It decides the size of neighbourhood area.

  2. C - It is just a constant which is subtracted from the mean or weighted mean calculated.

Otsu’s Binarization

Finds a threshold value that minimizes weighted within class variation

MatplotLib

matplotlib.pyplot.xticks(ticks=None, labels=None, ** kwargs)

ticks --> A list of positions at which ticks should be placed.

      --> Passing an empty list will disable xticks.

labels --> A list of explicit labels to place at the given locations.

**kwargs --> Text properties can be used to control the appearance.

imagethresholding's People

Contributors

koushikraghav 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.