image - Traversing through pixels -
image - Traversing through pixels -
say have next part of algorithm, provided want implement in matlab:
k = 0; while k<n among pixels "belong to" set, select pixel k = k+1; how can implement?
determining if pixel "belongs to" image or set of imagethanks.
generally, in matlab, image (gray/color) represented 2d/3d matrix
for example,
i = imread("lena.jpg"); so, size of m x n grayness , m x n x 3 color
now if want select pixel "belongs to" subset of image (rectangle) (xi yi) (w h). origin i.e., (1,1) pixel of image top left corner.
isub = i(xi:xi+w-1, yi:yf+h-1); also, can access pixels using pixel = i(i,j); ith pixel top , jth pixel left
if "belongs to" complex pixels reddish or else, approach/complexity vary
image matlab set pixel belongs-to
Comments
Post a Comment