superimose of two images
1 次查看(过去 30 天)
显示 更早的评论
@image analyst u have provided me the code how to superimpose and it was very help full but I have another image and I am not able to that can u help me out
I am providing u code as well as my images
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168328/image.jpeg)
my 1st image in which i want to put that blank line on to my 2nd image
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168332/image.jpeg)
my 2nd image
0 个评论
回答(1 个)
Walter Roberson
2017-12-31
Remember that in images, white is data present. When you superimpose the large amounts of white from the top image on top of the grid on the bottom, then almost everything is going to turn white, leaving you with only a few dots where the curved line from the first happens to intersect the grid.
You may wish to consider converting to black and white, then inverting the image so that the black becomes true, doing a logical or of the two, then inverting again.
2 个评论
Walter Roberson
2018-1-1
No, you do not have to do that: that is just a typical way of thinking about doing the addition of images.
In your particular case, you could instead AND the two images in their present form:
combine_image = FirstMatrix & SecondMatrix;
provided that they are the same size.
This will give 0 anywhere that either image is 0, which is equivalent to drawing in black.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!