Octave中无法使用rgb2gray()函数

在Octave中加载图像并转成灰度图时,发现rgb2gray()函数不存在,上网搜了一下,stackoverflow上给出了相关解释,如下:

The problem is that you didn‘t load your packages. When you type pkg list you can find which ones are loaded by an asterisk in front of their names. Load a package with
pkg load image.

Having to load a packages is that thing that most users find strange but if you compare with other languages, such as Python, Perl, or C++, would you expect them to
import, use, or #include every libraries available in the system by default? See
Octave‘s FAQ for more details.

原来Octave缺省状态下缺少相关包,比如图像处理、信号处理方面的包,需要我们手动安装。

sourceforge上下载相关包,放在Octave的搜索路径上,在Octave的命令行中执行安装命令:

pkg install -forge package_name 

rgb2gray()函数需要安装image包。

附一下sourceforge上Octave的相关包:

Packages

These packages are meant for current versions of Octave. See the unmaintainedsection for information on older versions.

bim

Package for solving Diffusion Advection Reaction (DAR) Partial Differential Equations

detailsdownload

bsltl

The BSLTL package is a free collection of OCTAVE/MATLAB routines for working with the biospeckle laser technique

detailsdownload

cgi

Common Gatway Interface for Octave

detailsdownload

communications

Digital Communications, Error Correcting Codes (Channel Code), Source Code functions, Modulation and Galois Fields

detailsdownload

control

Computer-Aided Control System Design (CACSD) Tools for GNU Octave, based on the proven SLICOT Library

detailsdownload

data-smoothing

Algorithms for smoothing noisy data

detailsdownload

database

Interface to SQL databases, currently only postgresql using libpq

detailsdownload

dataframe

Data manipulation toolbox similar to R data

detailsdownload

dicom

Digital communications in medicine (DICOM) file io

detailsdownload

divand

divand performs an n-dimensional variational analysis (interpolation) of arbitrarily located observations

detailsdownload

doctest

The Octave-Forge Doctest package finds specially-formatted blocks of example code within documentation files

detailsdownload

econometrics

Econometrics functions including MLE and GMM based techniques

detailsdownload

fem-fenics

pkg for the resolution of partial differential equations based on fenics

detailsdownload

financial

Monte Carlo simulation, options pricing routines, financial manipulation, plotting functions and additional date manipulation tools

detailsdownload

fits

The Octave-FITS package provides functions for reading, and writing FITS (Flexible Image Transport System) files

detailsdownload

fl-core

The package contains code for basic functions in Fuzzy Logic for Octave

detailsdownload

fpl

Collection of routines to export data produced by Finite Elements or Finite Volume Simulations in formats used by some visualization programs

detailsdownload

fuzzy-logic-toolkit

A mostly MATLAB-compatible fuzzy logic toolkit for Octave

detailsdownload

ga

Genetic optimization code

detailsdownload

general

General tools for Octave

detailsdownload

generate_html

This package provides functions for generating HTML pages that contain the help texts for a set of functions

detailsdownload

geometry

Library for geometric computing extending MatGeom functions

detailsdownload

image

The Octave-forge Image package provides functions for processing images

detailsdownload

image-acquisition

The Octave-forge Image Aquisition package provides functions to capture images from connected devices

detailsdownload

instrument-control

Low level I/O functions for serial, i2c, parallel, tcp, gpib, vxi11 and usbtmc interfaces

detailsdownload

interval

The interval package for real-valued interval arithmetic allows one to evaluate functions over subsets of their domain

detailsdownload

io

Input/Output in external formats.

detailsdownload

java

Provides Java interface with OO-like Java objects manipulation

detailsdownload

level-set

Routines for calculating the time-evolution of the level-set equation and extracting geometric information from the level-set function

detailsdownload

linear-algebra

Additional linear algebra code, including general SVD and matrix functions

detailsdownload

lssa

A package implementing tools to compute spectral decompositions of irregularly-spaced time series

detailsdownload

ltfat

The Large Time/Frequency Analysis Toolbox (LTFAT) is a Matlab/Octave toolbox for working with time-frequency analysis, wavelets and signal processing

detailsdownload

mapping

Simple mapping and GIS .shp and raster file functions

detailsdownload

mechanics

Library with functions useful for numerical computation in classical mechanics and structural analysis

detailsdownload

miscellaneous

Miscellaneous tools that don‘t fit somewhere else

detailsdownload

mpi

Octave bindings for basic Message Passing Interface (MPI) functions for parallel computing

detailsdownload

msh

