Effacer les filtres
Effacer les filtres

Position property of a system object

2 vues (au cours des 30 derniers jours)
Meera chandran
Meera chandran le 29 Août 2018
can somebody please explain the concept of position property of an object. Is it the pixel position ? why it is a row matrix only?
videoPlayer = vision.VideoPlayer('Position',[100,100,680,520]);
In one of the example, its given as:
hVideoOut = vision.VideoPlayer('Name', 'Video Stabilization');
hVideoOut.Position(1) = round(0.4*hVideoOut.Position(1));
hVideoOut.Position(2) = round(1.5*(hVideoOut.Position(2)));
hVideoOut.Position(3:4) = [650 350];
I didn't get the concept of setting the positions to these values.
I know this is a silly question, but I tried to find the answer and its not well explained anywhere. so, if somebody has time, please help me.

Réponse acceptée

Steven Lord
Steven Lord le 29 Août 2018
This particular object has a Position property that controls where on your screen the video player window is located. The description on that page lists it as "Size and position of the video player window in pixels"
Not all objects have a Position property, though. Usually it's just those objects that need to show something graphically on the screen that have such a property.
Those computations look like they move the object left, move it up, and set it to a fixed width and height. Run those commands one at a time and you should see the window move.
  1 commentaire
Meera chandran
Meera chandran le 4 Sep 2018
Thankyou so much for the answer Steven :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing and Computer Vision dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by