[OctDev] SIFT image descriptor patch

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[OctDev] SIFT image descriptor patch

Etienne Grossmann

  Hi All,

this patch could be of interest to octave users who do image
processing.  You can apply it to the matlab code in siftDemoV4 [1] to
allow octave to extract SIFT image features [2] with David Lowe's
package.

  The SIFT image detector identifies interest points, somewhat like a
corner detector does, and gives them a local descriptor. The
descriptor can then be used for matching purposes (another way to
perform matching could be correlation of a small window around the
feature). Wrt to corners + local window correlation, SIFT features are
more robust to changes in illumination and viewpoint [3] and they are
increasingly used in computer vision.

  The siftDemo has functions to find sift features and to perform
matching. I've tested the patch under octave+linux, matlab+linux (it
works) and octave+win (it fails, probs w/ imagemagick + double).

  Hth,

  Etienne



[1] http://www.cs.ubc.ca/spider/lowe/keypoints/siftDemoV4.zip

  Synopsis:

    unzip siftDemoV4.zip;
    cd siftDemoV4;
    patch -p1 < mySift.patch
 
    In octave, make sure sift.m is in your path, then

    >> [image, descriptors, locs] = sift("/home/etienne/prog/various/siftDemoV4/book.pgm");
   >> showkeys(image, locs)

   See also 'help match'

[2] http://www.cs.ubc.ca/~lowe/keypoints/

  David G. Lowe, Öbject recognition from local scale-invariant
  features," International Conference on Computer Vision, Corfu,
  Greece (September 1999), pp. 1150-1157.

[3] A performance evaluation of local descriptors Krystian
    Mikolajczyk, Cordelia Schmid International Conference on Computer
    Vision & Pattern Recognition - June 2003

    http://lear.inrialpes.fr/pubs/2003/MS03/mikolajczyk_cvpr2003.pdf


--
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne

mySift.patch (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: SIFT image descriptor patch

Stéfan van der Walt
Thanks, Etienne.  It's good to be able to run those demos under Octave.

David Lowe's research might have been more popular with me if he
hadn't submitted a patent on the work:

Method and apparatus for identifying scale invariant features in an
image and use of same for locating an object in an image
    David G. Lowe, US Patent 6,711,293 (March 23, 2004). Provisional
    application filed March 8, 1999. Asignee: The University of
    British Columbia.

Maybe someone who understands patent laws better can enlighten me, but
why woud anyone do further research on an algorithm that has been
patented?

His algorithm is very relevant to the research that I am doing, but I
am not going to invest time in emplementing an algorithm that cannot
be released under a free license.

Regards
Stefan

On Tue, Dec 27, 2005 at 11:32:33AM -0500, Etienne Grossmann wrote:
>
>   Hi All,
>
> this patch could be of interest to octave users who do image
> processing.  You can apply it to the matlab code in siftDemoV4 [1] to
> allow octave to extract SIFT image features [2] with David Lowe's
> package.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: SIFT image descriptor patch

Andy Adler
On Wed, 28 Dec 2005, Stefan van der Walt wrote:

> Maybe someone who understands patent laws better can enlighten me, but
> why woud anyone do further research on an algorithm that has been
> patented?

Plenty of reasons. Most importantly you may want to
  - test the algorithm to see how well it works
  - test other algorithms against it
  - use parameters calculated this way to do other research

While there is a "tradition" of doing research on patented algorithms,
but there is no general "research only" exception to infringement.

Thus, it is _probably_ ok if you use their algorithm to test against
your research results if
   - you don't gain financially from it
   - you don't vicariously contribute to someone elses infringement
This is especially true since the author published his code on the
internet.

Of course, it is only _probably_ OK.

NB: I'm not a lawyer.
--
Andy Adler <[hidden email]> 1(613)562-5800x6218



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

[OctDev] Re: SIFT image descriptor patch

Etienne Grossmann
In reply to this post by Stéfan van der Walt


  Hi Stefan,

On Wed, Dec 28, 2005 at 04:51:33PM +0200, Stefan van der Walt wrote:
# Thanks, Etienne.  It's good to be able to run those demos under Octave.
#
# David Lowe's research might have been more popular with me if he
# hadn't submitted a patent on the work:
[snip]
#
# His algorithm is very relevant to the research that I am doing, but I
# am not going to invest time in emplementing an algorithm that cannot
# be released under a free license.
#
[snip]

  And you don't have to, since he provides linux/win binaries and a
Matlab wrapper; which you can use too under Octave, w/ the patch I
sent.

  Hth,

  Etienne

--
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Octave-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/octave-dev
Reply | Threaded
Open this post in threaded view
|

Re: SIFT image descriptor patch

Søren Hauberg
In reply to this post by Etienne Grossmann
Etienne,
Thanks for doing this, it's nice to have SIFT in Octave.
I get the following error on some images:

error: linspace: npoints is 1, but x1 != x2
error: evaluating argument list element number 1
error: evaluating argument list element number 2
error: evaluating assignment expression near line 28, column 6
error: evaluating for command near line 22, column 1
error: called from `imglines' in file `/home/sh/Dokumenter/Robot
projekt/Octave siftDemo/imglines.m'
error: evaluating assignment expression near line 42, column 9
error: evaluating if command near line 14, column 1
error: called from `showkeys' in file `/home/sh/Dokumenter/Robot
projekt/Octave siftDemo/showkeys.m'

I fixed this by a very dirty hack. That is,
if (len <= 1) len = 2; endif
in imglines.m

Thanks,
Søren

tir, 27 12 2005 kl. 11:32 -0500, skrev Etienne Grossmann:

>   Hi All,
>
> this patch could be of interest to octave users who do image
> processing.  You can apply it to the matlab code in siftDemoV4 [1] to
> allow octave to extract SIFT image features [2] with David Lowe's
> package.
>
>   The SIFT image detector identifies interest points, somewhat like a
> corner detector does, and gives them a local descriptor. The
> descriptor can then be used for matching purposes (another way to
> perform matching could be correlation of a small window around the
> feature). Wrt to corners + local window correlation, SIFT features are
> more robust to changes in illumination and viewpoint [3] and they are
> increasingly used in computer vision.
>
>   The siftDemo has functions to find sift features and to perform
> matching. I've tested the patch under octave+linux, matlab+linux (it
> works) and octave+win (it fails, probs w/ imagemagick + double).
>
>   Hth,
>
>   Etienne
>
>
>
> [1] http://www.cs.ubc.ca/spider/lowe/keypoints/siftDemoV4.zip
>
>   Synopsis:
>
>     unzip siftDemoV4.zip;
>     cd siftDemoV4;
>     patch -p1 < mySift.patch
>  
>     In octave, make sure sift.m is in your path, then
>
>     >> [image, descriptors, locs] = sift("/home/etienne/prog/various/siftDemoV4/book.pgm");
>    >> showkeys(image, locs)
>
>    See also 'help match'
>
> [2] http://www.cs.ubc.ca/~lowe/keypoints/
>
>   David G. Lowe, Öbject recognition from local scale-invariant
>   features," International Conference on Computer Vision, Corfu,
>   Greece (September 1999), pp. 1150-1157.
>
> [3] A performance evaluation of local descriptors Krystian
>     Mikolajczyk, Cordelia Schmid International Conference on Computer
>     Vision & Pattern Recognition - June 2003
>
>     http://lear.inrialpes.fr/pubs/2003/MS03/mikolajczyk_cvpr2003.pdf
>
>



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: SIFT image descriptor patch

