Azzera filtri
Azzera filtri

How can we remove an object from the thermal image?

4 visualizzazioni (ultimi 30 giorni)
i have a series of images. and need to remove an object from the images. to remove the line from the images.. the line in the centere of the image

Risposte (1)

Image Analyst
Image Analyst il 3 Mag 2023
Try this:
rgbImage = imread('60_N1_4.png');
subplot(4, 1, 1);
imshow(rgbImage);
axis('on', 'image')
croppedImage = rgbImage(1:121, 1:641, :);
subplot(4, 1, 2);
imshow(croppedImage);
axis('on', 'image')
grayImage = rgb2gray(croppedImage);
lowThreshold = 0;
highThreshold = 150;
% Interactively and visually set a threshold on a gray scale image.
% https://www.mathworks.com/matlabcentral/fileexchange/29372-thresholding-an-image?s_tid=srchtitle
% [lowThreshold, highThreshold] = threshold(0, 120, grayImage)
binaryImage = grayImage >= lowThreshold & grayImage <= highThreshold;
% Get rid of blobs touching the edge of the image.
binaryImage = imclearborder(binaryImage);
binaryImage = imdilate(binaryImage, true(5));
subplot(4, 1, 3);
imshow(binaryImage);
% Fill in that region.
[r, g, b] = imsplit(croppedImage);
r = regionfill(r, binaryImage);
g = regionfill(g, binaryImage);
b = regionfill(b, binaryImage);
rgbImage2 = cat(3, r, g, b);
subplot(4, 1, 4);
imshow(rgbImage2);

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by