Undefined function 'dyaddown' for input arguments of type 'uint8'.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alexander De-Ville
le 7 Avr 2015
Commenté : Image Analyst
le 9 Avr 2015
Getting the error:
Undefined function 'dyaddown' for input arguments of type 'uint8'.
Code is:
%Clear command window.
clc;
%Clear workspace.
clear;
%Load the Lena file.
RGB = imread ('Lena.tiff');
%Display the result of the conversion.
figure, imshow(RGB);
%Convert RGB image to YCbCr Components.
YCbCr = rgb2ycbcr(RGB);
%Isolate Y.
Y = YCbCr(:,:,1);
%Isolate Cb.
Cb = YCbCr(:,:,2);
%Isolate Cr.
Cr= YCbCr(:,:,3);
%downsample
dem = dyaddown(Cb,1,'m') % Downsample rows and columns
% with odd indices.
Why is this? How to I fix it?
Many thanks.
0 commentaires
Réponse acceptée
Image Analyst
le 7 Avr 2015
I've never heard of dyaddown(). If you want to subsample Cb to get only the odd indexes and end up with an image 1/4 as big, do this:
dem = Cb(1:2:end, 1:2:end); % Extract only odd indexes.
For even indices, do this:
dem = Cb(2:2:end, 2:2:end); % Extract only even indexes.
6 commentaires
Image Analyst
le 9 Avr 2015
You can use imresize() to specify the size of the output image you'd rather have.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Signal Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!