how can i change this error
Ältere Kommentare anzeigen
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 Kommentare
efeherres
am 3 Jan. 2022
Stephen23
am 3 Jan. 2022
"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
am 3 Jan. 2022
Image Analyst
am 3 Jan. 2022
For that, see my second answer below: Click here to scroll down and see it
Akzeptierte Antwort
Weitere Antworten (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
Kategorien
Mehr zu Graphics Performance finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