Create and manage triangular and tetrahedral meshes for Finite Element or Finite Volume PDE solvers

detailsdownload

mvn

Multivariate normal distribution clustering and utility functions

detailsdownload

nan

A statistics and machine learning toolbox for data with and w/o missing values

detailsdownload

ncarray

Access a single or a collection of NetCDF files as a multi-dimensional array

detailsdownload

netcdf

A MATLAB compatible NetCDF interface for Octave

detailsdownload

nurbs

Collection of routines for the creation, and manipulation of Non-Uniform Rational B-Splines (NURBS), based on the NURBS toolbox by Mark Spink

detailsdownload

ocs

Package for solving DC and transient electrical circuit equations

detailsdownload

octcdf

A NetCDF interface for octave

detailsdownload

octclip

This package allows to do boolean operations with polygons using the Greiner-Hormann algorithm

detailsdownload

octproj

This package allows to call functions of PROJ

detailsdownload

odepkg

A package for solving ordinary differential equations and more

detailsdownload

optics

Functions covering various aspects of optics

detailsdownload

optim

Non-linear optimization toolkit

detailsdownload

optiminterp

An optimal interpolation toolbox for octave

detailsdownload

parallel

Parallel execution package

detailsdownload

quaternion

Quaternion package for GNU Octave, includes a quaternion class with overloaded operators

detailsdownload

queueing

The queueing package provides functions for queueing networks and Markov chains analysis

detailsdownload

secs1d

A Drift-Diffusion simulator for 1d semiconductor devices

detailsdownload

secs2d

A Drift-Diffusion simulator for 2d semiconductor devices

detailsdownload

secs3d

A Drift-Diffusion simulator for 3d semiconductor devices

detailsdownload

signal

Signal processing tools, including filtering, windowing and display functions

detailsdownload

sockets

Socket functions for networking from within octave

detailsdownload

sparsersb

Interface to the librsb package implementing the RSB sparse matrix format

detailsdownload

specfun

Special functions including ellipitic functions, etc

detailsdownload

splines

Additional spline functions

detailsdownload

statistics

Additional statistics functions for Octave

detailsdownload

stk

The STK is a (not so) Small Toolbox for Kriging

detailsdownload

strings

Additional functions for manipulation and analysis of strings

detailsdownload

struct

Additional Structure manipulations functions

detailsdownload

symbolic

The Octave-Forge Symbolic package adds symbolic calculation features to GNU Octave

detailsdownload

tisean

Port of TISEAN 3

detailsdownload

tsa

Stochastic concepts and maximum entropy methods for time series analysis

detailsdownload

video

A wrapper for ffmpeg‘s libavformat and libavcodec, implementing addframe, avifile, aviinfo and aviread

detailsdownload

vrml

3D graphics using VRML

detailsdownload

windows

Provides COM interface and additional functionality on Windows

detailsdownload

zeromq

ZeroMQ bindings for GNU Octave

detailsdownload

Renamed or moved packages

Some packages have been renamed or merged over time. When thishappens, a dummy transitional package is created -- empty anddependent on its new package. After some time, those are removedas well. The following is a list of such packages:

  • combinatorics -merged into miscellaneous and specfun
  • openmpi_ext - renamed mpi.
  • physicalconstants - merged into miscellaneous.
  • time - merged into financial.

Unmaintained packages

The Octave Forge project is a location to develop multiple packages for GNUOctave. With time, some packages become unmaintained, usually because the originalauthor no longer requires it and no one steps up to take its position. Without amaintainer or active
user base, and as Octave evolves, we do not know how usablethey are, so we can no longer honestly recommend their use.

They are still stored and release tarballs can be downloaded from ourFile Release System(same for the very oldmonolithic
releases
) .However, many of them have accumulated bug fixes and new features in themercurial orSVNrepositories,
it simply happens that no maintainer has prepared a release.Because of this, we encourage users to check the development sources, not the releasedtarballs. Furthermore,bug reports for
those packagescontinue to be welcome, and anyone wishing to take up the position of maintainer, please contactus through themaintainers mailing list.

The complete list of unmaintained packages is:

  • actuarial
  • ad
  • ann
  • audio
  • benchmark
  • bioinfo
  • civil-engineering
  • engine
  • fenv
  • gnuplot
  • gsl
  • informationtheory
  • integration
  • irsa
  • missing-functions
  • multicore
  • nlwing2
  • nnet
  • oct2mat
  • octgpr
  • odebvp
  • outliers
  • pdb
  • plot
  • simp
  • special-matrix
  • symband
  • tcl-octave
  • xraylib
  • zenity

