Remove black background in a translated png plot
    6 views (last 30 days)
  
       Show older comments
    
    Gabriele Dominioni
 on 22 May 2024
  
    
    
    
    
    Commented: Gabriele Dominioni
 on 26 May 2024
            
As in this picture, when i translate a png in a plot i get a black backgroung where the plot is not filled with the png. how can i set the color to white instead of black?
1 Comment
  Les Beckham
      
 on 22 May 2024
				How did you translate the image?  Show the code you used, or describe the GUI plot interaction that resulted in the undesired result.  That should help in narrowing down to a possible solution.
Accepted Answer
  Kevin Holly
    
 on 22 May 2024
        I = imread("cameraman.tif");
imshow(I)
title("Original Image")
J = imtranslate(I,[15, 25],'FillValues',255); %Add Fill Values here
imshow(J)
title("Translated Image")
J = imtranslate(I,[15, 25]); % Without it Fill Values
imshow(J)
title("Translated Image")
More Answers (0)
See Also
Categories
				Find more on Image Filtering and Enhancement in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




