フィルターのクリア

Image super resolution enhancement

2 ビュー (過去 30 日間)
Meena s
Meena s 2016 年 4 月 13 日
回答済み: Image Analyst 2016 年 4 月 13 日
close all;
clear all;
I=imread('1.jpeg')
I2 = im2double(I)
I2 = im2double(I,'indexed')
figure,imshow(I);
av=fspecial('average',[2 2]);
avimg=filter2(av,I2);
I1=avimg(1:2:end,1:2:end);
figure,imshow(uint8(I1));
But I am getting this error sir
Undefined function 'conv2' for input arguments of type 'double' and attributes 'full 3d real'.
Error in filter2 (line 59)
y = conv2(hcol, hrow, x, shape);
avimg=filter2(av,I2);

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 4 月 13 日
JPEG images are never ever indexed images, so your second im2double() is wrong.
They are, however, almost always RGB images, so they are 3D arrays. And conv2 is not defined for 3D arrays. You can conv2 one color pane at a time though.

Image Analyst
Image Analyst 2016 年 4 月 13 日
Try imfilter() instead. It can filter color images.

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by