Prev: photomosaic
Next: Fill with custom random
From: kk KKsingh on 7 Jul 2010 12:31 "david carollo" <xdavecx(a)gmail.com> wrote in message <i124q7$dhv$1(a)fred.mathworks.com>... > ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <7fef4da0-1e2d-427d-a61d-7cc3078e6c3c(a)i31g2000yqm.googlegroups.com>... > > I think Walter's answer would be the same. > > Maybe you can post two images and say what kind of number you'd like > > to get and how that might be determined, as there are hundreds of > > ways. > > > Ok, you can view here: > http://drop.io/etjwikf > if it want a pw:m9j5hgdctq > > > Thank u! When i handle two same images ! one is formed by intepolation and one is the original one! I just Subtract two matrix to show residuals
From: Image Analyst on 7 Jul 2010 12:40
After looking at your images, I suggest you start with the PSNR and see if that gives you the answers you want. Here's a demo for you: (IMPORTANT: YOU MAY HAVE TO JOIN ANY LINES THAT THE NEWSREADER SPLITS INTO TWO). % function test % Demo to calculate PSNR of a gray scale image. % http://en.wikipedia.org/wiki/PSNR % by ImageAnalyst clc; close all; clear all; workspace; % Read in standard MATLAB demo image. grayImage = imread('cameraman.tif'); [rows columns] = size(grayImage); subplot(2, 2, 1); imshow(grayImage, []); title('Original Grey Scale Image'); set(gcf, 'Position', get(0,'Screensize')); % Maximize figure. % Add noise to it. noisyImage = imnoise(grayImage, 'gaussian', 0, 0.003); subplot(2, 2, 2); imshow(noisyImage, []); title('Noisy Image'); % Calculate mean square error. mseImage = (double(grayImage) - double(noisyImage)) .^ 2; subplot(2, 2, 3); imshow(mseImage, []); title('MSE Image'); mse = sum(sum(mseImage)) / (rows * columns); % Calculate PSNR (Peak Signal to noise ratio). PSNR = 10 * log10( 256^2 / mse); message = sprintf('The mean square error is %.2f\nThe PSNR = %.2f', ... mse, PSNR); msgbox(message); |