Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.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 滤波后的Matlab图像归一化_Image_Matlab_Image Processing_Normalization - Fatal编程技术网

Image 滤波后的Matlab图像归一化

Image 滤波后的Matlab图像归一化,image,matlab,image-processing,normalization,Image,Matlab,Image Processing,Normalization,我有下面的代码,我正在尝试在过滤后规范化我的图像,但问题是,一旦它到达第5行,它将everyting更改为0,并返回黑色图像。有什么想法吗 for i=1:10 temp_imag = imag_test1{i}(:,:); t_max = max(max(temp_imag)); t_min = min(min(temp_imag)); temp_imag = (temp_imag-t_min).*double(((new_max-new_m

我有下面的代码,我正在尝试在过滤后规范化我的图像,但问题是,一旦它到达第5行,它将everyting更改为0,并返回黑色图像。有什么想法吗

 for i=1:10     
     temp_imag = imag_test1{i}(:,:);
     t_max = max(max(temp_imag));
     t_min = min(min(temp_imag));
     temp_imag = (temp_imag-t_min).*double(((new_max-new_min)/(t_max-t_min)))+double(new_min);
     imag_test1{i}(:,:) = temp_imag;
 end

您不知道哪些值
new_max
new_min
get,但无论如何,如果在第5行之后每隔一行(
temp_imag=(temp_imag-t_min)。*double((new_max-new_min)/(t_max-t_min))+double(new_min);
)一切都变为零,有几种可能性:


  • imga_test{i}
    1你不知道哪些值
    new_max
    new_min
    get,但无论如何,如果在第5行之后每隔一行(
    temp_imag=(temp_imag-t_min)。*double((new_max-new_min)/(t_max-t_min))+double(new_min);
    
    )一切都变为零,有几种可能性:


  • imga_test{i}
    1我会尝试呈现预v.s.后处理图像:

    figure();
    for i=1:10     
         temp_imag = imag_test1{i}(:,:);
         subplot( 1, 2, 1 ); imshow( temp_imag, [] ); title( 'pre' ); 
         t_max = max(max(temp_imag));
         t_min = min(min(temp_imag));
         temp_imag = (temp_imag-t_min).*double(((new_max-new_min)/(t_max-t_min)))+double(new_min);
         subplot( 1, 2, 2 ); imshow( temp_imag, [] );  title( 'post' );    
         imag_test1{i}(:,:) = temp_imag;
     end
    

    我会尝试呈现预v.s.后处理图像:

    figure();
    for i=1:10     
         temp_imag = imag_test1{i}(:,:);
         subplot( 1, 2, 1 ); imshow( temp_imag, [] ); title( 'pre' ); 
         t_max = max(max(temp_imag));
         t_min = min(min(temp_imag));
         temp_imag = (temp_imag-t_min).*double(((new_max-new_min)/(t_max-t_min)))+double(new_min);
         subplot( 1, 2, 2 ); imshow( temp_imag, [] );  title( 'post' );    
         imag_test1{i}(:,:) = temp_imag;
     end