fool
from PIL import Image img = Image.open("D:\\pic2\\CZA3302.png")
(w,h) = img.size
im=img.convert("RGB") for i in xrange(w):
for j in xrange(h):
pos=(i,j)
rgb = im.getpixel(pos) if rgb == (186, 197, 217):
im.putpixel((i,j),(255,255,255))
if rgb == (180, 192, 213):
im.putpixel((i,j),(255,255,255))
if rgb == (168, 183, 207):
im.putpixel((i,j),(255,255,255))
if rgb == (230, 237, 241):
im.putpixel((i,j),(255,255,255))
if rgb == (155, 182, 201):
im.putpixel((i,j),(255,255,255))
if rgb == (216, 227, 235):
im.putpixel((i,j),(255,255,255))
if rgb == (247, 247, 247):
im.putpixel((i,j),(255,255,255))
if rgb == (239, 244, 247):
im.putpixel((i,j),(255,255,255)) if rgb == (238, 241, 245):
im.putpixel((i,j),(255,255,255))
if rgb == (248, 250, 252):
im.putpixel((i,j),(255,255,255))
if rgb == (192, 193, 223):
im.putpixel((i,j),(255,255,255))
if rgb == (174, 187, 210):
im.putpixel((i,j),(255,255,255))
if rgb == (209, 216, 229):
im.putpixel((i,j),(255,255,255))
if rgb == (190, 207, 221):
im.putpixel((i,j),(255,255,255))
if rgb == (156, 183, 203):
im.putpixel((i,j),(255,255,255))
if rgb == (212, 223, 232):
im.putpixel((i,j),(255,255,255)) if rgb == (197, 207, 223):
im.putpixel((i,j),(255,255,255))
if rgb == (222, 222, 239):
im.putpixel((i,j),(255,255,255))
if rgb == (222, 231, 238):
im.putpixel((i,j),(255,255,255))
if rgb == (196, 212, 223):
im.putpixel((i,j),(255,255,255))
if rgb == (233, 240, 246):
im.putpixel((i,j),(255,255,255)) im.save('D:\\Python27\\6.png')
fool的更多相关文章
- 【CF802L】Send the Fool Further! (hard) 高斯消元
[CF802L]Send the Fool Further! (hard) 题意:给你一棵n个节点的树,每条边有长度,从1号点开始,每次随机选择一个相邻的点走,走到一个叶子时就停止,问期望走的总路程. ...
- 2015·Fool's Day·NND
本博文没有主旨,仅仅是记录. ============================ Date:2015/4/1 - April Fool's Day! Addr:ZhongHai ======== ...
- The fool doth think he is wise, but the wise man knows himself to be a fool.
The fool doth think he is wise, but the wise man knows himself to be a fool.愚者总自以为聪明,智者则有自知之明.
- Codeforces Round #594 (Div. 1) A. Ivan the Fool and the Probability Theory 动态规划
A. Ivan the Fool and the Probability Theory Recently Ivan the Fool decided to become smarter and stu ...
- DeepFool: a simple and accurate method to fool deep neural networks
目录 概 主要内容 二分类模型 为线性 为一般二分类 多分类问题 仿射 为一般多分类 Moosavidezfooli S, Fawzi A, Frossard P, et al. DeepFool: ...
- Codeforces 802L Send the Fool Further! (hard)
Description 题面 题目大意:求从根节点出发,每次随机走一个相邻的点,问走到任意一个叶子节点经过的路径长度的期望(走到就停止) Solution 树上高斯消元,复杂度是 \(O(n)\) 的 ...
- 【树形DP】codeforces K. Send the Fool Further! (medium)
http://codeforces.com/contest/802/problem/K [题意] 给定一棵树,Heidi从根结点0出发沿着边走,每个结点最多经过k次,求这棵树的最大花费是多少(同一条边 ...
- CF1239A Ivan the Fool and the Probability Theory
思路: 可以转化为“strip”(http://tech-queries.blogspot.com/2011/07/fit-12-dominos-in-2n-strip.html)问题.参考了http ...
- CF C.Ivan the Fool and the Probability Theory【思维·构造】
题目传送门 题目大意: 一个$n*m$的网格图,每个格子可以染黑色.白色,问每个格子最多有一个相邻格子颜色相同的涂色方案数$n,m<=1e5$ 分析: 首先,考虑到如果有两个相邻的格子颜色相同, ...
随机推荐
- uri和url的简单理解
URL:统一资源定位符 也就是网址 例如 http://www.microsoft.com/ URI:通用资源标志符 http://www.acme.com/support/suppliers.htm
- Frame URl
http://www.zi-han.net/theme/hplus/?v=4.1 http://webapplayers.com/inspinia_admin-v2.5/ http://baijuny ...
- C# ADO.NET (sql语句连接方式)(查询)
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- 利用jQuery内置的data()方法存储数据
jQuery提供了内置的data()方法,与DOM元素不同的是,它可以用来存储key/value类型的数据.数据的存储是很容易的: $('#myDiv').data('currentState', ' ...
- Java入门记(五):容器关系的梳理(下)——Map
注意:阅读本文及相关源码时,需要数据结构相关知识,包括:哈希表.链表.红黑树. Map是将键(key)映射到值(value)的对象.不同的映射不能包含相同的键:每个键最多只能映射到一个值.下图是常见M ...
- HTML DOM Element
HTML DOM Element(元素) 文档本身是文档节点 . 所有 HTML 元素是元素节点 . 所有 HTML 属性是属性节点 HTML 元素内的文本是文本节点 . 注释是注释节点 . NODE ...
- Peterson算法
#define FALSE 0 #define TRUE 1 #define N 2 /*进程数量 */ int turn; /* 现在轮到谁 */ int interested[N]; /*所有值初 ...
- 我的第一个web应用开发搭建-环境配置
MyEclipse 2014 破解图文详细教程 MyEclipse作为Java EE最受欢迎的IDE,最新版本为2014版,MyEclipse 2014破解的方法. 一.安装完成MyEclipse20 ...
- 驱动学习---PAE--virtual address to physics address
PAE是Physical Address Extension的缩写,即物理地址扩展.简单来说,就是把IA-32处理器的寻址能力从原来的4GB扩展到64GB.寻址4GB空间,要求物理地址的宽度为32位. ...
- machine leanring 笔记 octave命令笔记
来源于coursea 的公开课 A*B 一般意义的矩阵相乘 A.*B矩阵各位相乘 A.^2 A矩阵的每个数平方 1./A 对A矩阵的各位取倒 .表示对每一项都如此操作 log (A) exp(A) ...