Display Pixel Values in Image - Alternative to `showPixelValues()`
이전 댓글 표시
Hello,
What I need is to be able to display it on an Axes Object on my own.
Namely something like:
hFigure = figure();
hAxes = axes();
DisplayImagePixelsValues(hAxes, mInputImage);
% Now set the properties of the axis.
Are there any alternatives to `showPixelValues()`? Something with more user control.
Thank You.
---
Update
According to answers it seems I wasn't clear.
I don't want to show data of a current axis or something.
I want a function which the input is a matrix (Small one) and the output is a regular axis object with result of an image with text of the pixels values.
From there I'd like to be able to customize this axes to my wishes.
답변 (3개)
Image Analyst
2017년 9월 3일
0 개 추천
How about impixelinfo()?
댓글 수: 3
Royi Avital
2017년 9월 3일
Image Analyst
2017년 9월 3일
If not, then you'll just have to use text() to put up text labels over the image pixels.
Royi Avital
2017년 9월 4일
Walter Roberson
2017년 9월 3일
0 개 추천
The existing File Exchange contribution you linked to, does an imshow() without any parent, so it will display inside the current axes.
However, I discovered recently that if you imshow() and the current axes is at the default position, that imshow sets up conditions so that the axes will typically be deleted on the next graphics operation. You can avoid that by setting a non-default Position for the axes.
In any case you can easily edit the File Exchange Contribution to add a 'Parent' property to the imshow() calls and other calls.
댓글 수: 9
Royi Avital
2017년 9월 3일
Walter Roberson
2017년 9월 3일
No.
Royi Avital
2017년 9월 4일
Walter Roberson
2017년 9월 4일
That would be a "bypass".
What you are asking is for there to be a function in MATLAB (or in the File Exchange at worst) that already does exactly what you want, without having to customize it even by minor changes. Such a function does not exist.
Royi Avital
2017년 9월 5일
Walter Roberson
2017년 9월 5일
The existing code does not produce HTML. The existing code produces a Figure. The figure has a single child axes. The axes contains an image, and a gridlines hggroup, and contains a whole bunch of text() objects.
The existing code does not return a handle to the figure that is created. However, the figure that is created will have a tag 'printImageToFigure'.
If you want to have the contents appear inside a figure you have already created, then call Steve's code and then
fig = findobj(0, 'tag', 'printImageToFigure');
figax = get(fig, 'Children');
and now you can copyobj() figax to the appropriate figure (or, better, appropriate uipanel.) After that you can delete(fig)
Royi Avital
2017년 9월 6일
Walter Roberson
2017년 9월 6일
What HTML code? The routine you linked to does not create HTML. Which routine are you looking at that produces HTML?
Royi Avital
2017년 9월 7일
Sindhu
2023년 8월 22일
0 개 추천
I need to display the pixel value in satellite image?
댓글 수: 1
Display how?
help impixelinfo
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!