필터 지우기
필터 지우기

how to show information of image in gui

조회 수: 1 (최근 30일)
sirapob gotiram
sirapob gotiram 2018년 11월 18일
댓글: Image Analyst 2018년 11월 18일
46446016_276594562999835_6605261338736328704_n.png
How to get pixel info show in text box (red,green,blue)
please help
  댓글 수: 2
Rik
Rik 2018년 11월 18일
You can use the lines below to set the motion callback function and to get the current location.
set(parentfig,'WindowButtonMotionFcn',@MotionCallback)
get(gcf,'CurrentPoint')
With those two lines, you should be able to solve this.
Image Analyst
Image Analyst 2018년 11월 18일
Rik, please move down to the answers section.

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

답변 (1개)

shariq khan
shariq khan 2018년 11월 18일
RGB is format of 3 layers of an Image for example when you load an image - the intensity closer to Red is 1st plane, intensity closer to Green is 2nd and close to Blue is 3rd. So when you want to know specifically the information of Red green blue, it comes in Matrix format depending upon the size of your image
check here for little more insight
  댓글 수: 2
shariq khan
shariq khan 2018년 11월 18일
for number of pixels - I think you should check the area of your image display and quality of it and divide - if you remember al devices has some dpi which is calculated based on screen size and camera (photo) quality
if your question would mean this also?
Image Analyst
Image Analyst 2018년 11월 18일
This will not save/record the RGB and xy values "live" as the user mouses around over the image.

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by