Constructing Image DataSets
Building image DSOs can be accomplished via a gui or from the command line. Using buildimage you can designate the folded image data, the spatial modes (dimensions) of the image, the target mode where image is unfolded to, and a name for the DSO. Alternatively you can run imageload and designate this information via a GUI. Imageload is also called from the Analysis and Dataset Editor applications via File/Import menu.
From the Command Line
The following example uses the EchoRidgeClouds.jpeg image from the MIA_Toolbox/dems folder. This JPEG image contains RGB (Truecolor) information of size N x M x 3 where N and M are the pixel (spatial) dimensions. The following commands will load the image using the Matlab image read command imread then unfold the image into the first mode of an image dataset.
>> myimage = imread('EchoRidgeClouds.jpeg'); >> myimage = buildimage(myimage ,[1 2], 1, 'myNewImage') myimage = name: myNewImage type: image author: date: 03-Oct-2005 10:31:03 moddate: 03-Oct-2005 10:31:03 data: 393216x3 [double] imagesize: 768x512 imagemode: 1 label: {2x1} [array (char)] Mode 1 [: ] Mode 2 [: ] axisscale: {2x1} [vector (real)] ...
What if you have an existing DSO with image data in it? Use the exact same command:
>> myimage = buildimage(mydso ,[1 2], 1, 'myNewImage')
The last input to buildimage, 'myNewImage', renames the dataset (the default name is the variable name). The default setting for buildimage is to handle 3 dimensional data (three modes), see the documentation for specific settings.