Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Masquer les espaces
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Styles de texte
Modifier l’apparence
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Singular vector decomposition and low rank approximation application for image compression
Créé
il y a 8 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
20 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
37 lignes
Copier tout
7 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
23 lignes
Copier tout
Copier
Copié
Copier
Copié
function C=compressimage
(k)
function C=compressimage
2
(k)
A=imread('/home/phung/Pictures/einstein.jpg');
A=imread('/home/phung/Pictures/einstein.jpg');
B=A(:,:,1);
B=A(:,:,1);
B=im2double(B);
B=im2double(B);
% imshow(B);
% imshow(B);
Copier
Copié
Copier
Copié
[U,S,V]=svd(B);
sigma = B' * B;
[m,n]=size(S);
n=min(m,n);
% plot([1:n,diag(S),'.');
% axis([-10,n+1,0,300]);
% hold on
C=diag(S)';
for i=k+1:n
Copier
Copié
Copier
Copié
S(i,i)=0
;
[U,S,V]=svd(sigma)
;
Copier
Copié
Copier
Copié
end
UR = U(:,1:k);
Copier
Copié
Copier
Copié
B=U*S*V'
;
Breduced = B *UR
;
Copier
Copié
Copier
Copié
imshow(B)
;
Breconstructed = Breduced * UR'
;
Copier
Copié
Copier
Copié
C=C'
;
imshow(Breconstructed)
;
end
end
Différences enregistrées
Texte d'origine
Ouvrir un fichier
function C=compressimage(k) A=imread('/home/phung/Pictures/einstein.jpg'); B=A(:,:,1); B=im2double(B); % imshow(B); [U,S,V]=svd(B); [m,n]=size(S); n=min(m,n); % plot([1:n,diag(S),'.'); % axis([-10,n+1,0,300]); % hold on C=diag(S)'; for i=k+1:n S(i,i)=0; end B=U*S*V'; imshow(B); C=C'; end
Texte modifié
Ouvrir un fichier
function C=compressimage2(k) A=imread('/home/phung/Pictures/einstein.jpg'); B=A(:,:,1); B=im2double(B); % imshow(B); sigma = B' * B; [U,S,V]=svd(sigma); UR = U(:,1:k); Breduced = B *UR; Breconstructed = Breduced * UR' ; imshow(Breconstructed); end
Trouver la différence