comparison scripts/image/imread.m @ 20158:7503499a252b stable

doc: Update docstrings to have one sentence summary as first line. Update scripts in audio, elfun, general, geometry, and image directories. * scripts/audio/@audioplayer/__get_properties__.m, scripts/audio/@audioplayer/audioplayer.m, scripts/audio/@audioplayer/get.m, scripts/audio/@audioplayer/isplaying.m, scripts/audio/@audioplayer/play.m, scripts/audio/@audioplayer/playblocking.m, scripts/audio/@audioplayer/set.m, scripts/audio/@audioplayer/subsasgn.m, scripts/audio/@audioplayer/subsref.m, scripts/audio/@audiorecorder/audiorecorder.m, scripts/audio/@audiorecorder/get.m, scripts/audio/@audiorecorder/getaudiodata.m, scripts/audio/@audiorecorder/getplayer.m, scripts/audio/@audiorecorder/isrecording.m, scripts/audio/@audiorecorder/play.m, scripts/audio/@audiorecorder/record.m, scripts/audio/@audiorecorder/recordblocking.m, scripts/audio/@audiorecorder/set.m, scripts/audio/@audiorecorder/stop.m, scripts/audio/@audiorecorder/subsasgn.m, scripts/audio/@audiorecorder/subsref.m, scripts/audio/lin2mu.m, scripts/audio/mu2lin.m, scripts/audio/record.m, scripts/audio/sound.m, scripts/audio/soundsc.m, scripts/audio/wavread.m, scripts/audio/wavwrite.m, scripts/elfun/cosd.m, scripts/elfun/sind.m, scripts/elfun/tand.m, scripts/general/accumarray.m, scripts/general/accumdim.m, scripts/general/bitcmp.m, scripts/general/bitget.m, scripts/general/bitset.m, scripts/general/blkdiag.m, scripts/general/cart2pol.m, scripts/general/cart2sph.m, scripts/general/cell2mat.m, scripts/general/celldisp.m, scripts/general/chop.m, scripts/general/circshift.m, scripts/general/common_size.m, scripts/general/cplxpair.m, scripts/general/cumtrapz.m, scripts/general/dblquad.m, scripts/general/deal.m, scripts/general/del2.m, scripts/general/display.m, scripts/general/divergence.m, scripts/general/fieldnames.m, scripts/general/flip.m, scripts/general/flipdim.m, scripts/general/fliplr.m, scripts/general/flipud.m, scripts/general/gradient.m, scripts/general/interp3.m, scripts/general/interpft.m, scripts/general/interpn.m, scripts/general/loadobj.m, scripts/general/logspace.m, scripts/general/methods.m, scripts/general/nargchk.m, scripts/general/narginchk.m, scripts/general/nargoutchk.m, scripts/general/nextpow2.m, scripts/general/nthargout.m, scripts/general/num2str.m, scripts/general/pol2cart.m, scripts/general/polyarea.m, scripts/general/postpad.m, scripts/general/prepad.m, scripts/general/profile.m, scripts/general/quadgk.m, scripts/general/quadl.m, scripts/general/quadv.m, scripts/general/randi.m, scripts/general/rat.m, scripts/general/repmat.m, scripts/general/rot90.m, scripts/general/rotdim.m, scripts/general/saveobj.m, scripts/general/shift.m, scripts/general/shiftdim.m, scripts/general/sortrows.m, scripts/general/sph2cart.m, scripts/general/structfun.m, scripts/general/subsindex.m, scripts/general/trapz.m, scripts/general/triplequad.m, scripts/geometry/delaunayn.m, scripts/geometry/dsearch.m, scripts/geometry/dsearchn.m, scripts/geometry/griddata.m, scripts/geometry/griddata3.m, scripts/geometry/griddatan.m, scripts/geometry/inpolygon.m, scripts/geometry/rectint.m, scripts/geometry/tsearchn.m, scripts/geometry/voronoi.m, scripts/geometry/voronoin.m, scripts/help/__unimplemented__.m, scripts/help/doc.m, scripts/help/doc_cache_create.m, scripts/help/get_first_help_sentence.m, scripts/help/help.m, scripts/help/lookfor.m, scripts/help/print_usage.m, scripts/help/type.m, scripts/help/which.m, scripts/image/autumn.m, scripts/image/bone.m, scripts/image/brighten.m, scripts/image/cmpermute.m, scripts/image/colorcube.m, scripts/image/contrast.m, scripts/image/cool.m, scripts/image/copper.m, scripts/image/cubehelix.m, scripts/image/flag.m, scripts/image/gmap40.m, scripts/image/gray.m, scripts/image/gray2ind.m, scripts/image/hot.m, scripts/image/hsv.m, scripts/image/image.m, scripts/image/imagesc.m, scripts/image/imfinfo.m, scripts/image/imformats.m, scripts/image/imread.m, scripts/image/imshow.m, scripts/image/imwrite.m, scripts/image/iscolormap.m, scripts/image/jet.m, scripts/image/lines.m, scripts/image/ntsc2rgb.m, scripts/image/ocean.m, scripts/image/pink.m, scripts/image/prism.m, scripts/image/rainbow.m, scripts/image/rgb2ntsc.m, scripts/image/spinmap.m, scripts/image/spring.m, scripts/image/summer.m, scripts/image/white.m, scripts/image/winter.m: Update docstrings to have one sentence summary as first line. Re-structure to have line lengths <= 80 chars.
author Rik <rik@octave.org>
date Sun, 03 May 2015 09:36:20 -0700
parents 9fc020886ae9
children
comparison
equal deleted inserted replaced
20153:3b3579ad7e46 20158:7503499a252b
27 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{ext}) 27 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{ext})
28 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{idx}) 28 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{idx})
29 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{param1}, @var{val1}, @dots{}) 29 ## @deftypefnx {Function File} {[@dots{}] =} imread (@dots{}, @var{param1}, @var{val1}, @dots{})
30 ## Read images from various file formats. 30 ## Read images from various file formats.
31 ## 31 ##
32 ## Reads an image as a matrix from the file @var{filename}. If there is 32 ## Read an image as a matrix from the file @var{filename}. If there is no file
33 ## no file @var{filename}, and @var{ext} was specified, it will look for 33 ## @var{filename}, and @var{ext} was specified, it will look for a file with
34 ## a file with the extension @var{ext}. Finally, it will attempt to download 34 ## the extension @var{ext}. Finally, it will attempt to download and read an
35 ## and read an image from @var{url}. 35 ## image from @var{url}.
36 ## 36 ##
37 ## The size and class of the output depends on the 37 ## The size and class of the output depends on the format of the image. A
38 ## format of the image. A color image is returned as an 38 ## color image is returned as an @nospell{MxNx3} matrix. Gray-level and
39 ## @nospell{MxNx3} matrix. Gray-level and black-and-white images are 39 ## black-and-white images are of size @nospell{MxN}. Multipage images will
40 ## of size @nospell{MxN}. Multipage images will have an additional 4th 40 ## have an additional 4th dimension.
41 ## dimension. 41 ##
42 ## 42 ## The bit depth of the image determines the class of the output:
43 ## The bit depth of the image determines the 43 ## @qcode{"uint8"}, @qcode{"uint16"} or @qcode{"single"} for gray and color,
44 ## class of the output: @qcode{"uint8"}, @qcode{"uint16"} or @qcode{"single"} 44 ## and @qcode{"logical"} for black and white. Note that indexed images always
45 ## for gray and color, and @qcode{"logical"} for black and white. 45 ## return the indexes for a colormap, independent if @var{map} is a requested
46 ## Note that indexed images always return the indexes for a colormap, 46 ## output. To obtain the actual RGB image, use @code{ind2rgb}. When more
47 ## independent if @var{map} is a requested output. To obtain the actual 47 ## than one indexed image is being read, @var{map} is obtained from the
48 ## RGB image, use @code{ind2rgb}. When more than one indexed image is being 48 ## first. In some rare cases this may be incorrect and @code{imfinfo} can be
49 ## read, @var{map} is obtained from the first. In some rare cases this 49 ## used to obtain the colormap of each image.
50 ## may be incorrect and @code{imfinfo} can be used to obtain the colormap of
51 ## each image.
52 ## 50 ##
53 ## See the Octave manual for more information in representing images. 51 ## See the Octave manual for more information in representing images.
54 ## 52 ##
55 ## Some file formats, such as TIFF and GIF, are able to store multiple 53 ## Some file formats, such as TIFF and GIF, are able to store multiple images
56 ## images in a single file. @var{idx} can be a scalar or vector 54 ## in a single file. @var{idx} can be a scalar or vector specifying the
57 ## specifying the index of the images to read. By default, Octave 55 ## index of the images to read. By default, Octave will only read the first
58 ## will only read the first page. 56 ## page.
59 ## 57 ##
60 ## Depending on the file format, it is possible to configure the reading 58 ## Depending on the file format, it is possible to configure the reading of
61 ## of images with @var{param}, @var{val} pairs. The following options 59 ## images with @var{param}, @var{val} pairs. The following options are
62 ## are supported: 60 ## supported:
63 ## 61 ##
64 ## @table @samp 62 ## @table @samp
65 ## @item @qcode{"Frames"} or @qcode{"Index"} 63 ## @item @qcode{"Frames"} or @qcode{"Index"}
66 ## This is an alternative method to specify @var{idx}. When specifying it 64 ## This is an alternative method to specify @var{idx}. When specifying it
67 ## in this way, its value can also be the string @qcode{"all"}. 65 ## in this way, its value can also be the string @qcode{"all"}.
68 ## 66 ##
69 ## @item @qcode{"Info"} 67 ## @item @qcode{"Info"}
70 ## This option exists for @sc{matlab} compatibility and has no effect. For 68 ## This option exists for @sc{matlab} compatibility and has no effect. For
71 ## maximum performance while reading multiple images from a single file, 69 ## maximum performance while reading multiple images from a single file, use
72 ## use the Index option. 70 ## the Index option.
73 ## 71 ##
74 ## @item @qcode{"PixelRegion"} 72 ## @item @qcode{"PixelRegion"}
75 ## Controls the image region that is read. Takes as value a cell array 73 ## Controls the image region that is read. Takes as value a cell array with
76 ## with two arrays of 3 elements @code{@{@var{rows} @var{cols}@}}. The 74 ## two arrays of 3 elements @code{@{@var{rows} @var{cols}@}}. The elements
77 ## elements in the array are the start, increment and end pixel to be 75 ## in the array are the start, increment and end pixel to be read. If the
78 ## read. If the increment value is omitted, defaults to 1. For example, 76 ## increment value is omitted, defaults to 1. For example, the following are
79 ## the following are all equivalent: 77 ## all equivalent:
80 ## 78 ##
81 ## @example 79 ## @example
82 ## @group 80 ## @group
83 ## imread (filename, "PixelRegion", @{[200 600] [300 700]@}); 81 ## imread (filename, "PixelRegion", @{[200 600] [300 700]@});
84 ## imread (filename, "PixelRegion", @{[200 1 600] [300 1 700]@}); 82 ## imread (filename, "PixelRegion", @{[200 1 600] [300 1 700]@});