Line Detection
- From: "Adam Bain" <adam.bain@xxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 16:40:09 +0000 (UTC)
Hi, I have recently been given a project to study the lines
of an agate crystal using edge detection techniques. I am
using Canny, Sobel and Prewitt masks to detect the lines. I
want to further the project by determining the number of
lines in the agate crystals after the edge detection
techniques have taken place.
I am trying to pin point where the first white pixel is. The
code I'm using is:
% setting image to equal im
im = imread ('agate.tif');
% converting image to greyscale
im2 = rgb2gray (im);
% applying the canny mask with a threshold
im3 = edge (im2, 'canny', 10/255);
% incrementing x and y by 1 upto 200
x = 1:1:200;
y = 1:1:200;
% generates pixels values (1 (white)/0 (black))
pix = im3(x,y);
I wish determine the first pixel with a value of 1 and
locate it's co-ordinates. By doing so it will allow me to
trace it's neighbouring white pixels and see if there is a
continuous line.
Could anyone please give me advice on how I can extract the
co-ordinates of the first white pixel found?
Thanks,
Adam
.
- Prev by Date: Re: transfer function in simulink: denominator > numerator
- Next by Date: Re: Shadow prices and bounds of the constraints at Matlab.
- Previous by thread: transfer function in simulink: denominator > numerator
- Next by thread: adding data to dynamic field
- Index(es):