码迷,mamicode.com
首页 > 其他好文 > 详细

Octave中无法使用rgb2gray()函数

时间:2016-05-12 20:03:54      阅读:1060      评论:0      收藏:0      [点我收藏+]

标签:

在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

Octave中无法使用rgb2gray()函数

标签:

原文地址:http://blog.csdn.net/garfielder007/article/details/51355572

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!