how can i change this error
이전 댓글 표시
I am expecting a function.
I want to divide an image in grids. In this way the image is divided in 5x6.
cuadrícula means grid (in spanish).
imshow('asteroideHito2.jpg'); %This is the image to divide in 200x200 sections.And its original size is 1200x1000.
title('Imagen de búsqueda');
for i=1:6
for j=1:5
Cuadricula (i*j);
end
end
댓글 수: 5
efeherres
2022년 1월 3일
Stephen23
2022년 1월 3일
"I am expecting a function."
Where did you get Cuadricula from? Did you write it yourself? Or did you it download it or get given it by friend/tutor ?
efeherres
2022년 1월 3일
Image Analyst
2022년 1월 3일
For that, see my second answer below: Click here to scroll down and see it
채택된 답변
추가 답변 (1개)
There is no such function on your search path. Try using xline() and yline() to make a grid in the overlay.
rgbImage = imread('peppers.png');
imshow(rgbImage); %This is the image to divide in 200x200 sections.And its original size is 1200x1000.
axis('on', 'image')
title('Imagen de búsqueda');
[rows, columns, numberOfColorChannels] = size(rgbImage)
for row = 1 : rows/6 : rows
fprintf('Putting line at row %d.\n', row);
yline(row, 'Color', 'y', 'LineWidth', 2);
end
for col = 1 : columns/6 : columns
fprintf('Putting line at row %d.\n', col);
xline(col, 'Color', 'y', 'LineWidth', 2);
end
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

