Plotting parallel line using the for-loop

Good day to all the good members of this community. I like to solicit your help on this problem. I am new to matlab and I am trying to plot multiple parallel line across an image.
I have an image which is 300 X 300 in size and the Blocksize( BS) is 100 and I have divided this image into 9 blocks using the MAT2CELL function and all I am trying to do now is plot parallel lines over the image to visualize the areas of the image that fall under a particular block. Here is code I wrote
ImgBlks = mat2cell(IS, BlkSize, BlkSize); %this divided my image into 9 blocks.
imshow(IS);
BS = 100;
K = 1;
N = 300;
hold on
for j = 0:100:c
if j<1
j = 1;
end
T1 = [K,j];
T2 = [N,j];
plot(T1,T2)
end
hold off
this code is not giving me the desired result. I have tried to store the results in a vector by doing something like T1(j) = [K, j]; but it is giving me an error of dimentional mismatch. I would appreciate if anyone out there could help me overcome this problem. Thanks for your anticipated help.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning for Image Processing에 대해 자세히 알아보기

질문:

2012년 5월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by