help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Edge function error


From: Jordi Gutiérrez Hermoso
Subject: Re: Edge function error
Date: Tue, 13 Aug 2013 11:04:15 -0400

On 13 August 2013 10:32, daydreamer1987 <address@hidden> wrote:
> Hi,
>
> This is my first time posting in this forum. I'm very new to Octave and have
> been having small arguments and then wins all day but this has got me
> stumped at the moment.
>
> I've got a rgb photo which I've converted to grayscale. Its a fairly complex
> image but it is basically made up of a rectangle with 3 rows of ~10 circles
> evenly spaced along it, on a background.
>
> My aim is to detect the edge of the rectangle so I can crop the photo to
> that edge - haven't yet planned how I'm going to do that bit but anyway.....
>
> So my basic code is:
> [img, map, alpha] = imread("white_dots.jpg");
> [x, map] = rgb2ind(img);
> y = ind2gray(x, map);
> y = uint8((255*y) / max(max(y)));
> imwrite(y, "grayscale_white_dots.jpg". "jpg", "Quality", 75);
> edgeim = edge(y, 'canny' [0.1 0.2], 1);
> figure(1), imshow(edgeim);

edge is in the image package:

    http://octave.sourceforge.net/image/function/edge.html

You need to install the image package, which varies by OS (for
example, in Debian-based systems, "apt-get install octave-image"
should work), and you need to load the package ("pkg load image"
inside an Octave session).

HTH,
- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]