|
SOLUTIONS
|
MATHEMATICA 内置符号
PixelValue[image, {x, y}]
给出坐标
处的像素值 image.
PixelValue[image, {xmin;;xmax, ymin;;ymax}]
给出像素值,其中坐标范围在
到
.
PixelValue[image, {x, y}, "type"]
给出转化为指定类型的像素值.
更多信息更多信息
- 在 PixelValue[image, {x, y}] 中,对于宽为 w 高为 h 的一个图像,x 的值位于从
到 w+0.5 的范围内,y 的值位于从
到 h+0.5 的范围内. - 整数坐标对应于像素的中心. 坐标
表示左下角的像素中心. - 在三维空间中,像素坐标
对应于左下角前端像素的中心. - 在 PixelValue[image, {xp, yp}] 中,位置
对应于点
,假定位于标准图像坐标系统,其中 x 的值位于从 0 到 width 的范围内,而 y 位于从 0 到 height 的范围内. 像素位置
表示在左下角的像素中心. - PixelValue 给出与
最接近的像素值. - PixelValue 给出与
最接近的像素值,除了当
位于像素之间的边界上时,返回的是
周围的像素平均值. - 使用 ImageValue 来提取图像坐标中
处的插值,其中 x 位于从 0 到 width 的范围内,而 y 位于从 0 到 height 的范围内. 位置
对应于图像的左下角. - PixelValue[image, {{x1, y1}, ...}] 可用于获取多个位置的像素值.
- PixelValue[image, {x, y}] 默认情况下,返回位于0和1之间的值. 使用PixelValue[image, {x, y}, "type"],返回的像素值位于由
指定的范围内. 参见 Image 的参考页面,以获取所有可能数据类型的列表. - PixelValue[image, {x, y}, Automatic] 等价于 PixelValue[image, {x, y}, ImageType[image]].
- PixelValue 可以采用 Padding 选项,该选项当一个指定的坐标位于图像之外时使用.
版本 8 的新功能 | 版本 9 修改功能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
