Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to make input data from output superimpose

1 回表示 (過去 30 日間)
Ahmed
Ahmed 2011 年 9 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
how to make the output figure from superimpose technique to input data where can be used for further coding..
myImage=imread('B1.jpg');
S=im2bw(myImage,100);
imshow(myImage), hold on
himage = imshow(S);
set(himage, 'AlphaData', 0.5);
output from figure,i wanted to become as input for another coding.how to do that?
example:
gray=rgb2gray(*output from figure in superimpose technique*)

回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 9 月 29 日
The only general method is getframe(), which usually does more work than is necessary.
If the two images are the same size, then you can calculate the resulting image using the Alpha Blending formulas.
  3 件のコメント
Walter Roberson
Walter Roberson 2011 年 10 月 5 日
RecordedImage = getframe;
See http://www.mathworks.com/help/techdoc/ref/getframe.html
Ahmed
Ahmed 2011 年 12 月 3 日
i use RecordedImage = getframe; but it capture some of icon in the figure frame not just capture that current image i need.
I try use saveas(gcf,'trans.jpg', 'jpg') instead of RecordedImage= getframe;
But i face some problem where the dimension of saved image bigger than the original image.
How to maintain the dimension of original image when we use saveas(gcf,'trans.jpg', 'jpg').?
From that saved image, i can use the superimpose image as aa input data.
example
i=imread('trans.jpg');

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by