Extracting coordinates values for the line.

조회 수: 2 (최근 30일)
waqas
waqas 2019년 9월 3일
댓글: waqas 2019년 10월 12일
Hi,
I want to extract the coordinates for the white points along the main line where I am getting bit of noise around with additional 1 or 2 points in some columns just around the central line. I extracted the data by applying sobel filter on a displacement field and then removed some extra noisy data using bwareopen but now I am stuck with these extra points and am unable to get rid of these. Any suggestions regarding this? I have attached the displacement field matrix in .mat file.
Annotation 2019-09-03 215357.png
  댓글 수: 3
Image Analyst
Image Analyst 2019년 9월 5일
If so, that's very easy, just threshold and scan across columns using find() on every column to find the first row with something in it.
Whoever told beginners that the first step to successful image analysis, and the easiest way to proceed, is to do edge detection, should be take out behind the woodshed and beaten. Is there a concerted effort by professors to spew this nonsense? It makes it unnecessarily hard for beginners.
waqas
waqas 2019년 9월 5일
@akira Yes! this is the area I am interested in to get just a single point in each column which would give me the original crack shape.
@Image Analyst. I tried to look for some solutions on the forum and read a comment somewhere which suggested to use edge detectors. Are you talking about multithresholding?

댓글을 달려면 로그인하십시오.

채택된 답변

Akira Agata
Akira Agata 2019년 9월 20일
How about the following?
% Load data and convert to gray-scale image
load('v.mat');
Igray = mat2gray(v);
% Apply multilevel (N = 2) image thresholds
th = multithresh(Igray,2);
Iseg = imquantize(Igray,th);
% Extract the edge between Iseg == 1 and Iseg == 2
se = strel('disk',1);
BW1 = bwperim(Iseg == 1);
BW1 = imdilate(BW1,se);
BW2 = bwperim(Iseg == 2);
BW2 = imdilate(BW2,se);
BWedge = BW1 & BW2;
BWedge = bwmorph(BWedge,'skel',Inf);
% Show the result
figure
imshow(BWedge)
edge.png
  댓글 수: 1
waqas
waqas 2019년 10월 12일
Hi Akira,
I am trying the code that you shared for another data set with almost the same configuration but somehow the technique is not robust. Any ideas on how to make it more versatile rather than just a particular case?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by