Rainbow fileter

2017-08-01(二) 蓋樓[225]

Rainbow fileter

1.卡點:怎麼在Y方向,做分割,然後在每一等份中,做出紅橙黃綠藍靛紫的區別,並且向X方向展開,我在Conditional Execution 的 4:49找到概念,然後這裡,先不貪多,只先實驗紅色(1/7 塊),看可不可以成功,之後再展開。

  1. Start with the image you want to change.
  1. Figure out the width of the image.
  1. 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.

  1. Print the image.

2.如果成功展開,就把miniproject-challenge 提供的彩虹濾鏡的code
,一一填上。

4.
結果圖
結果圖
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容