I am going to write a program to process an image with very fine wood fibers in it. Please have a look at this for a quick idea - http://alturl.com/7jnuh
What I want to do is keep only the fiber lines in a black and white image and discard other features and colors. How can I use OpenCV to it? Thanks.
PShader myFilter;
PImage myImage;
void setup() {
size( 474, 474, P2D );
myImage = loadImage( "th.jpg" );
myFilter = loadShader( "shader.glsl" );
}
void draw() {
background(0);
// Draw the image on the scene
image( myImage, 0, 0 );
// For all settings: 1.0 = 100% 0.5=50% 1.5 = 150%
float c = 2.6;
float s = 0.0;
float b = 2.2;
// Pass the parameters to the shader
myFilter.set( "contrast", c );
myFilter.set( "saturation", s );
myFilter.set( "brightness", b );
// Applies the shader to everything that has already been drawn
filter( myFilter );
}