write module: rgb to binary, add noise to picture