Deblurred the Images using wiener Filter but i need to train the multiple images find their accuracy before training and after training by using Plots

4 ビュー (過去 30 日間)
Deblurred the Images using wiener Filter but i need to train the multiple images find their accuracy before training and after training by using histogram.
Needed source code for Adding image folder then training the dataset and Accuracy after training by using plots.

回答 (1 件)

Drishti
Drishti 2024 年 9 月 24 日
編集済み: Drishti 2024 年 9 月 24 日
Hi Kartikeya,
I understand that you want to utilize the Wiener filter to deblur the image and wants to train on multiple images.
Wiener filter is utilized to improve the quality of image degraded by additive noise and blurring.
In MATLAB, to achieve the similar functionality, you can utilize the ‘wiener2’ function, which is a 2-D adaptive noise-removal filtering technique.
For better understanding, you can refer to the provided implementation of ‘wiener2’ function:
function img = preprocessImageWithWiener(filename)
img = im2double(imread(filename));
img = imresize(img, [128, 128]);
% Apply Wiener filter to each channel individually
for c = 1:size(img, 3)
img(:, :, c) = wiener2(img(:, :, c), [5 5]);
end
end
Furthermore, for training of multiple images, a simple neural network can be created. Refer to the provided example to understand the architecture of a neural network.
layers = [
imageInputLayer([128 128 3])
convolution2dLayer(3, 16, 'Padding', 'same')
reluLayer
convolution2dLayer(3, 32, 'Padding', 'same')
reluLayer
convolution2dLayer(3, 64, 'Padding', 'same')
reluLayer
convolution2dLayer(3, 3, 'Padding', 'same')
regressionLayer
];
% Train the network
net = trainNetwork(trainingData, layers, options);
You can also refer to the MATLAB Documentation of ‘wiener2’ function and ‘trainNetwork’ for creating a neural network.
I hope this helps.

Community Treasure Hunt

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

Start Hunting!

Translated by