In: Computer Science
Write a MATLAB code for importing an image and then being able to find all the coordinates that would draw that image on a plot column by column and row by row with a continuous line.
Description
image(
C) displays the data in array C
as an image. Each element of C
specifies the color for
1 pixel of the image. The resulting image is an
m
-by-n
grid of pixels where
m
is the number of rows and n
is the
number of columns in C
. The row and column indices of
the elements determine the centers of the corresponding pixels.
image(
x,y
,C
) specifies
the image location. Use x
and y
to
specify the locations of the corners corresponding to
C(1,1)
and C(m,n)
. To specify both
corners, set x
and y
as two-element
vectors. To specify the first corner and let image
determine the other, set x
and y
as
scalar values. The image is stretched and oriented as
applicable.
image('CData',
C) adds the image to the current axes
without replacing existing plots. This syntax is the low-level
version of image(C)
.
image('XData',
x,'YData',y
,'CData',C
)specifies
the image location. This syntax is the low-level version of
image(x,y,C)
.
image(___,
Name,Value) specifies image properties
using one or more name-value pair arguments. You can specify image
properties with any of the input argument combinations in the
previous syntaxes.
image(
ax,___) creates the image in the axes
specified by ax
instead of in the current axes
(gca
). The option ax
can precede any of
the input argument combinations in the previous syntaxes.
returns the
im
= image(___)Image
object created. Use im
to set
properties of the image after it is created. You can specify this
output with any of the input argument combinations in the previous
syntaxes.
You can refer more at:
https://www.mathworks.com/help/matlab/ref/image.html