Effacer les filtres
Effacer les filtres

Why am I getting a dimension error

2 vues (au cours des 30 derniers jours)
Tezel
Tezel le 22 Avr 2013
??? Error using ==> cat CAT arguments dimensions are not consistent.
Here is the picture I am supposed to split in 3 parts which i have done
now I want to align it but whenever I try I get the error message above
This is how I initially divided my images
figure(1);
b = imread('cw2.jpg');
imshow(b)
[rmax, cmax] = size(b)
part1 = b(1:341, 1:396);
imshow(part1)
part2 = b(341:683, 1:396);
imshow(part2)
part3 = b(683:1024, 1:396);
imshow(part3)
Apparently I am supposed to get the images to the exact size or I will get this error
but whenever I try and get the images to the exact size using decimal points such as 341.33333333333333 or 682.66666666666667, I get a warning message saying
basically i found the size of the picture using this
[rmax, cmax] = size(b)
rmax =
1024
cmax =
396
so I want 396 to stay
but I want to split the image 3 times from x axis to i divide 1024
  1 commentaire
Walter Roberson
Walter Roberson le 22 Avr 2013
You cannot select down to anything smaller than 1 pixel, so make all of them 341.
For the dimension error, we need to see your cat()

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by