Image Processing: Detect Quartz Veins in Photos

10 ビュー (過去 30 日間)
Cole 2014 年 8 月 14 日
回答済み: Cole 2014 年 8 月 14 日
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!


Image Analyst
Image Analyst 2014 年 8 月 14 日
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.
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.
  1 件のコメント
Image Analyst
Image Analyst 2014 年 8 月 14 日
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 件)

Cole 2014 年 8 月 14 日
Image Analyst,
Thank you for the help. This is definitely a bigger undertaking than I thought.
One problem is that the stone color varies from box to box depending on the type of rock that was drilled. The stone can be dark grey, grey, blueish grey, green, greenish grey etc.
The white quartz veins are fairly consistent. They range from white to off-white to yellow-white. The biggest problem is that the box is a similar color to the quartz veins.
I'll keep working with your suggestions to see if I can get a better result.
Thanks again.

Cole 2014 年 8 月 14 日
Here are my results so far. It's coming along for sure. I still need a way to remove the sample tags and the small white board.
The first image shows only the isolated stone. Your method was quite effective at removing the wooden box.
To generate the 2nd image, I just applied a gray threshold to the stone only image. It produced fairly good results.
Any tips on how I can remove things that are rectangular? What's the best way to go about removing the tags and white board?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by