freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于稀疏表示的單幀圖像超分辨率研究-資料下載頁

2025-06-27 21:12本頁面
  

【正文】 迭代去恢復(fù)低分辨率圖像,具體方法為:提供一個標(biāo)準(zhǔn),不停的迭代低分辨圖像,如果圖像的頻率越來越接近原始的圖像,則跳出循環(huán),迭代結(jié)束for ii = 1:length(gridx), for jj = 1:length(gridy), t = t+1。 xx = gridx(ii)。 yy = gridy(jj)。 mPatch = mIm(yy:yy+patch_size1, xx:xx+patch_size1)。 mMean = mean(mPatch(:))。 mPatch = mPatch(:) mMean。 mNorm = sqrt(sum(mPatch.^2))。 mPatchFea = lImfea(yy:yy+patch_size1, xx:xx+patch_size1, :)。 mPatchFea = mPatchFea(:)。 mfNorm = sqrt(sum(mPatchFea.^2))。 if mfNorm 1, y = mPatchFea./mfNorm。 else y = mPatchFea。 end b = Dl39。*y。 % sparse recovery w = L1QP_FeatureSign_yang(lambda, A, b)。 % generate the high resolution patch and scale the contrast hPatch = Dh*w。 hPatch = lin_scale(hPatch, mNorm)。 hPatch = reshape(hPatch, [patch_size, patch_size])。 hPatch = hPatch + mMean。 hIm(yy:yy+patch_size1, xx:xx+patch_size1) = hIm(yy:yy+patch_size1, xx:xx+patch_size1) + hPatch。 tMat(yy:yy+patch_size1, xx:xx+patch_size1) = tMat(yy:yy+patch_size1, xx:xx+patch_size1) + 1。 endend% idx = (tMat 1)。hIm(idx) = mIm(idx)。tMat(idx) = 1。hIm = hIm./tMat。hIm = uint8(hIm)。% =========================================================================%功能:加載輸入文件,按照訓(xùn)練字典的設(shè)置一些參數(shù)。%給出了稀疏表示和雙三次插值的具體實現(xiàn)方法,%最后計算了兩種處理圖像方法的PSNR和rmse的數(shù)據(jù),以便比較對照方法的優(yōu)劣% =========================================================================clear all。 clc。% 讀取測試文件im_l = imread(39。C:\Users\Administrator\Desktop\ScSR\Data\Testing\39。)。% 設(shè)置圖像參數(shù)lambda = 。 % 稀疏性正則化overlap = 4。 % 重合度up_scale = 2。 % 系數(shù),取決于訓(xùn)練字典的配置maxIter = 20。 % if 0, do not use backprojection% 加載訓(xùn)練好的字典參數(shù)load(39。C:\Users\Administrator\Desktop\ScSR\Dictionary\39。)。% 改變顏色空間im_l_ycbcr = rgb2ycbcr(im_l)。im_l_y = im_l_ycbcr(:, :, 1)。im_l_cb = im_l_ycbcr(:, :, 2)。im_l_cr = im_l_ycbcr(:, :, 3)。% 基于稀疏表示的圖像超分辨率的算法。其中ScSR函數(shù)為具體的算法實現(xiàn),[im_h_y] = ScSR(im_l_y, 2, Dh, Dl, lambda, overlap)。[im_h_y] = backprojection(im_h_y, im_l_y, maxIter)。% 在雙三次插值法中擴(kuò)大圖像的色度[nrow, ncol] = size(im_h_y)。im_h_cb = imresize(im_l_cb, [nrow, ncol], 39。bicubic39。)。im_h_cr = imresize(im_l_cr, [nrow, ncol], 39。bicubic39。)。im_h_ycbcr = zeros([nrow, ncol, 3])。im_h_ycbcr(:, :, 1) = im_h_y。im_h_ycbcr(:, :, 2) = im_h_cb。im_h_ycbcr(:, :, 3) = im_h_cr。im_h = ycbcr2rgb(uint8(im_h_ycbcr))。% 雙三次插值法的具體實現(xiàn)在imresize函數(shù)中im_b = imresize(im_l, [nrow, ncol], 39。bicubic39。)。% read ground truth imageim = imread(39。C:\Users\Administrator\Desktop\ScSR\Data\Testing\39。)。% 計算PSNRbb_rmse = pute_rmse(im, im_b)。sp_rmse = pute_rmse(im, im_h)。fprintf(39。RMSE for Bicubic Interpolation: %f \n39。, bb_rmse)。fprintf(39。RMSE for Sparse Representation Recovery: %f \n39。, sp_rmse)。bb_psnr = 20*log10(255/bb_rmse)。sp_psnr = 20*log10(255/sp_rmse)。%雙三次插值方法的psnr值fprintf(39。PSNR for Bicubic Interpolation: %f dB\n39。, bb_psnr)。%稀疏表示得psnr值fprintf(39。PSNR for Sparse Representation Recovery: %f dB\n39。, sp_psnr)。% 顯示兩種方法處理后的圖像figure, imshow(im_h)。title(39。Sparse Recovery39。)。figure, imshow(im_b)。title(39。Bicubic Interpolation39。)。
點擊復(fù)制文檔內(nèi)容
語文相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1