フィルターのクリア

How to combine the multiple images to get the average single image?

7 ビュー (過去 30 日間)
Poornima Gokhale
Poornima Gokhale 2016 年 1 月 13 日
コメント済み: Image Analyst 2016 年 1 月 16 日
Hello, I have several images. I want to combine them to create my own template. Please help me with the code.

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 1 月 13 日
for ....
....
this_filename = ... construct an appropriate string
TheImageArray = imread(this_filename);
if file_index == 1
image_totals = double(TheImageArray);
elseif isequal( size(image_totals), size(TheImageArray) )
image_totals = image_totals + TheImageArray;
else
error(sprintf('File "%s" is the wrong size', this_filename));
end
end
average_image = image_totals / number_of_images;
  2 件のコメント
Poornima Gokhale
Poornima Gokhale 2016 年 1 月 13 日
Sorry Sir I didnt get you. In the link you had given they are processing separate files, but ours is the different images of the letter 'i'.
Walter Roberson
Walter Roberson 2016 年 1 月 13 日
Then I do not understand your question. If you have different images of the same letter, you would normally write each of the images as a template.
Is the question about how to take a number of different images of the same letter and somehow construct a combined image that is "more representative" of how the letter should ideally look? Or is the question about how to create a mosaic image that shows all of the different images in a single image?

サインインしてコメントする。


Image Analyst
Image Analyst 2016 年 1 月 15 日
See my demo for averaging images, attached.
  4 件のコメント
Poornima Gokhale
Poornima Gokhale 2016 年 1 月 16 日
It's not working sir.
Image Analyst
Image Analyst 2016 年 1 月 16 日
The array is already cast to uint8() after the division of the sum to get the mean. I added an imwrite() and imread() after that and it worked fine. So you must have done something different than me but you forgot to attach your m-file with your modifications, so I don't know what you're doing.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by