![]() In MATLAB's internal memory, (0, 0) corresponds to subscript (1, 1). The image array is stored with (0, 0) as the top left corner of the image. ![]() The coordinates given by (Raster Row, Raster Column) are the 0-based image coordinates. (0,0) starts at the bottom left as expected for a regular plot.īefore getting started with some examples, first show the image in a MATLAB plot to take a look at how the image array (matrix) is actually stored in MATLAB: ![]() The following code creates the plot itself. The code examples that follow use the above data and variables. The above code defines the axes range that the image is stretched to and creates some (x, y) data to plot. % set the range of the axes % The image will be stretched to this. In this example, I used a gray scale version of one of the images in my artwork gallery, specifically Gentoo Kung Fu, because it is easy to see which way is up in the image unless you think it is possible for a penguin to take on three guys in hand-to-hand combat while standing upside down.
0 Comments
Leave a Reply. |