Position property of a system object
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Steven Lord
2018년 8월 29일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!