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 image

thanks.

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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -