Материал готовится,

пожалуйста, возвращайтесь позднее

пожалуйста, возвращайтесь позднее

In this section, I wanna talk about how

digital images work in the computer. So,

here I've got an example - an image of some

yellow flowers and what we're gonna see is

that this looks like sort of an organic

rounded whole thing. In the computer, it's

gonna come down to really just a lot of

little numbers. So, how's that work? So

what I wanna do is focus on this upper

left flower here. You'll see there's a

little green area with a little thing in

the middle. So if I zoom in by a factor of

ten on just that square, it looks like

this. So what you see is that the image is

made of these little square things. So

these are called pixels. So each pixel is

square. They're quite small, so, you know,

there's not an exact number for it but

maybe 100 pixels per inch. And each pixel

shows just a single color, so it's just

locked as the square of a single color.

And what's funny is if you, you look at it

here it looks kind of. Very artificial and

hard edged, but because the pixel is so

small when you look at it here in the

original image, you know just, it just

looks right. The eye doesn't, the pixels

are small enough that you don't see those little

hard edges. So this is what an image looks

like when you sort of zoom in and see the

parts. If you want to think about how many

pixels there are in an image, it's just a

question of multiplication. So if I had an

image that was 800 pixels wide by 600

pixels high it's just a question of

multiplying. So I multiply those two, and

that's 480,000 pixels. You may have heard

the term megapixel. Is commonly used for

computers and cameras and things. So, a

megapixel is a million pixels. So, my

800x600 image, 480,000. Well, that's about

half a megapixel, roughly speaking.

So that's not a very big

image, by modern standards. A digital

camera today, even on a phone usually

would produce an image on the order of

five megapixels, ten megapixels, maybe

twenty megapixels. That would be a pretty

big image. All right, so let's see

how, how this thing works. So I've made a.

Just to make it a little more crisp I made

this diagram. So if I have an image I can

think of it really as this grid of pixels.

So each pixel is a square and it's just

showing a single color. Now we're gonna

have an addressing scheme to sort of

identify each pixel as opposed to all the

others. So the way that works is that we have a

set of x numbers along the top here. So

zero is the far left and then it goes up,

goes to the right. And then the y-direction is done in sort of a unique way.

So zero is the very top, the top row, and

then the y numbers read down. And that's

just historically how, how things are

numbered in the computer. So I can just do

some simple examples. So for example, the,

the, the upper left pixel is at (0,0). Or

x=0, y=0, I can say. The

pixel one to its right, so this pixel here

is at x=1, y=0. And a

lot of times if I say the coordinate, the

convention is to just say the x number and

then the y number. So I would say, this is

(1,0). And let's say, this pixel over

here. Well, you can kinda read up. It's at

x=4, y=2. Or I could just say (4,2).

Now, in reality, we're not gonna get into

a lot of detail of messing around with

these x-y numbers to identify specific

pixels. You just need to appreciate that

there is this scheme. So even if we

had ten million pixels, any particular

pixel has some x-y number that addresses

digital images work in the computer. So,

here I've got an example - an image of some

yellow flowers and what we're gonna see is

that this looks like sort of an organic

rounded whole thing. In the computer, it's

gonna come down to really just a lot of

little numbers. So, how's that work? So

what I wanna do is focus on this upper

left flower here. You'll see there's a

little green area with a little thing in

the middle. So if I zoom in by a factor of

ten on just that square, it looks like

this. So what you see is that the image is

made of these little square things. So

these are called pixels. So each pixel is

square. They're quite small, so, you know,

there's not an exact number for it but

maybe 100 pixels per inch. And each pixel

shows just a single color, so it's just

locked as the square of a single color.

And what's funny is if you, you look at it

here it looks kind of. Very artificial and

hard edged, but because the pixel is so

small when you look at it here in the

original image, you know just, it just

looks right. The eye doesn't, the pixels

are small enough that you don't see those little

hard edges. So this is what an image looks

like when you sort of zoom in and see the

parts. If you want to think about how many

pixels there are in an image, it's just a

question of multiplication. So if I had an

image that was 800 pixels wide by 600

pixels high it's just a question of

multiplying. So I multiply those two, and

that's 480,000 pixels. You may have heard

the term megapixel. Is commonly used for

computers and cameras and things. So, a

megapixel is a million pixels. So, my

800x600 image, 480,000. Well, that's about

half a megapixel, roughly speaking.

So that's not a very big

image, by modern standards. A digital

camera today, even on a phone usually

would produce an image on the order of

five megapixels, ten megapixels, maybe

twenty megapixels. That would be a pretty

big image. All right, so let's see

how, how this thing works. So I've made a.

Just to make it a little more crisp I made

this diagram. So if I have an image I can

think of it really as this grid of pixels.

So each pixel is a square and it's just

showing a single color. Now we're gonna

have an addressing scheme to sort of

identify each pixel as opposed to all the

others. So the way that works is that we have a

set of x numbers along the top here. So

zero is the far left and then it goes up,

goes to the right. And then the y-direction is done in sort of a unique way.

So zero is the very top, the top row, and

then the y numbers read down. And that's

just historically how, how things are

numbered in the computer. So I can just do

some simple examples. So for example, the,

the, the upper left pixel is at (0,0). Or

x=0, y=0, I can say. The

pixel one to its right, so this pixel here

is at x=1, y=0. And a

lot of times if I say the coordinate, the

convention is to just say the x number and

then the y number. So I would say, this is

(1,0). And let's say, this pixel over

here. Well, you can kinda read up. It's at

x=4, y=2. Or I could just say (4,2).

Now, in reality, we're not gonna get into

a lot of detail of messing around with

these x-y numbers to identify specific

pixels. You just need to appreciate that

there is this scheme. So even if we

had ten million pixels, any particular

pixel has some x-y number that addresses

Загрузка...

Выбрать следующее задание

Ты добавил

Выбрать следующее задание

Ты добавил