Color Filtering
Image filtering using OpenCV.
By Laurent Ittiitti@usc.eduhttp://jevois.orgGPL v3
 Language:   C++            Supports mappings with USB output:   Yes            Supports mappings with NO USB output:   No
 Video Mapping:   YUYV 640 240 30.0 YUYV 320 240 30.0 JeVois ColorFiltering

Module Documentation

This module is to learn about basic image filtering. It was developed to allow students to instantly observe the effects of different filters and their parameters on live video. The module implements a variety of filters using OpenCV. Each filter exposes some paremeters (e.g., kernel size) that can be set interactively to understand their effects onto the filter behavior.

Available filters:

How to use this module

  • Open a video viewer on your host computer and select YUYV 640x240 @ 30 fps (see Quickstart user guide)
  • Open a serial communication to JeVois (see Command-line interface user guide)
  • Type help and observe the available parameter called effect
  • Start by setting the effect parameter to a given effect type. For example: setpar effect Median or setpar effect Morpho (commands are case-sensitive).
  • Then type help to see what additional parameters are available for each effect. For example, for Median, you can adjust the kernel size (parameter ksize). For Morpho, you can select the type of morphological operation (parameter op), structuring element shape (parameter kshape) and size (parameter ksize), etc.

    Complete example:

    setpar effect Morpho
    setpar op Open
    setpar ksize 7 7

    With JeVois v1.5 and above, you may want to use help2 instead of help, which is a shorter and more compact help message that shows parameters and commands of the running machine vision module only (and no general parameters related to the JeVois core).

ParameterTypeDescriptionDefaultValid Values
(ColorFiltering) effectEffectImage processing effect to applyEffect::MorphoEffect_Values
(BilateralFilter) dintDiameter of each pixel neighborhood that is used during filtering. If it is non-positive, it is computed from sigmaSpace0-
(BilateralFilter) sigmaColordoubleFilter sigma in the color space. A larger value of the parameter means that farther colors within the pixel neighborhood (see sigmaSpace) will be mixed together, resulting in larger areas of semi-equal color. 2.0-
(BilateralFilter) sigmaSpacedoubleFilter sigma in the coordinate space. A larger value of the parameter means that farther pixels will influence each other as long as their colors are close enough (see sigmaColor). When d>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is proportional to sigmaSpace.2.0-
(MedianFilter) ksizeunsigned intMedian kernel size (must be an odd number >= 3)3boost::regex(^[3579]|\\\\d+[13579]$)
(BlurFilter) ksizecv::SizeBlur kernel width and heightcv::Size(3, 3)-
(BlurFilter) anchorcv::PointAnchor point x and y; default value [-1 -1] means that the anchor is at the kernel centercv::Point(-1, -1)-
(LaplacianFilter) ksizeunsigned intLaplacian kernel size1-
(LaplacianFilter) scaledoubleLaplacian scale factor applied to the computed values1.0-
(LaplacianFilter) deltadoubleLaplacian delta offset applied to the computed values0.0-
(MorphologyFilter) opMorphoOpMorphological operation to applyMorphoOp::CloseMorphoOp_Values
(MorphologyFilter) kshapeKernelShapeKernel shapeKernelShape::RectangleKernelShape_Values
(MorphologyFilter) ksizecv::SizeKernel width and heightcv::Size(7, 7)-
(MorphologyFilter) anchorcv::PointAnchor point x and y; default value [-1 -1] means that the anchor is at the kernel centercv::Point(-1, -1)-
(MorphologyFilter) iterunsigned intNumber of iterations of the filter to apply1U-
Detailed docs:ColorFiltering
Copyright:Copyright (C) 2016 by Laurent Itti, iLab and the University of Southern California
License:GPL v3
Support URL:
Other URL:
Address:University of Southern California, HNB-07A, 3641 Watt Way, Los Angeles, CA 90089-2520, USA