Etienne Grossmann

  Are the rsults ugly?

On Mon, Feb 13, 2006 at 09:36:33PM +0100, Søren Hauberg wrote:
# Etienne,
# Thanks for doing this, it's nice to have SIFT in Octave.
# I get the following error on some images:
#
# error: linspace: npoints is 1, but x1 != x2
# error: evaluating argument list element number 1
# error: evaluating argument list element number 2
# error: evaluating assignment expression near line 28, column 6
# error: evaluating for command near line 22, column 1
# error: called from `imglines' in file `/home/sh/Dokumenter/Robot
# projekt/Octave siftDemo/imglines.m'
# error: evaluating assignment expression near line 42, column 9
# error: evaluating if command near line 14, column 1
# error: called from `showkeys' in file `/home/sh/Dokumenter/Robot
# projekt/Octave siftDemo/showkeys.m'
#
# I fixed this by a very dirty hack. That is,
# if (len <= 1) len = 2; endif
# in imglines.m
#
# Thanks,
# Søren
#
# tir, 27 12 2005 kl. 11:32 -0500, skrev Etienne Grossmann:
# >   Hi All,
# >
# > this patch could be of interest to octave users who do image
# > processing.  You can apply it to the matlab code in siftDemoV4 [1] to
# > allow octave to extract SIFT image features [2] with David Lowe's
# > package.
# >
# >   The SIFT image detector identifies interest points, somewhat like a
# > corner detector does, and gives them a local descriptor. The
# > descriptor can then be used for matching purposes (another way to
# > perform matching could be correlation of a small window around the
# > feature). Wrt to corners + local window correlation, SIFT features are
# > more robust to changes in illumination and viewpoint [3] and they are
# > increasingly used in computer vision.
# >
# >   The siftDemo has functions to find sift features and to perform
# > matching. I've tested the patch under octave+linux, matlab+linux (it
# > works) and octave+win (it fails, probs w/ imagemagick + double).
# >
# >   Hth,
# >
# >   Etienne
# >
# >
# >
# > [1] http://www.cs.ubc.ca/spider/lowe/keypoints/siftDemoV4.zip
# >
# >   Synopsis:
# >
# >     unzip siftDemoV4.zip;
# >     cd siftDemoV4;
# >     patch -p1 < mySift.patch
# >  
# >     In octave, make sure sift.m is in your path, then
# >
# >     >> [image, descriptors, locs] = sift("/home/etienne/prog/various/siftDemoV4/book.pgm");
# >    >> showkeys(image, locs)
# >
# >    See also 'help match'
# >
# > [2] http://www.cs.ubc.ca/~lowe/keypoints/
# >
# >   David G. Lowe, Öbject recognition from local scale-invariant
# >   features," International Conference on Computer Vision, Corfu,
# >   Greece (September 1999), pp. 1150-1157.
# >
# > [3] A performance evaluation of local descriptors Krystian
# >     Mikolajczyk, Cordelia Schmid International Conference on Computer
# >     Vision & Pattern Recognition - June 2003
# >
# >     http://lear.inrialpes.fr/pubs/2003/MS03/mikolajczyk_cvpr2003.pdf
# >
# >

