1
00:00:01,070 --> 00:00:05,990
Yes, my dear friends, in this lesson, we will learn how to resize an image.

2
00:00:06,620 --> 00:00:08,600
So let's get started.

3
00:00:08,960 --> 00:00:13,580
If you want to do this operation, we need to learn a new function here.

4
00:00:13,970 --> 00:00:16,070
Our new function name is resource.

5
00:00:16,640 --> 00:00:18,710
So let's learn about it now.

6
00:00:19,040 --> 00:00:25,430
Let's move to the project folder and let's create a new Python file and let the Python file name be

7
00:00:25,550 --> 00:00:28,220
resized and let press enter.

8
00:00:28,610 --> 00:00:33,710
And then let's import our CV to module.

9
00:00:34,160 --> 00:00:37,580
And let's move to a new line and let's create our image.

10
00:00:37,670 --> 00:00:44,930
So for this, that's great and you were able here let the variable name be O-M-G and let's call or I

11
00:00:44,930 --> 00:00:51,530
am read function panels, phone or I am git jpg file.

12
00:00:51,920 --> 00:00:56,420
So now how can we resize our image using a new function?

13
00:00:56,450 --> 00:01:01,490
So for this, what we have to do now is to create enumerable here.

14
00:01:01,760 --> 00:01:06,920
Let the variable name before example resizing and let's put an equal sign.

15
00:01:06,920 --> 00:01:09,470
And now let's learn our new function.

16
00:01:09,830 --> 00:01:13,940
So our new function name is the size function.

17
00:01:14,810 --> 00:01:22,100
And also we will open and close parentheses and then we will answer to different parameters of our resize

18
00:01:22,100 --> 00:01:22,760
function.

19
00:01:22,790 --> 00:01:25,910
So the first parameter will be our source metrics.

20
00:01:25,910 --> 00:01:28,470
So our source matrix is IMJ.

21
00:01:28,490 --> 00:01:30,560
So let's right here I am G.

22
00:01:30,860 --> 00:01:34,400
And also the second parameter will be a typo.

23
00:01:34,850 --> 00:01:42,980
And also, we will enter two different value in our top because the first value will be weight and also

24
00:01:42,980 --> 00:01:44,840
the second volume will be hard.

25
00:01:45,200 --> 00:01:49,240
For example, let the first of all you be 100.

26
00:01:49,370 --> 00:01:54,050
Let the second value be, for example, three hundred ninety.

27
00:01:54,560 --> 00:01:57,230
And also if your honor code here.

28
00:01:58,600 --> 00:02:01,750
And as you can see here, we didn't get any error.

29
00:02:02,110 --> 00:02:06,430
So no less display, I am Jim metrics and resizing metrics.

30
00:02:06,850 --> 00:02:08,470
So how can we do that?

31
00:02:08,480 --> 00:02:10,670
As you remember, we should use?

32
00:02:10,690 --> 00:02:12,010
I am sure, function.

33
00:02:12,310 --> 00:02:15,160
So now let's call or I am sure function.

34
00:02:16,240 --> 00:02:19,330
And let the window name be original.

35
00:02:23,800 --> 00:02:27,940
And firstly, let's display the original matrix or source matrix.

36
00:02:27,940 --> 00:02:29,410
Name is I am G.

37
00:02:30,850 --> 00:02:38,650
And also, let's move to a new line and let's call our financial function again, and this time let

38
00:02:38,650 --> 00:02:41,440
the window name be, for example, resizing.

39
00:02:42,640 --> 00:02:45,820
And also, let's display our resizing matrix.

40
00:02:47,110 --> 00:02:47,770
All right.

41
00:02:47,830 --> 00:02:48,670
We are done.

42
00:02:48,760 --> 00:02:54,250
So, no, let's call our Waitaki function, and let's define the value zero.

43
00:02:54,670 --> 00:02:56,770
And now if your honor code.

44
00:02:57,930 --> 00:02:59,520
And as you can see here.

45
00:03:02,020 --> 00:03:02,800
All right.

46
00:03:03,130 --> 00:03:06,700
Yes, right now, I can't move it because the size is small.

47
00:03:06,970 --> 00:03:12,910
Let's come and finish our quote and also let's change to right from here.

48
00:03:13,900 --> 00:03:16,420
Let the weight value be, for example.

49
00:03:16,840 --> 00:03:18,280
250.

50
00:03:18,760 --> 00:03:20,770
And now let's run our code again.

51
00:03:22,070 --> 00:03:30,590
And as you can see here, here is our original image, and here is the resizing image.

52
00:03:32,340 --> 00:03:36,720
So this is the first one, and also this is the last one.

53
00:03:37,140 --> 00:03:40,360
This way we can change the size of an image.

54
00:03:40,380 --> 00:03:44,100
So now let's focus our resize function first.

55
00:03:44,310 --> 00:03:45,720
Let's stop our records.

56
00:03:46,110 --> 00:03:50,220
And as you can see here, we enter two different parameters here.

57
00:03:50,310 --> 00:03:52,650
We assigns our image matrix.

58
00:03:52,650 --> 00:04:00,420
So you see here as the first parameter because we change the size of this image and also the second

59
00:04:00,420 --> 00:04:02,790
parameter you see here.

60
00:04:03,180 --> 00:04:09,330
We create trouble here because it's a default parameter, and therefore we need to change the size of

61
00:04:09,330 --> 00:04:10,620
the image to topple.

62
00:04:10,830 --> 00:04:15,570
All right, my dear friends, in this lesson, we learned how to resize our images.

63
00:04:16,140 --> 00:04:21,300
So now let's move on to our next lesson and learn the basics of image processing better.

