成人国产一区二区三-成人国产一区二区三区-成人国产在-成人国产在线-成人国产在线观看-成人国产在线看不卡-成人国产在线一区二区-成人国产中文欧美

SineImage Test Charts logo

Other News

Author:SineImage    Date:2016-11-11   Hits: 1051

While the final arbiter of image quality is the human viewer, efforts have been made to create objective measures of quality. This can be useful for many applications. Many objective measures of quality require the existence of a distortion-free copy of an image, called the reference image, that can be used for comparison with the image whose quality is to be measured. The dimensions of the reference image matrix and the dimensions of the degraded image matrix must be identical.

The Image Processing Toolbox provides several function that can be used to measure quality:

  • psnr — The peak signal-to-noise ratio measure of quality works by first calculating the mean squared error (MSE) and then dividing the maximum range of the data type by the MSE. This measure is simple to calculate but sometimes doesn't align well with perceived quality by humans.

  • ssim — The Structural Similarity (SSIM) Index measure of quality works by measuring the structural similarity that compares local patterns of pixel intensities that have been normalized for luminance and contrast. This quality metric is based on the principle that the human visual system is good for extracting information based on structure.

  • Obtain Local Structural Similarity Index

  • Compare Image Quality at Various Compression Levels

Obtain Local Structural Similarity Index

This example shows how to measure the quality of regions of an image when compared with a reference image. The ssim function calculates the structural similarity index for each pixel in an image, based on its relationship to other pixels in an 11-by-11 neighborhood. The function returns this information in an image that is the same size as the image whose quality is being measured. This local, pixel-by-pixel, quality index can be viewed as an image, with proper scaling.

Read an image to use as the reference image.

ref = imread('pout.tif');

Create an image whose quality is to be measured, by making a copy of the reference image and adding noise. To illustrate local similarity, isolate the noise to half of the image. Display the reference image and the noisy image side-by-side.

A = ref;

A(:,ceil(end/2):end) = imnoise(ref(:,ceil(end/2):end),'salt & pepper', 0.1);

figure, imshowpair(A,ref,'montage')

Calculate the local Structural Similarity Index for the modified image (A), when compared to the reference image (ref). Visualize the local structural similarity index. Note how left side of the image, which is identical to the reference image displays as white because all the local structural similarity values are 1.

[global_sim local_sim] = ssim(A,ref);

figure, imshow(local_sim,[])

Compare Image Quality at Various Compression Levels

This example shows how to test image quality using ssim. The example creates images at various compression levels and then plots the quality metrics. To run this example, you must have write permission in your current folder.

Read image.

I = imread('cameraman.tif');

Write the image to a file using various quality values. The JPEG format supports the ‘Quality' parameter. Use ssim to check the quality of each written image.

ssimValues = zeros(1,10);
qualityFactor = 10:10:100;
for i = 1:10
    
    imwrite(I,'compressedImage.jpg','jpg','quality',qualityFactor(i));
    
    ssimValues(i) = ssim(imread('compressedImage.jpg'),I);
end

Plot the results. Note how the image quality score improves as you increase the quality value specified with imwrite.

plot(qualityFactor,ssimValues,'b-o');

xlabel('Compression Quality Factor');
ylabel('SSIM Value');

Skype

Chat OnlineColor Difference Helper

Phone

+86 755-26508999
24 hours online

Top
主站蜘蛛池模板: 国产激情з | 国产精品乱 | 欧美日韩亚洲国 | 91天堂一区二| 国产在线网址 | 精品日韩国产 | 国产日产欧产综合 | 日韩不卡在线观看 | 日本失禁成 | 91香蕉在线视频 | 国产老熟女ass | 91国高清在线播放 | 国产淫脚在线观看 | 日本护士喷水 | 青草影视 | 日韩国产自产拍a | 欧美日韩在线亚洲 | 国产最新三级 | 午夜三级中文不 | 91精品在线播 | 日本最新在线观 | 日韩国产色色色色 | 欧美综合国产 | 乱伦性爱网 | 国产盗摄在线观看 | 日本在线干 | 国产亚洲日 | 日本亚洲视 | 日韩精品在线 | 欧美在线观看综合 | 国外精品 | 精品国产柚木在线 | 福利社91 | 精新精新国产自在现 | 国产A∨| 国产综合a| 三级国产| 午夜小视频网 | 欧美午夜福利第一区 | 不卡一区在线播放 | 日本成人xxx在线 |