Hello,
I am analysing some cracks in a surface by edge detection and the image processing toolbox. I have attached a file (matrix) which contains distance data to the surface, taken from a sensor.
After using a sobel filter I can see cracks on the surface, after using the imtool contrast feature.
When I load gs_filt with imtool I can change the contrast of that "image" in asufficient way with Scale Display Range (Eliminate outliers, 2%). I want to do exactly this in my code, so that I can perform further steps.
I tried rescale(), imadjust() and stretchlim(). But I could not make it work. I guess the problem is, that filtering the data results in negative and positive values. The negative ones are the cracks, the positive ones the intact surface. Those negative values disappear when I transform into grayscale (mat2gray).
Any help will be apreciated :)
Greetings,
Valentin
load('m_AofI.mat')
gs_filt = filter2(fspecial('sobel'), m_AofI, 'valid');
figure; imshow(gs_filt)
low_high = stretchlim(gs_filt, [0.01 0.99])
imtool(gs_filt);