- ‘wiener2’: https://www.mathworks.com/help/releases/R2024a/images/ref/wiener2.html
- ‘trainNetwork’: https://www.mathworks.com/help/releases/R2024a/deeplearning/ref/trainnetwork.html
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.
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!