Results 1 to 9 of 9

Thread: How to incude octave-image in Octave?

  1. #1
    Join Date
    Feb 2012
    Location
    ArcelorMittal Kazakhstan
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation How to incude octave-image in Octave?

    Hi, I am using Ubuntu 12.04 and just installed Octave as I've to do a bit of image processing.

    I also installed Octave-image package/add-on from software center.

    I don't know how to include this package/add-on in octave or does it get included by itself in it as soon as it is installed?

    I tried to produce complement of a image by following command after installing octave-image:
    Code:
    h = imcomplement(f)
    But this produced following error:

    Code:
    error: `imcomplement' undefined near line 11 column 5
    .

    Please help anyone.
    Last edited by satyamM; February 6th, 2013 at 02:38 PM.

  2. #2
    Join Date
    Feb 2012
    Location
    ArcelorMittal Kazakhstan
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question How to include octave-image in Octave?

    I need some urgent help fellas. Please help as soon as you can.
    Your help is much appreciated.


    And sorry for the spelling error in "include" in main subject.
    Satyam M.

  3. #3
    Join Date
    Feb 2012
    Location
    ArcelorMittal Kazakhstan
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation Re: How to include octave-image in Octave?

    To add more information about my problem, I am executing one octave script.

    My octave script reads like:

    I=imread('b.jpg');
    imshow(I)
    J=imcomplement(I);
    figure, imshow(J)

    It is saved in a file named "a.m".

    Now whenever I want to execute this a.m script I type on octave terminal: a
    It gets executed but produces following error:

    octave-3.2.4:13> a
    error: `imcomplement' undefined near line 5 column 3
    error: called from:
    error: /home/satyam/Desktop/a.m at line 5, column 2
    octave-3.2.4:13>



    So what's the problem, Do i need to include octave-image in Octave?
    How?
    Satyam M.

  4. #4
    Join Date
    Apr 2012
    Beans
    6,044

    Re: How to incude octave-image in Octave?

    by default it appears to get loaded automatically, but it will depend on your /etc/octave3.2.conf and/or local rc files I think

    You should be able to check what packages are loaded with

    Code:
    octave> pkg list
    and if necessary load manually with

    Code:
    octave> pkg load image

  5. #5
    Join Date
    Feb 2012
    Location
    ArcelorMittal Kazakhstan
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation Re: How to include octave-image in Octave?

    @steeldriver:

    octave>pkg list produces:
    Code:
    satyam@ubuntu:~$ octave > pkg list
    error: no such file, `list'
    error: source: error sourcing file `list'
    satyam@ubuntu:~$
    octave > pkg load image produces:

    Code:
    satyam@ubuntu:~$ octave > pkg load image
    error: no such file, `load'
    error: source: error sourcing file `load'
    satyam@ubuntu:~$

    Now what?
    Satyam M.

  6. #6
    Join Date
    Apr 2012
    Beans
    6,044

    Re: How to incude octave-image in Octave?

    sorry I meant to type 'pkg list' at the octave prompt - not the bash shell prompt

    Code:
    steeldriver@vm~ $ octave
    .
    .
    .
    octave:2> pkg list
    Package Name  | Version | Installation directory
    --------------+---------+-----------------------
           image *|  1.0.14 | /usr/share/octave/packages/3.2/image-1.0.14
    octave:3> version
    ans = 3.2.4
    octave:4>

  7. #7
    Join Date
    Feb 2012
    Location
    ArcelorMittal Kazakhstan
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Exclamation Re: How to include octave-image in Octave?

    Mine one says something like following:


    octave-3.2.4:14> pkg list
    Package Name | Version | Installation directory
    --------------+---------+-----------------------
    image | 1.0.14 | /usr/share/octave/packages/3.2/image-1.0.14

    octave-3.2.4:15> version
    ans = 3.2.4
    octave-3.2.4:16>

    now what?
    Satyam M.

  8. #8
    Join Date
    Apr 2012
    Beans
    6,044

    Re: How to incude octave-image in Octave?

    did you try
    Code:
    pkg load image
    you can get help on the pkg command (including auto loading options) by typing
    Code:
    help pkg

  9. #9
    Join Date
    Feb 2012
    Location
    ArcelorMittal Kazakhstan
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Smile Re: How to incude octave-image in Octave?

    @steeldriver:

    I was not doing "pkg load image" at octave prompt, thus image package was not loading.

    I did it as you said, now my code is compiling and producing desired output.
    Thank you steeldriver.
    Satyam M.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •