Effacer les filtres
Effacer les filtres

Properties of a video

7 vues (au cours des 30 derniers jours)
Weia Reinboud
Weia Reinboud le 14 Jan 2019
Commenté : Weia Reinboud le 14 Jan 2019
See attached picture. Several issues.
1:The video is OK but as you see numbers along the axes are not included. How to fix that? Or how to remove all?
2: The grid is different along all three axes, why?
3: Documentation of VideoWriter writes about many properties of a videoclip, like FrameRate. Where in the code this can be used?
axis([-3 3 -2 2 0 3.5]);
axis equal
grid on
%rest of code not shown
testfilm=VideoWriter('eerstefilm.avi');
open(testfilm);
writeVideo(testfilm,film);
close(testfilm);
Screen Shot 2019-01-14 at 12.26.05.png

Réponse acceptée

Guillaume
Guillaume le 14 Jan 2019
Documentation of VideoWriter writes about many properties of a videoclip, like FrameRate. Where in the code this can be used?
Normally, before you open the video.
As for your other questions, it all depends on what film is. I would guess that it may be the result of getframe but you haven't shown that bit.
  2 commentaires
Weia Reinboud
Weia Reinboud le 14 Jan 2019
"Normally, before you open the video." In the Command screen? Somewhere in the code?
The videoclip is fine, and indeed made with getframe
Guillaume
Guillaume le 14 Jan 2019
In the Command screen? Somewhere in the code?
It's up to you. If the code you show is in a script, then in that script. E.g. if you wanted to set the frame rate you'd replace:
testfilm=VideoWriter('eerstefilm.avi');
open(testfilm);
by
testfilm=VideoWriter('eerstefilm.avi');
testfilm.FrameRate = 30; %must be before the call to open
open(testfilm);

Connectez-vous pour commenter.

Plus de réponses (2)

Weia Reinboud
Weia Reinboud le 14 Jan 2019
Clear, thanks.

Weia Reinboud
Weia Reinboud le 14 Jan 2019
I want to set the gridlines of a grid. Mathlab chooses 'nice' limits, but I want to do it myself. I cannot find where. Documentation text:
"axis AUTO returns the axis scaling to its default, automatic
mode where, for each dimension, 'nice' limits are chosen based
on the extents of all line, surface, patch, and image children."
This is the code at the moment:
axis([-3 3 -2 2 0 3.5]);
axis equal
grid on
  3 commentaires
Weia Reinboud
Weia Reinboud le 14 Jan 2019
OK.
Weia Reinboud
Weia Reinboud le 14 Jan 2019
I get this error message, maybe forgot something:
Undefined function 'xticks' for input arguments of type 'double'.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by