Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
I want to turn an image from its original RGB scale to grayscale and deuteranomaly. However, every attempt I try gives me somewhat darker image that does not truly display grayscale.My attempt for grayscale here is what im running
whe = imread('CoWheel.png'); whesi = size(whe); red = []; gree = []; blue = []; for i = 1:whesi(1) for j = 1:whesi(2) red(i,j) = whe(i,j,1); gree(i,j) = whe(i,j,2); blue(i,j) = whe(i,j,3); end end gray = whe; for i = 1:whesi(1) for j = 1:whesi(2) gray(i,j,1) = gray(i,j,1)*.2989; gray(i,j,2) = gray(i,j,2)*.5870; gray(i,j,3) = gray(i,j,3)*.1141; end And as for the deuteranomaly, I would have no clue into what to do to make that. Any help would be appreciated. more... |
![]() |
![]() |