Image Processing: Detect Quartz Veins in Photos
10 ビュー (過去 30 日間)
I was hoping to get some help. I'm trying to automate a procedure to detect quartz veins in core photos from a mining database. I've converted the images to binary using a variety of gray theshold values. The problem is that it detects too much of the wooden box, tags etc.
If I manually crop out just the rock, the results are much better. This is unrealistic through because I need a way to batch process.
Here is the original photo and a binary version. As you can see, too much of the box is selected and a bunch of other stuff. I need to select only the white quartz veins that cut through the gray rock.
I'm quite new to image processing so I apologize if this is a fairly simple problem.
Thanks for your help!
It's not a simple problem. On the face of it, it might look simple but I can foresee all kinds of possible problems. What I would start off with is doing color segmentation - basically find the brown pixels. See my File Exchange for examples. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
But there might be cases where the "white" marble is very close in color to the light brown wood. Have you looked at the 3D color inspector to see the full 3D color gamut? As you can see below, there is quite a bit of overlap/blending between the colors. It's not like you have 3 very well separated colors.
You might try some type of edge/ridge/line finding operations to get hte wood shelves. You might need to combine that with the color info to get better spatial masking of stone and wood regions. Maybe something like edge(), hough(), houghlines() or anisotropic diffusion (demo attached).
For stone color I'd probably first try segmenting for
hsv = rgb2hsv(rgbImage);
h = hsv(:,:,1);
s = hsv(:,:,2);
v = hsv(:,:,3);
stone = v < 0.2 | s < 0.3;
Adjust the thresholds to improve segmentation.
その他の回答 (2 件)
Find more on Color Segmentation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!