Image Reconstruction using Radial Basis Function?

4 vues (au cours des 30 derniers jours)
Rimsha Maryam
Rimsha Maryam le 29 Déc 2020
Réponse apportée : Sindar le 29 Déc 2020
I am working on a project, Reconstruction of damaged Images using Radial Basis Function, and I don’t have any prior experience in image processing. I have didvided the process in these steps:
1. Introducing the Gaussian noise to a standard test image
2. Identify the destructed pixels. (zero value pixels)
3. Define a 5x5 window around that pixel.
4. Using the values of 5x5 neighboring pixels, form a system of linear equations and use LU factorization to find the value and write that value in the place of destructed pixel.
I have done first two steps, now I can’t figure out how to define 5x5 window around that pixel and then replace the value.
Kindly guide me here. Any algorithm, even barely related to this problem (just to give me an idea), would be appreciated. Thank you.

Réponses (1)

Sindar
Sindar le 29 Déc 2020
Some ideas for figuring out patches:
% load an example (color) image
corn_rgb = imread('corn.tif',2);
% get pixel rows, pixel columns, color channels (3)
imsize = size(corn_rgb);
% display image
imshow(corn_rgb)
% set up a new image to manipulate
corn_rgb2 = corn_rgb;
% "Identify" the destructed pixels
idx_bad = [500 13506];
% define extent of patch. Yours is 2 (pixel + 2 in each direction = 5x5), but 20 is more visible
patch_n = 20;
for ind=idx_bad
% find row and column from linear index
[row,col] = ind2sub(imsize(1:2),ind);
% compute patch rows and cols
patch_rows = row + [-patch_n:patch_n];
patch_cols = col + [-patch_n:patch_n];
% make sure you don't go off the edges
patch_rows(patch_rows<1 | patch_rows>imsize(1)) = [];
patch_cols(patch_cols<1 | patch_rows>imsize(2)) = [];
% Do something. Here, I make the patches white
corn_rgb2(patch_rows,patch_cols,:) = 255;
end
imshow(corn_rgb2)

Community Treasure Hunt

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

Start Hunting!

Translated by