Skip to content

Gamebielo/Threshold-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Threshold-Examples

OpenCV + Python

src = Imagem atual
dst = Imagem de destino

Binary Thresholding ( type = THRESH_BINARY )

if src(x,y) > thresh
    dst(x,y) = maxValue
else
    dst(x,y) = 0

Inverse Binary Thresholding ( type = THRESH_BINARY_INV )

if src(x,y) > thresh
  dst(x,y) = 0
else
  dst(x,y) = maxValue

Truncate Thresholding ( type = THRESH_TRUNC )

if src(x,y) > thresh
  dst(x,y) = thresh
else
  dst(x,y) = src(x,y)

Threshold to Zero ( type = THRESH_TOZERO )

if src(x,y) > thresh
  dst(x,y) = src(x,y)
else
  dst(x,y) = 0

Inverted Threshold to Zero ( type = THRESH_TOZERO_INV)

if src(x,y) > thresh
  dst(x,y) = 0
else
  dst(x,y) = src(x,y)

About

OpenCV + Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages