Interpolation of angular data spline or linear?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alina tom
am 1 Jan. 2019
Kommentiert: Alina tom
am 2 Jan. 2019
I have a binary image. in which i have different data points on different locations. I want to apply interpolation techniques between those points. can anyone help me how i can apply interpolation on angular data points . input image is attached.

The out put is something like the below image

4 Kommentare
John D'Errico
am 1 Jan. 2019
Then why not just clarify your last question? Your approach is to just keep asking the same question until you hope someone gives you an answer.
Akzeptierte Antwort
Akira Agata
am 2 Jan. 2019
One possible solution would be looks like this. In addition, if you feel @Image Analyst's answer for your previous question useful, I (...and Image Analyst-san) would be happy if you could accept it.
% Load the image
I = imread('3.jpg');
% Binarize and apply ultimate erosion
BW = imbinarize(rgb2gray(I));
BW = imclearborder(BW);
BW = bwulterode(BW);
% Find (x,y) coordinates
[row,col] = find(BW);
% Arrange the coordinates to circular order
theta = atan2(row-mean(row),col-mean(col));
data = table(row,col,theta);
data = sortrows(data,'theta');
data = [data;data(1,:)];
data.theta(end) = data.theta(end)+2*pi;
% Apply spline interpolation
n = 1:height(data);
pp = spline(n,[data.col';data.row']);
xy = ppval(pp,linspace(1,height(data)));
% Visualize the result
figure
imshow(I)
hold on
scatter(col,row,'rx')
plot(xy(1,:),xy(2,:),'r-')

Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!