参考:

[1]:http://octave.sourceforge.net/

[2]:http://octave.sourceforge.net/packages.php

时间: 2024-10-16 03:30:15

Octave中无法使用rgb2gray()函数的相关文章

Qt调用dll中的功能函数

DLL 优点 ------------------------------------- 1.扩展了应用程序的特性: 2.可以用许多种编程语言来编写: 3.简化了软件项目的管理: 4.有助于节省内存: 5.有助于资源共享: 6.有助于应用程序的本地化: 7.有助于解决平台差异: 8.可以用于一些特殊的目的.windows使得某些特性只能为DLL所用. 转载:http://www.cnblogs.com/hicjiajia/archive/2010/08/27/1810239.html Qt调用d

条款9:绝不要在构造以及析构函数中调用虚函数

在构造以及析构函数期间不要调用virtual函数,因为这类调用从不下降到derived class中.例如说下面这个例子: 1 class Transaction{ 2 public: 3 Transaction(); 4 virtual void logTransactions()s const = 0; 5 //... 6 }; 7 Transaction::Transaction() 8 { 9 //... 10 logTransaction(); 11 } 12 class BuyTra

Effective C++_笔记_条款09_绝不在构造和析构过程中调用virtual函数

(整理自Effctive C++,转载请注明.整理者:华科小涛@http://www.cnblogs.com/hust-ghtao/) 为方便采用书上的例子,先提出问题,在说解决方案. 1 问题 1: class Transaction{ 2: public: 3: Transaction(); 4: virtual void LogTransaction() const = 0 ; 5: ... 6: }; 7:  8: Transaction::Transaction() //Base cl

python模块基础之getpass模块(pycharm中无法使用。)

python模块基础之getpass模块 getpass模块提供了可移植的密码输入,一共包括下面两个函数: 1. getpass.getpass() 2. getpass.getuser() getpass.getpass([prompt[, stream]]) 提示用户输入一段密码,参数 prompt 用于提示用户开始输入,默认为'Password: '.在 Unix 上,该提示符被写入到类文件对象流中.参数 stream 默认为控制终端 (/dev/tty) 或入过前者不可用时为 sys.s

LoadRunner中的Web 函数列表

web test LoadRunner fuction_list D:\Program Files (x86)\Mercury Interactive\Mercury LoadRunner\bin>ls -l *.chm -rw-rw-rw-   1 user     group       25893 May 20  2004 FuncRef.chm -rw-rw-rw-   1 user     group       29443 May 20  2004 RPM_Configuration

JavaScript中的Generator函数

1. 简介 Generator函数时ES6提供的一种异步编程解决方案.Generator语法行为和普通函数完全不同,我们可以把Generator理解为一个包含了多个内部状态的状态机. 执行Generator函数回返回一个遍历器对象,也就是说Generator函数除了提供状态机,还是一个遍历器对象生成函数.Generator可以以此返回多个遍历器对象,通过这个对象可以以此访问到Generator函数内部的多个状态. 形式上Generator函数和普通的函数有两点不同,一是function关键字后面

C++中的虚函数、重写与多态

在C++中顺利使用虚函数需掌握的技术细节 如函数在派生类中的定义有别于基类中的定义,而且你希望它成为虚函数,就要为基类的函数声明添加保留字virtual.在派生类的函数声明中,则可以不添加virtual.函数在基类中virtual,在派生类中自动virtual(但为了澄清,最好派生类中也将函数声明标记为virtual,尽管这并非必须). 保留字virtual在函数声明中添加,不要再函数定义中添加. 除非使用保留字virtual,否则不能获得虚函数,也不能获得虚函数的任何好处. 既然虚函数如此好用

检测某个方法是否属于某个类中--解析php函数method_exists()与is_callable()的区别

php函数method_exists() 与is_callable()的区别在哪?在php面相对象设计过程中,往往我们需要在调用某一个方法是否属于某一个类的时候做出判断,常用的方法有 method_exists()和is_callable() 相比之下,is_callable()函数要高级一些,它接受字符串变量形式的方法名作为 第一个参数,如果类方法存在并且可以调用,则返回true.如果要检测类中的方法是否能被调用,可以给函数传递一个数组而不是类的方法名作为参数.数组必须包含对象或类名,以将其作

CentOS 中无法使用make,make install 命令 make: command not

CentOS 中无法使用make,make install 命令 make: command not found 1.安装make yum -y install gcc automake autoconf libtool make 2.安装gcc yum install gcc gcc-c++