How can I write code to calculate frames differnces of video frames

From attached picture, you can see the difference between frame (h8.png) that contain on white area and frame h4.png is 4 frames and difference between h13.png & h8.png is 5 frames, the difference between h26.png & h13.png is 13 frames and the difference between h29.png & h26.png is 3 frames. How can I write code to calculate differences between frames that contain on white areas.

 채택된 답변

I think I already gave you code to do video processing (attached again just in case). So you just keep track, in the frame index loop, which frame have white blobs in them. Then just use the diff() function:
frameDifferences = diff(framesWithWhiteBlobs);

댓글 수: 5

Many Thanks Sir, Your dome is very valuable. Can you help me please how can I make loop (frameIndex). I need to matlab answer show me this results: >> h8-h4= 4 frames h13-h8= 5 frames h26-h13=13 frames h29-h26=3 frames Best Regards & thx in advance
I have no idea what any of that means. Try to re-phase it. My code does show you how to go through frame - by - frame.
Mehmed Ozkan
Mehmed Ozkan 2023년 7월 4일
편집: Mehmed Ozkan 2023년 7월 4일
@Image Analyst Hi imageanalyst, I am not sure if this is the appropriate way to reach out, so forgive me. The above code is proving to be very useful for my research project and has brought me many smiles. I wanted to ask you for your permission to modify and use it accordingly or whether you want it to be treated as just coding advice. Anyway I can appropriately credit you? Thanks!
Excuse me for the late response Image Analyst, it gave me so many smiles and sent me down so many new rabbit holes. Learned a lot! Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

카테고리

도움말 센터File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

질문:

2015년 1월 3일

댓글:

2023년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by