how can i change this error
Afficher commentaires plus anciens
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 commentaires
efeherres
le 3 Jan 2022
Stephen23
le 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
le 3 Jan 2022
Image Analyst
le 3 Jan 2022
For that, see my second answer below: Click here to scroll down and see it
Réponse acceptée
Plus de réponses (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
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

