Position property of a system object
2 views (last 30 days)
Show older comments
Meera chandran
on 29 Aug 2018
Commented: Meera chandran
on 4 Sep 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.
0 Comments
Accepted Answer
Steven Lord
on 29 Aug 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.
More Answers (0)
See Also
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!