--
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: SIFT image descriptor patch

Søren Hauberg
tir, 14 02 2006 kl. 05:56 -0500, skrev Etienne Grossmann:
>   Are the rsults ugly?
Before my hack I don't get any result shown, but after my hack
I get some result that look just fine.
The lines could use some anti-aliasing, but I can live with that.

Did that answer the question?

/Søren

> On Mon, Feb 13, 2006 at 09:36:33PM +0100, Søren Hauberg wrote:
> # Etienne,
> # Thanks for doing this, it's nice to have SIFT in Octave.
> # I get the following error on some images:
> #
> # error: linspace: npoints is 1, but x1 != x2
> # error: evaluating argument list element number 1
> # error: evaluating argument list element number 2
> # error: evaluating assignment expression near line 28, column 6
> # error: evaluating for command near line 22, column 1
> # error: called from `imglines' in file `/home/sh/Dokumenter/Robot
> # projekt/Octave siftDemo/imglines.m'
> # error: evaluating assignment expression near line 42, column 9
> # error: evaluating if command near line 14, column 1
> # error: called from `showkeys' in file `/home/sh/Dokumenter/Robot
> # projekt/Octave siftDemo/showkeys.m'
> #
> # I fixed this by a very dirty hack. That is,
> # if (len <= 1) len = 2; endif
> # in imglines.m
> #
> # Thanks,
> # Søren
> #
> # tir, 27 12 2005 kl. 11:32 -0500, skrev Etienne Grossmann:
> # >   Hi All,
> # >
> # > this patch could be of interest to octave users who do image
> # > processing.  You can apply it to the matlab code in siftDemoV4 [1] to
> # > allow octave to extract SIFT image features [2] with David Lowe's
> # > package.
> # >
> # >   The SIFT image detector identifies interest points, somewhat like a
> # > corner detector does, and gives them a local descriptor. The
> # > descriptor can then be used for matching purposes (another way to
> # > perform matching could be correlation of a small window around the
> # > feature). Wrt to corners + local window correlation, SIFT features are
> # > more robust to changes in illumination and viewpoint [3] and they are
> # > increasingly used in computer vision.
> # >
> # >   The siftDemo has functions to find sift features and to perform
> # > matching. I've tested the patch under octave+linux, matlab+linux (it
> # > works) and octave+win (it fails, probs w/ imagemagick + double).
> # >
> # >   Hth,
> # >
> # >   Etienne
> # >
> # >
> # >
> # > [1] http://www.cs.ubc.ca/spider/lowe/keypoints/siftDemoV4.zip
> # >
> # >   Synopsis:
> # >
> # >     unzip siftDemoV4.zip;
> # >     cd siftDemoV4;
> # >     patch -p1 < mySift.patch
> # >  
> # >     In octave, make sure sift.m is in your path, then
> # >
> # >     >> [image, descriptors, locs] = sift("/home/etienne/prog/various/siftDemoV4/book.pgm");
> # >    >> showkeys(image, locs)
> # >
> # >    See also 'help match'
> # >
> # > [2] http://www.cs.ubc.ca/~lowe/keypoints/
> # >
> # >   David G. Lowe, Öbject recognition from local scale-invariant
> # >   features," International Conference on Computer Vision, Corfu,
> # >   Greece (September 1999), pp. 1150-1157.
> # >
> # > [3] A performance evaluation of local descriptors Krystian
> # >     Mikolajczyk, Cordelia Schmid International Conference on Computer
> # >     Vision & Pattern Recognition - June 2003
> # >
> # >     http://lear.inrialpes.fr/pubs/2003/MS03/mikolajczyk_cvpr2003.pdf
> # >
> # >
>



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: SIFT image descriptor patch

