가져온 컬러 그림을 그레이 스케일로 변환하려고합니다.Mathematica 그림 가져 오기 그레이 스케일 오류
SetDirectory[NotebookDirectory[]]
testimage = Import["test.jpg"]
matrixpic = getMatrix[testimage]
matrixpic = getMatrix[testimage]
greypic =
Graphics[
Raster[
matrixpic, {{0, 0}, {sizeX[matrixpic], sizeY[matrixpic]}}, {0,
255}, ColorFunction -> (GrayLevel[#[[1]]*0.3 + #[[2]]*0.5 + #[[
3]]*0.2] &)
],
ImageSize -> {sizeX[matrixpic], sizeY[matrixpic]},
AspectRation -> Automatic
]
Show[greypic]
'ColorConvert [testimage, "Grayscale"]'의 문제점은 무엇입니까? –
볼 수있는 값을 지정 하시겠습니까? –