|
|
|
|
165
|
|
165
|
|
166
|
2. The code that we provide creates the interface in Figure 9.
|
166
|
2. The code that we provide creates the interface in Figure 9.
|
167
|
|
167
|
|
168
|
----
|
|
|
|
|
168
|
+ ---
|
169
|
|
169
|
|
170
|
-![figure9.png](images/figure9.png)
|
|
|
|
|
170
|
+ ![figure9.png](images/figure9.png)
|
171
|
|
171
|
|
172
|
-**Figure 9.** Interface for the `Image Scrambler` project.
|
|
|
|
|
172
|
+ **Figure 9.** Interface for the `Image Scrambler` project.
|
173
|
|
173
|
|
174
|
----
|
|
|
|
|
174
|
+ ---
|
175
|
|
175
|
|
176
|
-The button that says `Scramble Image` is programmed so it invokes a function called `ScramblerFilter`.
|
|
|
|
|
176
|
+ The button that says `Scramble Image` is programmed so it invokes a function called `ScramblerFilter`.
|
177
|
|
177
|
|
178
|
3. Complete the function `ScrambleFIlter` contained in the `Filter.cpp` file so it implements the recursive algorithm to scramble images. The function has the following format:
|
178
|
3. Complete the function `ScrambleFIlter` contained in the `Filter.cpp` file so it implements the recursive algorithm to scramble images. The function has the following format:
|
179
|
|
179
|
|
180
|
- ```cpp
|
|
|
181
|
-QImage ImageScrambler::ScrambleFilter(QImage image, int N, int sx, int sy, int width, int height);
|
|
|
182
|
-```
|
|
|
|
|
180
|
+ `QImage ImageScrambler::ScrambleFilter(QImage image, int N, int sx, int sy, int width, int height);`
|
183
|
|
181
|
|
184
|
4. Download the image in http://i.imgur.com/ZiJ61Gk.png so you can validate the function you implemented.
|
182
|
4. Download the image in http://i.imgur.com/ZiJ61Gk.png so you can validate the function you implemented.
|
185
|
|
183
|
|