Domanda

I have mp4 video which has around 50000 frames of size 1920x720. I have to remove a specific area in the video (all frames). Can you suggest a method in MATLAB?

È stato utile?

Soluzione 2

If you read the video file frame-by-frame, then it is a simple matter of matrix-indexing to remove a specific area (make it black as you said):

for i=1:numFrames
    % read next frame
    frame = <.. get i-th frame..>;

    % black out region
    frame(100:200, 300:350) = 0;
end

If the frames are RBG, just adjust indexing appropriately: frame(a:b,c:d,:)=0

Altri suggerimenti

Specify a ROI(Region of Interest) for each individual frame of the video, where the ROI is the specific area that you wanted to remove. Quite simple. Hope my advice helped. If u are still not sure, comment on this answer, I will add in more hints.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top