[Index for tmp_for_tar/imgio]
[Return to Master Index]
splitppm
(tmp_for_tar/imgio/splitppm.m)
Function Synopsis
[r g b] = splitppm(im)
Help text
[r g b] = splitppm(im)
splitppm Split an image whose columns contain interleaved
red, green, blue values (PPM style), i.e:
1st column contains red values,
2nd column contains green values,
3rd column contains blue values,
4th column contains the next column of red values,
etc.
into the Red, Green, Blue matrices.
[r g b] = splitppm(im)
im - interleaved RGB values (in PPM style).
r - red component.
g - green component.
b - blue component.
Created: 8.5.98.
Version: 1.0
Listing of function file tmp_for_tar/imgio/splitppm.m
## [r g b] = splitppm(im)
##
## 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.
##
## splitppm Split an image whose columns contain interleaved
## red, green, blue values (PPM style), i.e:
## 1st column contains red values,
## 2nd column contains green values,
## 3rd column contains blue values,
## 4th column contains the next column of red values,
## etc.
## into the Red, Green, Blue matrices.
##
## [r g b] = splitppm(im)
## im - interleaved RGB values (in PPM style).
## r - red component.
## g - green component.
## b - blue component.
##
## Author: Ariel Tankus <arielt@math.tau.ac.il>
## Created: 8.5.98.
## Version: 1.0
function [r g b] = splitppm(im)
r = im(:, 1:3:size(im,2));
g = im(:, 2:3:size(im,2));
b = im(:, 3:3:size(im,2));
endfunction
Produced by oct2html on Sat Sep 14 9:47:03 2002
Cross-Directory links are: ON