top of page

CHAPTER

15

OTHER VISUAL APPLICATIONS WITH NOVA

This chapter will demonstrate the built-in functions of OpenCV for Processing IDE. The code for each  example (for Processing IDE) is provided at the bottom of the screenshots. You can try these features and use them in many different applications depending on your imagination.

 

Let's start by having a look at these features and built-in functions. 

Brightness and Contrast

Adjust the brightness and contrast of colour and grey images.

02.jpg

Code: BrightnessContrast.pde

 

Filter Images

Basic filtering operations on images: threshold, blur, and adaptive thresholds.

03.jpg

Code: FilterImages.pde

 

Find Contours

Find contours in images and calculate polygon approximations of the contours (i.e., the closest straight line that fits the contour).

04.jpg

Code: FindContours.pde

Find Edges

Three different edge-detection techniques: Canny, Scharr, and Sobel.

05.jpg

Code: FindEdges.pde

Find Lines

 

Find straight lines in the image using Hough line detection.

06.jpg

Code: HoughLineDetection.pde

Brightest Point

 

Find the brightest point in an image.

07.jpg

Code: BrightestPoint.pde

Region of Interest

 

Assign a sub-section (or Region of Interest) of the image to be processed.

08.jpg

Code: RegionOfInterest.pde

Image Difference

 

Find the difference between two images in order to subtract the background or detect a new object in a scene.

09.jpg

Code: ImageDiff.pde

Dilation and Erosion

 

Thin (erode) and expand (dilate) an image in order to close holes. These are known as "morphological" operations.

10.jpg

Code: DilationAndErosion.pde

Background Subtraction

 

Detect moving objects in a scene. Use background subtraction to distinguish background from foreground and contour tracking to track the foreground objects.

11.jpg

Code: BackgroundSubtraction.pde

Working with Colour Images

 

Demonstration of what you can do colour images in OpenCV (threshold, blur, etc) and what you can't (lots of other operations).

12.jpg

Code: WorkingWithColorImages.pde

Colour Channels

 

Separate a colour image into red, green, blue or hue, saturation, and value channels in order to work with the channels individually.

13.jpg

Code: ColorChannels.pde

Find Histogram

 

Demonstrates use of the findHistogram() function and the Histogram class to get and draw histograms for grayscale and individual colour channels.

14.jpg

Code: FindHistogram.pde

Hue Range Selection

 

Detect objects based on their colour. Demonstrates the use of HSV colour space as well as range-based image filtering.

15.jpg

Code: HueRangeSelection.pde

Calibration

 

An example of the process involved in calibrating a camera.

16.jpg

Code: CalibrationDemo.pde

Histogram Skin Detection

 

Detecting skin in an image based on colours in a region of colour space. Warning: uses un-wrapped OpenCV objects and functions.

17.jpg

Code: HistogramSkinDetection.pde

Depth from Stereo

 

An advanced example. Calculates depth information from a pair of stereo images. Warning: uses un-wrapped OpenCV objects and functions.

18.jpg

Code: DepthFromStereo.pde

Warp Perspective

 

Un-distort an object that's in perspective.

19.jpg

Code: WarpPerspective.pde

Marker Detection

 

An in-depth advanced example. Detect a CV marker in an image, warp perspective, and detect the number stored in the marker. Many steps in the code. Uses many un-wrapped OpenCV objects and functions.

20.jpg

Code: MarkerDetection.pde

Morphology Operations

 

Open and close an image, or do more complicated morphological transformations.

21.jpg
bottom of page