how to take the difference of images (at once) within multiple snapshots ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Omar Ahmad
am 1 Dez. 2014
Kommentiert: Omar Ahmad
am 17 Dez. 2014
My present situation:
for i=1:10
grayImage = getsnapshot (cam);
grayImage = rgb2gray (grayImage);
imwrite (grayImage,sprintf('test_%d.jpg',i));
end
I want to see the image differences being subtracted automatically (e.g. from image 1 and 2, 3 and 4, 5 and 6 etc.) without doing it one by one like the following.
f1=imread ('test_1.jpg');
f2=imread ('test_2.jpg');
diffGray = abs (f1-f2);
And after having coded to do the operation automatically, I also want to save the differences into a folder in Binary format (to make it visible in black and white). The saving must also take place automatically rather having to use imwrite for saving each and every difference.
Please help. thank you very much.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 1 Dez. 2014
You will find it easy to adapt one of the code samples in the FAQ to subtract the (n-1)st image from the nth image. http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F Let me know if you can't.
7 Kommentare
Image Analyst
am 16 Dez. 2014
See my attached demo where I get differences between frames of a video.
By the way I'll be traveling in Arizona and California from this evening through Friday so I most likely won't be able to answer anyone at all during that time.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu GigE Vision Hardware finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!