use*_*002 14 matlab image-processing filter noise-reduction
这个问题与我之前在stackoverflow 中的Matlab中的图像处理算法有关,我已经得到了我想要的结果.
但现在我面临另一个问题,并在过程图像中获得一些人工制品.在我的原始图像(600张图像的堆栈)中我看不到任何人工制品,请从指甲看原始图像:

但在我的10个处理结果中,我可以看到这些行:

我真的不知道他们来自哪里?
此外,如果它们属于相机的传感器,为什么我不能在原始图像中看到它们?任何的想法?
编辑:
我添加了@Jonas建议的以下代码.它减少了人工制品,但没有完全去除它们.
%averaging of images
im = D{1}(:,:);
for i = 2:100
im = imadd(im,D{i}(:,:));
end
im = im/100;
imshow(im,[]);
for i=1:100
SD{i}(:,:)=imsubtract(D{i}(:,:),im(:,:))
end
Run Code Online (Sandbox Code Playgroud)
@belisarius已经要求提供更多图像,所以我要从我的手指上传4个图像,散斑图案和4个黑色背景图像(1280x1024):

这是黑色背景:

Dr.*_*ius 13
实际上,您的工件存在于原始图像中,尽管不可见.Mathematica中的代码:
i = Import@"http://i.stack.imgur.com/5hM3u.png"
Run Code Online (Sandbox Code Playgroud)

EntropyFilter[i, 1]
Run Code Online (Sandbox Code Playgroud)

线条很暗,但您可以通过二值化来看到它们的阈值非常低:
Binarize[i, .001]
Run Code Online (Sandbox Code Playgroud)

至于是什么导致他们,我只能推测.我会从相机输出本身开始追踪.此外,您可以发布两个或三个图像"因为它们直接来自相机",以便我们进行一些实验.
您正在使用的相机很可能有一个CMOS芯片.由于它们具有可能具有稍微不同的电子特性的独立列(可能是行)放大器,因此可以使来自一列的信号比另一列更放大.
根据相机的不同,色谱柱强度的这些变化可以保持稳定.在这种情况下,你很幸运:在运行分析之前,拍摄约100张暗影(在镜头上粘贴一些东西),平均它们,然后从每张图像中减去它们.这应该使线条消失.如果线条没有消失(或者有其他线条),请使用Amro提出的后处理方案在二值化后删除线条.
编辑
这是你如何进行背景减法,假设你已经拍摄了100张暗图并将它们存储在一个D包含100个元素的单元格数组中:
% take the mean; convert to double for safety reasons
meanImg = mean( double( cat(3,D{:}) ), 3);
% then you cans subtract the mean from the original (non-dark-frame) image
correctedImage = rawImage - meanImg; %(maybe you need to re-cast the meanImg first)
Run Code Online (Sandbox Code Playgroud)
img = imread('image.png');
SE = strel('line',2,0);
img2 = imdilate(imerode(img,SE),SE);
subplot(121), imshow(img)
subplot(122), imshow(img2)
Run Code Online (Sandbox Code Playgroud)

使用的结构元素是:
>> SE.getnhood
ans =
1 1 1
Run Code Online (Sandbox Code Playgroud)
这是一个答案,在意见中将比上述方法更温和地删除线条:
im = imread('image.png'); % Original image
imFiltered = im; % The filtered image will end up here
imChanged = false(size(im));% To document the filter performance
% 1)
% Compute the histgrams for each column in the lower part of the image
% (where the columns are most clear) and compute the mean and std each
% bin in the histogram.
histograms = hist(double(im(501:520,:)),0:255);
colMean = mean(histograms,2);
colStd = std(histograms,0,2);
% 2)
% Now loop though each gray level above zero and...
for grayLevel = 1:255
% Find the columns where the number of 'graylevel' pixels is larger than
% mean_n_graylevel + 3*std_n_graylevel). - That is columns that contains
% statistically 'many' pixel with the current 'graylevel'.
lineColumns = find(histograms(grayLevel+1,:)>colMean(grayLevel+1)+3*colStd(grayLevel+1));
% Now remove all graylevel pixels in lineColumns in the original image
if(~isempty(lineColumns))
for col = lineColumns
imFiltered(:,col) = im(:,col).*uint8(~(im(:,col)==grayLevel));
imChanged(:,col) = im(:,col)==grayLevel;
end
end
end
imshow(imChanged)
figure,imshow(imFiltered)
Run Code Online (Sandbox Code Playgroud)
这是过滤后的图像

这显示了受滤波器影响的像素
