File size: 2,832 Bytes
17e2002
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
1
00:00:01,230 --> 00:00:03,030
So we're going to take a look into technique.

2
00:00:03,050 --> 00:00:08,320
Another technique for resizing I should say color image permitting and what it is it's shrinking or

3
00:00:08,320 --> 00:00:12,280
enlarging multiple copies of an image as we can see right here.

4
00:00:12,280 --> 00:00:13,230
And what are those.

5
00:00:13,240 --> 00:00:19,420
It basically allows us to create multiple scales of an image several scales several versions in fact

6
00:00:19,930 --> 00:00:24,910
and that's quite useful in Object reduction when you want to be rosily in two different scales of an

7
00:00:24,910 --> 00:00:26,120
object.

8
00:00:26,170 --> 00:00:27,220
So that's good.

9
00:00:27,220 --> 00:00:33,670
Implementing this in our code so the code implementing image Burman's is actually quite simple and the

10
00:00:33,670 --> 00:00:38,730
bulk of the work is just done in this function here which is by down and pie or.

11
00:00:38,760 --> 00:00:40,420
I should say up.

12
00:00:40,960 --> 00:00:46,420
So what's happening here is that we lower the input image and Paradorn actually converges in this image

13
00:00:46,720 --> 00:00:53,590
to an image just half its size of 50 percent the original dimensions and vice versa pick up actually

14
00:00:53,590 --> 00:00:56,830
takes his image and Brink's makes it twice its size.

15
00:00:56,830 --> 00:01:02,410
So what's going to happen if we put smaller into a pie or pick up function is what we're going to get

16
00:01:02,410 --> 00:01:07,980
back an image that is exactly the same dimensions as the original image but you will see a key difference

17
00:01:07,990 --> 00:01:09,320
when I run this code.

18
00:01:11,280 --> 00:01:18,140
So here's a small image of it as we expected it's 50 percent smaller.

19
00:01:18,200 --> 00:01:21,000
However when we run this small the image it's a larger image.

20
00:01:21,020 --> 00:01:26,540
You may be able to see in the video here once a stream is good quality but it actually is quite blurry.

21
00:01:26,630 --> 00:01:30,080
And that's because we're obscuring a smaller image here.

22
00:01:30,080 --> 00:01:34,700
So that shows you how resizing when resizing images you actually tend to lose qualities and be careful

23
00:01:34,700 --> 00:01:36,270
with that sometimes.

24
00:01:37,550 --> 00:01:39,910
Case that's good for image permitting.

25
00:01:40,220 --> 00:01:45,710
If you ever wanted to create multiple copies of a small image you can actually put this into a loop

26
00:01:45,830 --> 00:01:50,900
like a for loop or while loop and maybe just run it a few times and it keeps generating smaller and

27
00:01:50,900 --> 00:01:51,980
smaller images.