Subpixel edge detection for nearly vertical edges

I want to detect edges (with subpixel accuracy) in images that are similar to the ones displayed:

enter image description here

The resolution will be about 600 X 1000.

I stumbled upon Mark Ransom's comment here , which mentions edge detection algorithms for vertical edges. I haven’t seen anything yet. Would this be useful in my case (since the edge is not a strictly straight line)? However, it will always be a vertical edge. I want it to be accurate to at least 1/100 pixels. I also want to have access to these sub-pixel coordinates.

I tried "Exact Subpixel Edge Location" from Agustin Trujillo-Pino. But that does not give me a permanent edge.

- ? MATLAB .

, :

enter image description here

.

.

Edit:

, : Canny/Sobel MATLAB ( , ). , - Sobel . ?

+4
2

.

atan:

% Load image
Img = double(imread('bQsu5.png'));

% Project
x = 1:size(Img,2);
y = mean(Img,1);

% Fit
f = fit(x', y', 'a+b*atan((x0-x)/w)', 'Startpoint', [150 50 10 150])

% Display
figure
hold on
plot(x, y);
plot(f);
legend('Projected profile', 'atan fit');

:

enter image description here

x_0 = 149,6 pix .

, , 1/100 :

  • , ( 255). atan, . , , .

  • , , , . , atan ( , ). 1/5 , .

, , . , , . .

,

+3

. , ( ). .

, . , , , clsq, :

%load image
url='http://i.stack.imgur.com/bQsu5.png';
image = imread(url);
imageEvenEven = image(1:2:end,1:2:end);
imshow(imageEvenEven, 'InitialMagnification', 'fit');

% subpixel detection
threshold = 25;
edges = subpixelEdges(imageEvenEven, threshold); 
visEdges(edges);

% compute fit line
A = [ones(size(edges.x)) edges.x edges.y];
[c n] = clsq(A,2);
y = [1,200];
x = -(n(2)*y+c) / n(1);
hold on;
plot(x,y,'g');   

, . c + n (1) * x + n (2) * y = 0

, 1/2 , .

, (imageEvenOdd, imageOddEven imageOddOdd) , .

+1

All Articles