main content

create head phantom image -凯发k8网页登录

create head phantom image

description

example

p = phantom(def,n) generates an image of a head phantom that can be used to test the numerical accuracy of radon and iradon or other two-dimensional reconstruction algorithms. p is a grayscale image that consists of one large ellipse (representing the brain) containing several smaller ellipses (representing features in the brain). def specifies the type of head phantom to generate, and n specifies the number of rows and columns in the phantom image.

p = phantom(e,n) generates a user-defined phantom, where each row of the matrix e specifies an ellipse in the image. e has six columns, with each column containing a different parameter for the ellipses.

[p,e] = phantom(___) returns the matrix e used to generate the phantom.

examples

create the modified shepp-logan head phantom image and display it.

p = phantom('modified shepp-logan',200);
imshow(p)

figure contains an axes object. the axes object contains an object of type image.

input arguments

type of head phantom to generate, specified as one of the following.

  • 'shepp-logan' — test image used widely by researchers in tomography

  • 'modified shepp-logan' — variant of the shepp-logan phantom in which the contrast is improved for better visual perception

data types: char | string

number of rows and columns in the phantom image, specified as a positive integer.

data types: double

ellipses that define the phantom, specified as an e-by-6 numeric matrix defining e ellipses. the six columns of e are the ellipse parameters.

column

parameter

meaning

column 1

a

additive intensity value of the ellipse

column 2

a

length of the horizontal semiaxis of the ellipse

column 3

b

length of the vertical semiaxis of the ellipse

column 4

x0

x-coordinate of the center of the ellipse

column 5

y0

y-coordinate of the center of the ellipse

column 6

phi

angle (in degrees) between the horizontal semiaxis of the ellipse and the x-axis of the image

the domains for the x- and y-axes are [-1,1]. columns 2 through 5 must be specified in terms of this range.

data types: double

output arguments

phantom image, returned as an n-by-n numeric matrix.

data types: double

tips

for any given pixel in the output image, the pixel's value is equal to the sum of the additive intensity values of all ellipses that the pixel is a part of. if a pixel is not part of any ellipse, its value is 0.

the additive intensity value a for an ellipse can be positive or negative; if it is negative, the ellipse will be darker than the surrounding pixels. note that, depending on the values of a, some pixels can have values outside the range [0, 1].

references

[1] jain, anil k., fundamentals of digital image processing, englewood cliffs, nj, prentice hall, 1989, p. 439.

version history

introduced before r2006a

see also

|

网站地图