All Projects → alkasm → Colorfilters

alkasm / Colorfilters

Licence: mit
Image thresholding in multiple colorspaces.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Colorfilters

Qupath
QuPath - Bioimage analysis & digital pathology
Stars: ✭ 503 (+738.33%)
Mutual labels:  opencv, image-processing
Tensorflow object counting api
🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
Stars: ✭ 956 (+1493.33%)
Mutual labels:  opencv, image-processing
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (+870%)
Mutual labels:  opencv, image-processing
Pycair
Content aware image resizing
Stars: ✭ 425 (+608.33%)
Mutual labels:  opencv, image-processing
Seeds Revised
Implementation of the superpixel algorithm called SEEDS [1].
Stars: ✭ 48 (-20%)
Mutual labels:  opencv, image-processing
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (+653.33%)
Mutual labels:  opencv, image-processing
Prlib
Pre-Recognition Library - library with algorithms for improving OCR quality.
Stars: ✭ 18 (-70%)
Mutual labels:  opencv, image-processing
Opencvsharp
OpenCV wrapper for .NET
Stars: ✭ 3,598 (+5896.67%)
Mutual labels:  opencv, image-processing
Grabcutweb
Full web grabcut example using opencvjs
Stars: ✭ 40 (-33.33%)
Mutual labels:  opencv, image-processing
Opencv Tutorials
Tutorials for learning OpenCV in Python from Scratch
Stars: ✭ 36 (-40%)
Mutual labels:  opencv, image-processing
Gocv
Go package for computer vision using OpenCV 4 and beyond.
Stars: ✭ 4,511 (+7418.33%)
Mutual labels:  opencv, image-processing
Opencv Face Filters
Snapchat-like Face Filters in OpenCV
Stars: ✭ 51 (-15%)
Mutual labels:  opencv, image-processing
Pythonsift
A clean and concise Python implementation of SIFT (Scale-Invariant Feature Transform)
Stars: ✭ 374 (+523.33%)
Mutual labels:  opencv, image-processing
Tiler
Tiler is a tool to create an image using all kinds of other smaller images (tiles). It is different from other mosaic tools since it can adapt to tiles with multiple shapes and sizes (i.e. not limited to squares).
Stars: ✭ 4,681 (+7701.67%)
Mutual labels:  opencv, image-processing
Curvaturefilter
Curvature Filters are efficient solvers for Variational Models
Stars: ✭ 291 (+385%)
Mutual labels:  opencv, image-processing
Road Detection And Tracking
Involves the OpenCV based C++ implementation to detect and track roads for almost realtime performance
Stars: ✭ 17 (-71.67%)
Mutual labels:  opencv, image-processing
Opencv Androidsamples
OpenCv samples for Android from OpenCV SDK using Android Studio and Gradle System
Stars: ✭ 278 (+363.33%)
Mutual labels:  opencv, image-processing
Harvesters
🌈 Friendly Image Acquisition Library for Computer Vision People
Stars: ✭ 274 (+356.67%)
Mutual labels:  opencv, image-processing
Graph Based Image Segmentation
Implementation of efficient graph-based image segmentation as proposed by Felzenswalb and Huttenlocher [1] that can be used to generate oversegmentations.
Stars: ✭ 31 (-48.33%)
Mutual labels:  opencv, image-processing
Facer
Simple (🤞) face averaging (🙂) in Python (🐍)
Stars: ✭ 49 (-18.33%)
Mutual labels:  opencv, image-processing

colorfilters

Threshold your images in any colorspace!

  • BGR (RGB)
  • HSV
  • HLS (HSL)
  • Lab (CIELAB/L*a*b*)
  • Luv (L*u*v*)
  • YCrCb (YCbCr/YCC)
  • XYZ (CIEXYZ)
  • Grayscale (single channel)

Example Image

Getting Started

Install into a Python virtual environment, as you would any other Python project.

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install git+https://github.com/alkasm/colorfilters

Run the module as a script on any image you want:

(venv) $ python3 -m colorfilters path/to/image.png hsv

Usage

As a script, just run the module directly as above. You can always check the --help flag when running the module as a script for more info:

(venv) $ python3 -m colorfilters --help
usage: test color thresholding of images in different colorspaces
       [-h] image {bgr,hsv,hls,lab,luv,ycc,xyz,gray}

positional arguments:
  image                 path to image
  {bgr,hsv,hls,lab,luv,ycc,xyz,gray}
                        colorspace to filter in

optional arguments:
  -h, --help            show this help message and exit

Use inside your own Python projects:

>>> from colorfilters import HSVFilter
>>> import cv2 as cv
>>> 
>>> img = cv.imread("lane.jpg")
>>> window = HSVFilter(img)
>>> window.show()
>>> 
>>> print(f"Image filtered in HSV between {window.lowerb} and {window.upperb}.")
Image filtered in HSV between [51, 0, 183] and [63, 255, 255].

The window object has a few properties you might be interested in after successfully filtering your image:

>>> window.lowerb     # lower bound used for cv.inRange()
>>> window.upperb     # upper bound used for cv.inRange()
>>> window.mask       # mask from cv.inRange()
>>> window.masked     # image with mask applied
>>> window.img        # image input into the window
>>> window.converted  # image converted into the corresponding colorspace
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].