필터 지우기
필터 지우기

Put Image on cursor coordinates

조회 수: 1 (최근 30일)
Rayane
Rayane 2014년 1월 8일
댓글: Image Analyst 2014년 1월 8일
Hello
When I get cursor coordinates in matlab gui, values of X and Y are between 0 and 600
when I want to put image to those coordinates on the same axes,it only appears on screen for coordinates <1 !
How can I solve this problem ? ( dividing X and Y by 100 isn't a solution )
I want my image to appear exactly where the user clicks
Thank you

답변 (1개)

Image Analyst
Image Analyst 2014년 1월 8일
I'm not exactly sure what you're asking. Have you seen impixelinfo()?
  댓글 수: 2
Rayane
Rayane 2014년 1월 8일
Hello
I have an axes on which, where the user clicks, I want to put an object (button, another axes, ...etc)
My problem is :
X,Y coordinates of mouse cursor are too big [0 700]
When I set the position of the object on axes to those coordinates , the object doesn't appear at all because it goes out of the whole window
If its coordinates are <1 the object appears on axes ! Knowing that cursor coordinates were taken from the same axes
Why ?
Thank you
Image Analyst
Image Analyst 2014년 1월 8일
Make sure the "units" property of all your controls (buttons, figure, axes, whatever) are the same (pixels, normalized, or whatever). There is probably a mismatch. And not all controls can overlap (for example you can't use subplot() to overlap axes because it just doesn't show one). And how to you know whether the item you place there will be on top of underneath the control you clicked on?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by