Bootstrap

MATLAB---获取图像中的指定像素点的值(RGB图像)

输入
clear all;
RGB = imread(‘图片名.格式’);
r = [x1 y1 z1];%指定像素点的横坐标
c= [x2 y2 z2];%指定像素点的纵坐标
p = impixel(RGB,r,c)%用impixel()函数来返回RGB图像的横纵坐标对应的像素点的值
输出:
p =
a b c
d e f
g h i

;