[Index for tmp_for_tar/imgio]
[Return to Master Index]
readjpg
(tmp_for_tar/imgio/readjpg.m)
Function Synopsis
[im, isPpm, maxval] = readjpg(fname)
Help text
[im, isPpm] = readjpg(fname)
readjpg Read a JPEG image file into Octave.
[im, isPpm, maxval] = readjpg(fname)
fname - JPEG filename.
im - image values as Octave variable.
isPpm - 1 - `im' is in PPM format.
0 - `im' is a graylevel matrix.
maxval - Maximal value
Modified: June 2000 by Etienne Grossmann <etienne@isr.ist.utl.pt>
to return isPpm and maxval.
Created: 8.5.98 .
Version: 1.0
Listing of function file tmp_for_tar/imgio/readjpg.m
## [im, isPpm] = readjpg(fname)
##
## Copyright (C) 1998 Ariel Tankus
##
## This program is free software.
## This file is part of the Image Processing Toolbox for Octave
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## readjpg Read a JPEG image file into Octave.
##
## [im, isPpm, maxval] = readjpg(fname)
## fname - JPEG filename.
## im - image values as Octave variable.
## isPpm - 1 - `im' is in PPM format.
## 0 - `im' is a graylevel matrix.
## maxval - Maximal value
## Author: Ariel Tankus <arielt@math.tau.ac.il>
## Modified: June 2000 by Etienne Grossmann <etienne@isr.ist.utl.pt>
## to return isPpm and maxval.
## Created: 8.5.98 .
## Version: 1.0
function [im, isPpm, maxval] = readjpg(fname)
command = sprintf('djpeg -pnm %s', fname);
fid = popen(command, 'r');
## if (nargout > 1)
[im, isPpm,maxval] = readpnm(fid);
## else
## im = readpnm(fid);
## end
endfunction
Produced by oct2html on Sat Sep 14 9:47:03 2002
Cross-Directory links are: ON