Rainbow fileter
2017-08-01 本文已影响15人
小慷
2017-08-01(二) 蓋樓[225]
Rainbow fileter
1.卡點:怎麼在Y方向,做分割,然後在每一等份中,做出紅橙黃綠藍靛紫的區別,並且向X方向展開,我在Conditional Execution 的 4:49找到概念,然後這裡,先不貪多,只先實驗紅色(1/7 塊),看可不可以成功,之後再展開。
- Start with the image you want to change.
- Figure out the width of the image.
- For each pixel in the image:
Get the x-coordinate for that pixel
If the pixel’s x-coordinate is less than one-third of the image’s width, set the pixel’s red value to 255.
If the pixel’s x-coordinate is between one-third and two-thirds of the image’s width, set the pixel’s green value to 255.
If the pixel’s x-coordinate is more than two-thirds of the image’s width, set the pixel’s blue value to 255.
- Print the image.
2.如果成功展開,就把miniproject-challenge 提供的彩虹濾鏡的code
,一一填上。