Etienne Grossmann


On Tue, Feb 14, 2006 at 01:07:08PM +0100, Søren Hauberg wrote:
# tir, 14 02 2006 kl. 05:56 -0500, skrev Etienne Grossmann:
# >   Are the rsults ugly?
# Before my hack I don't get any result shown, but after my hack
# I get some result that look just fine.

Then your patch is "clean" enough to go to production :-), I'll put it
in asap. Thx for your fix.

  For antialiasing, patches are welcome. Imglines() may be of interest
to the octave-forge users too. Opinions anyone, judging on the help
text below?

## im2 = imglines (im, [r1,c1,r2,c2], col) - Plot line segments on a bitmap
##
## im       : R x C : Greylevel image
## r1c1r2c2 : N x 4 : Enpoint coordinates of segments
## col      : N x 1 : Color (default: lightest color of image, or
##                    lightest+1, if image is uniform)
##
## im2      : R x C : Output image
##
## TODO: Clip segments that stick out of image.
##       Do color images too.

  Cheers,

  Etienne


   

# The lines could use some anti-aliasing, but I can live with that.
#
# Did that answer the question?
#
# /Søren
#
# > On Mon, Feb 13, 2006 at 09:36:33PM +0100, Søren Hauberg wrote:
# > # Etienne,
# > # Thanks for doing this, it's nice to have SIFT in Octave.
# > # I get the following error on some images:
# > #
# > # error: linspace: npoints is 1, but x1 != x2
# > # error: evaluating argument list element number 1
# > # error: evaluating argument list element number 2
# > # error: evaluating assignment expression near line 28, column 6
# > # error: evaluating for command near line 22, column 1
# > # error: called from `imglines' in file `/home/sh/Dokumenter/Robot
# > # projekt/Octave siftDemo/imglines.m'
# > # error: evaluating assignment expression near line 42, column 9
# > # error: evaluating if command near line 14, column 1
# > # error: called from `showkeys' in file `/home/sh/Dokumenter/Robot
# > # projekt/Octave siftDemo/showkeys.m'
# > #
# > # I fixed this by a very dirty hack. That is,
# > # if (len <= 1) len = 2; endif
# > # in imglines.m
# > #
# > # Thanks,
# > # Søren
# > #
# > # tir, 27 12 2005 kl. 11:32 -0500, skrev Etienne Grossmann:
# > # >   Hi All,
# > # >
# > # > this patch could be of interest to octave users who do image
# > # > processing.  You can apply it to the matlab code in siftDemoV4 [1] to
# > # > allow octave to extract SIFT image features [2] with David Lowe's
# > # > package.
# > # >
# > # >   The SIFT image detector identifies interest points, somewhat like a
# > # > corner detector does, and gives them a local descriptor. The
# > # > descriptor can then be used for matching purposes (another way to
# > # > perform matching could be correlation of a small window around the
# > # > feature). Wrt to corners + local window correlation, SIFT features are
# > # > more robust to changes in illumination and viewpoint [3] and they are
# > # > increasingly used in computer vision.
# > # >
# > # >   The siftDemo has functions to find sift features and to perform
# > # > matching. I've tested the patch under octave+linux, matlab+linux (it
# > # > works) and octave+win (it fails, probs w/ imagemagick + double).
# > # >
# > # >   Hth,
# > # >
# > # >   Etienne
# > # >
# > # >
# > # >
# > # > [1] http://www.cs.ubc.ca/spider/lowe/keypoints/siftDemoV4.zip
# > # >
# > # >   Synopsis:
# > # >
# > # >     unzip siftDemoV4.zip;
# > # >     cd siftDemoV4;
# > # >     patch -p1 < mySift.patch
# > # >  
# > # >     In octave, make sure sift.m is in your path, then
# > # >
# > # >     >> [image, descriptors, locs] = sift("/home/etienne/prog/various/siftDemoV4/book.pgm");
# > # >    >> showkeys(image, locs)
# > # >
# > # >    See also 'help match'
# > # >
# > # > [2] http://www.cs.ubc.ca/~lowe/keypoints/
# > # >
# > # >   David G. Lowe, Öbject recognition from local scale-invariant
# > # >   features," International Conference on Computer Vision, Corfu,
# > # >   Greece (September 1999), pp. 1150-1157.
# > # >
# > # > [3] A performance evaluation of local descriptors Krystian
# > # >     Mikolajczyk, Cordelia Schmid International Conference on Computer
# > # >     Vision & Pattern Recognition - June 2003
# > # >
# > # >     http://lear.inrialpes.fr/pubs/2003/MS03/mikolajczyk_cvpr2003.pdf
# > # >
# > # >
# >

--
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------