Flood Fill using OpenCV
Demonstrates OpenCV's flood fill: use a seed point to fill connected regions. Includes a C/C++ example, parameter explanations, and expected output.
Demonstrates OpenCV's flood fill: use a seed point to fill connected regions. Includes a C/C++ example, parameter explanations, and expected output.
In this example we threshold the image based on the position of the track bar. Then find contours on the image an display the contours as white lines.
Here is the Hello World example code for OpenCV. This simple example creates a image called output, then the text "Hello World" is added to the image.
To separate a multi channel image into the three component RGB channels, we can use the cvSplit function. The example below opens a RGB image and then using the cvSplit function creates three output images.
The cvThreshold function allows us to reject pixels above or below a set value while keeping the others. In this example the input image is separated into the RGB channels. Then we preform a threshold on the red channel, with a maximum value of 100. The result of this is that all the light areas of the image are removed.