This is my ERROR. My image dimension is about 667*535. But in error it replaces x values with y and y values with x. I don't know why it is replace x and y values
Attempted to access RGB(548,493,1); index out of bounds because size(RGB)=[535,667,3].
Error in connect (line 109) red(j)=RGB(x,y,j);