Thresholds for a thermal image
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, i have few thermal images of concrete structures with internal defects. I want to segment defects in that image in which few are brighter and few are darker then background. my images are
http://i43.tinypic.com/jfkho7_th.jpg From the first image i need a binary image that should have the black spot left side, along with two regions close to it. can any one tell me how to get thresholds for such images....
I have read some papers on adaptive thresholding, in which they have mentioned about global and local thresholding. I dont know how to start coding, can any one please suggest me with some example codes of adaptive thresholding so that i can go further.
any suggestions will be appreciated,
thanks in advance.
0 Kommentare
Antworten (2)
Geoff
am 2 Mai 2012
My advice is to start with the simplest approach and run with it until you can't go any further. THEN look at the more complex approaches. You want to get results ASAP, without spending days scratching your head over insane code.
The local expert Image Analyst may have some real suggestions for you, but until he comes along I'll throw some simple ideas out...
The middle of those three pictures does not seem to be available, so maybe I'm confused because of that. Is the third image your background? Do you collect these from continuous video or do you just get a couple of snapshots?
Image 3 looks very different from Image 1. I know nothing about your field, but I'm going to assume that Image 3 is an initial reading, and Image 1 is a later shot after heating the concrete up.
First, you probably want to convert these images into greyscale if they're not already. I don't know what the formula would be for that heat pattern, but you just want one number for each pixel (maybe you have that already). To me it looks like it uses the entire blue range, then red comes in while blue goes out, then green comes in with the red maxed out.
If you want to try basic background subtraction, then normalise both images and take:
diffim = abs(image1-image3);
That'll probably be quite noisy so you would want a way to filter the noise out: ie detect minimum threshold. I'm no mathematician, but maybe standard deviation is useful here.
To do a global threshold, you just choose a number. Let's call it threshold. Then you cut all points above (or below) that. Since you have a difference image, you want to select only those with large differences:
defects = difim >= threshold;
Adaptive thresholding, as I understand it, is where your threshold value changes across the image. So instead of a single number, your threshold variable is another image. Presumably you'd want this because you need a larger difference at higher temperatures to consider a spot as a defect?
Anyway, you might generate this by convoluting the background image with a large-ish smoothing filter and taking the log of that, perhaps... That's the limit of my understanding of thermal energy! =)
smoothkernel = ones(20);
threshold = log(conv2(image3, smoothkernel));
Hope this is a help. It could be a start, if you currently have nothing =)
Image Analyst
am 2 Mai 2012
If you have the Image Processing Toolbox, you can do adaptive thresholding by first doing contrast limited local adaptive histogram equalization (CLAHE) which is performed by the function adapthisteq(). See the examples in the help. You may have to experiment with the parameters to get it just right, and of course youll have to use the monochrome image, not the pseudocolored image. Now you have a flat field and you can use a global threshold. See how that works. There are other ways to proceed if that doesn't work well, though those might not be much better.
3 Kommentare
Image Analyst
am 14 Mai 2012
It's the modulus function, as described in the help. Basically, the remainder after you divide by 8.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!