Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 图像细化过程中的未知问题_Image_Matlab_Image Processing - Fatal编程技术网

Image 图像细化过程中的未知问题

Image 图像细化过程中的未知问题,image,matlab,image-processing,Image,Matlab,Image Processing,正如本文()中介绍的,下面的代码应该细化图像(即灰度显著性贴图) 细化功能: function sal = Refinement(y, dim) th_2 = graythresh(y); if dim == 1 sal = y; sal(y<th_2) = 10*(y(y < th_2))/th_2 - 10; sal(y>=th_2) = 10*(y(y >= th_2) - th_2)/(1-th_2); sal = 1 ./ (1

正如本文()中介绍的,下面的代码应该细化图像(即灰度显著性贴图)

细化功能:

function sal = Refinement(y, dim)
th_2 = graythresh(y);
if dim == 1
    sal = y;

    sal(y<th_2) = 10*(y(y < th_2))/th_2 - 10;
    sal(y>=th_2) = 10*(y(y >= th_2) - th_2)/(1-th_2);
    sal = 1 ./ (1 + exp(-sal)) + y;
    sal = normalization(sal, 0);
elseif dim == 2
    [r, c] = size(y);
    y_col = reshape(y,[1 r*c]);
    sal_col = y_col;
    sal_col(y_col<th_2) = 10*(y_col(y_col < th_2))/th_2 - 10;
    sal_col(y_col>=th_2) = 10*(y_col(y_col >= th_2) - th_2)/(1-th_2);
    sal_col = 1 ./ (1 + exp(-sal_col)) + y_col;
    sal = reshape(sal_col, [r c]);
end
end
function matrix = normalization(mat, flag)
 % INPUT : 
 %         flag:  1 denotes that the mat is a 3-d matrix;
 %                0 denotes that the mat is a matrix;
 %         
 if flag ~= 0
dim = size(mat,3);
matrix = mat;
for i = 1:dim
   matrix(:,:,i) = ( mat(:,:,i) - min(min(mat(:,:,i)))) / ( max(max(mat(:,:,i))) - min(min( mat(:,:,i))) + eps);
end
else
     matrix = ( mat - min(min(mat)))/( max(max(mat)) - min(min(mat)) + eps);
end
然而,在应用图像矩阵的函数值后,结果将与细化前的图像保持相同

这是一个概念上的错误还是实现失败了

另外,炼油厂的输入图像(显著性图)如下所示。在细化的显著性贴图中,前景(此图像中的satrfish)应突出(尽可能均匀地变白),背景噪声应去除(尽可能均匀地变黑):


在论文中,他们使用RGB的图像作为起点,您附加的图像是输入还是输出?你想要什么样的行为?这个问题还不清楚。@DavidS,代码的第一部分从输入图像生成一个显著性图(附加图像),细化过程应该会改进显著性图。具体地说,在改进的显著性图中,前景(此图像中的satrfish)应该突出(尽可能均匀地变白),背景噪声应该去除(尽可能均匀地变黑)。在论文中,他们使用RGB图像作为起点,您附加的图像是输入还是输出?你想要什么样的行为?这个问题还不清楚。@DavidS,代码的第一部分从输入图像生成一个显著性图(附加图像),细化过程应该会改进显著性图。具体而言,在细化的显著性贴图中,前景(此图像中的satrfish)应突出(尽可能均匀地变白),背景噪声应去除(尽可能均匀地变黑)。